From: Roland Häder Date: Tue, 26 Apr 2016 08:20:31 +0000 (+0200) Subject: Added busines methods: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2ec32995fd3adda79544832f1251ab7f7fe5976c;p=jcustomer-lib.git Added busines methods: - addCustomer(): adds given customer to database (JPA) - createCustomerNumber(): creates a free customer number. The EJB *can* do it with generic CustomerUtils class, but don't have to. --- diff --git a/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java b/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java index 4bb050d..ea4f416 100644 --- a/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java +++ b/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java @@ -36,4 +36,21 @@ public interface AdminCustomerSessionBeanRemote extends Serializable { */ List allCustomers (); + /** + * Adds the given customer instance to database and returns an updated + * instance. + *

+ * @param customer Customer instance + * + * @return Updated customer + */ + Customer addCustomer (final Customer customer); + + /** + * Creates a new (free) customer number. + *

+ * @return Free customer number (no free number should not happen) + */ + String createCustomerNumber (); + }