]> git.mxchange.org Git - jcontacts-business-lib.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 10 May 2020 03:30:05 +0000 (05:30 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 10 May 2020 03:30:05 +0000 (05:30 +0200)
- added business method updateDepartment()

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/department/AdminDepartmentSessionBeanRemote.java

index 4b7ee4a0f37b3280dccfb3d5a3f127e9024cf9ea..2769b668db9e033c9ce122d23c541280d5d2bf14 100644 (file)
@@ -19,6 +19,7 @@ package org.mxchange.jcontactsbusiness.model.department;
 import java.io.Serializable;
 import javax.ejb.Remote;
 import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentAlreadyAddedException;
+import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundException;
 
 /**
  * A remote interface for departments
@@ -28,6 +29,19 @@ import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentAlreadyAdd
 @Remote
 public interface AdminDepartmentSessionBeanRemote extends Serializable {
 
+       /**
+        * Updates the given department instance in database and returns an updated
+        * version of it. If the department is not found, a checked exception is
+        * thrown.
+        * <p>
+        * @param department Department being updated
+        * <p>
+        * @return Updated department instance
+        * <p>
+        * @throws DepartmentNotFoundException If the department was not found
+        */
+       Department updateDepartment (final Department department) throws DepartmentNotFoundException;
+
        /**
         * Adds a given department instance to the database. If it is already found
         * (department name and company in combination), then throw a proper