From c256fc95b4ee695351eda43e415655fb1733bde4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 26 Apr 2016 11:29:03 +0200 Subject: [PATCH] This method should throw an exception if the customer has already been added ... --- .../model/customer/AdminCustomerSessionBeanRemote.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java b/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java index ea4f416..e2fca5e 100644 --- a/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java +++ b/src/org/mxchange/jcustomercore/model/customer/AdminCustomerSessionBeanRemote.java @@ -19,6 +19,7 @@ package org.mxchange.jcustomercore.model.customer; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; +import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException; /** * Administrative interface for customer beans @@ -41,10 +42,14 @@ public interface AdminCustomerSessionBeanRemote extends Serializable { * instance. *

* @param customer Customer instance - * + *

* @return Updated customer + *

+ * @throws + * org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException + * If the customer is already registered. */ - Customer addCustomer (final Customer customer); + Customer addCustomer (final Customer customer) throws CustomerAlreadyRegisteredException; /** * Creates a new (free) customer number. -- 2.39.5