From: Roland Häder Date: Sun, 10 May 2020 03:30:05 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=48991d486551bdf80689cdb7aa2002f86b5869c8;p=jcontacts-business-lib.git Continued: - added business method updateDepartment() Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontactsbusiness/model/department/AdminDepartmentSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/department/AdminDepartmentSessionBeanRemote.java index 4b7ee4a..2769b66 100644 --- a/src/org/mxchange/jcontactsbusiness/model/department/AdminDepartmentSessionBeanRemote.java +++ b/src/org/mxchange/jcontactsbusiness/model/department/AdminDepartmentSessionBeanRemote.java @@ -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. + *

+ * @param department Department being updated + *

+ * @return Updated department instance + *

+ * @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