From: Roland Häder Date: Thu, 28 Apr 2016 08:18:33 +0000 (+0200) Subject: Added new business method findCustomerById() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f4bf4ca922333490dd43514aa812a5be25b93fc4;p=jcustomer-lib.git Added new business method findCustomerById() Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java b/src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java index 5585d80..1c0c9ff 100644 --- a/src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java +++ b/src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jcustomercore.model.customer; import java.io.Serializable; import javax.ejb.Remote; import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException; +import org.mxchange.jcustomercore.exceptions.CustomerNotFoundException; /** * An interface for customer beans @@ -37,6 +38,18 @@ public interface CustomerSessionBeanRemote extends Serializable { */ Customer fillCustomerData (final Customer customer); + /** + * Tries to find a customer with given id number (not customer number). If + * not found, an exception is thrown. + *

+ * @param customerId Customer id + *

+ * @return Valid customer instance + *

+ * @throws CustomerNotFoundException If a customer cannot be found + */ + Customer findCustomerById (final Long customerId) throws CustomerNotFoundException; + /** * Checks if the the given customer instance is already registered *