From 2ec32995fd3adda79544832f1251ab7f7fe5976c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 26 Apr 2016 10:20:31 +0200 Subject: [PATCH] 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. --- .../AdminCustomerSessionBeanRemote.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 (); + } -- 2.39.5