From 48991d486551bdf80689cdb7aa2002f86b5869c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 10 May 2020 05:30:05 +0200 Subject: [PATCH] Continued: - added business method updateDepartment() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../AdminDepartmentSessionBeanRemote.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.39.5