From: Roland Häder Date: Fri, 8 Sep 2017 23:26:38 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cf0861ec57a2c590b5959ad9232e0323c0bb83ef;p=jcontacts-business-lib.git Continued: - added first business method addBranchOffice() Signed-off-by: Roland Häder --- 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; + }