]> git.mxchange.org Git - jcustomer-lib.git/commitdiff
Added new business method findCustomerById()
authorRoland Häder <roland@mxchange.org>
Thu, 28 Apr 2016 08:18:33 +0000 (10:18 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 28 Apr 2016 08:18:33 +0000 (10:18 +0200)
Signed-off-by: Roland Häder <roland@haeder.net>
src/org/mxchange/jcustomercore/model/customer/CustomerSessionBeanRemote.java

index 5585d80a501e0363288999dc56e9634cc7c56ff0..1c0c9ffa7b0b15177a212163e6b53fb13cf7c3aa 100644 (file)
@@ -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.
+        * <p>
+        * @param customerId Customer id
+        * <p>
+        * @return Valid customer instance
+        * <p>
+        * @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
         * <p>