]> git.mxchange.org Git - jcontacts-business-lib.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 8 Sep 2017 23:26:38 +0000 (01:26 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 8 Sep 2017 23:26:38 +0000 (01:26 +0200)
- added first business method addBranchOffice()

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java
src/org/mxchange/jcontactsbusiness/branchoffice/AdminBranchOfficeSessionBeanRemote.java

index cc437aaa9470ad8643f4376589a95c3542fbb298..a7c3fdaec2d2ab7bd4781ef3855b46ec1631c1d2 100644 (file)
@@ -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.
         * <p>
-        * @param companyDataId Company basic data id to lookup
+        * @param basicDataId Company basic data id to lookup
         * <p>
         * @return Business contact instance
         * <p>
         * @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
index f2b4cad813cde13f242b69f0d0e16a0e33635902..ddf6af4ea9b6699fa1fc7fcd9e402bbc1d1c0c11 100644 (file)
@@ -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.
+        * <p>
+        * @param branchOffice Branch office instance
+        * <p>
+        * @return Updated branch office instance
+        * <p>
+        * @throws BranchOfficeAlreadyAddedException If the branch office's address
+        * was already added
+        */
+       BranchOffice addBranchOffice (final BranchOffice branchOffice) throws BranchOfficeAlreadyAddedException;
+
 }