From cf0861ec57a2c590b5959ad9232e0323c0bb83ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 9 Sep 2017 01:26:38 +0200 Subject: [PATCH] Continued: - added first business method addBranchOffice() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../basicdata/BusinessDataSessionBeanRemote.java | 4 ++-- .../AdminBranchOfficeSessionBeanRemote.java | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java index cc437aa..a7c3fda 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java @@ -42,14 +42,14 @@ public interface BusinessDataSessionBeanRemote extends Serializable { * Retrieves a single business data entity for given id number or throws a * proper exception if not found. *

- * @param companyDataId Company basic data id to lookup + * @param basicDataId Company basic data id to lookup *

* @return Business contact instance *

* @throws BusinessDataNotFoundException If the id number could not be * looked up and solved into an entity */ - BusinessBasicData findBasicDataById (final Long companyDataId) throws BusinessDataNotFoundException; + BusinessBasicData findBasicDataById (final Long basicDataId) throws BusinessDataNotFoundException; /** * Returns a list, even empty if not thing found, from all business diff --git a/src/org/mxchange/jcontactsbusiness/branchoffice/AdminBranchOfficeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/branchoffice/AdminBranchOfficeSessionBeanRemote.java index f2b4cad..ddf6af4 100644 --- a/src/org/mxchange/jcontactsbusiness/branchoffice/AdminBranchOfficeSessionBeanRemote.java +++ b/src/org/mxchange/jcontactsbusiness/branchoffice/AdminBranchOfficeSessionBeanRemote.java @@ -18,6 +18,7 @@ package org.mxchange.jcontactsbusiness.branchoffice; import java.io.Serializable; import javax.ejb.Remote; +import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeAlreadyAddedException; /** * A remote interface for business contact data @@ -27,4 +28,18 @@ import javax.ejb.Remote; @Remote public interface AdminBranchOfficeSessionBeanRemote extends Serializable { + /** + * Adds given branch office entity to persistence. If the branch office's + * address was already added, a proper exception is thrown. The parameter is + * validated before being accepted like that branchId is not set. + *

+ * @param branchOffice Branch office instance + *

+ * @return Updated branch office instance + *

+ * @throws BranchOfficeAlreadyAddedException If the branch office's address + * was already added + */ + BranchOffice addBranchOffice (final BranchOffice branchOffice) throws BranchOfficeAlreadyAddedException; + } -- 2.39.5