From f9395110f8719649e47636e80b342fa91f4d02ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 19 Aug 2017 20:36:53 +0200 Subject: [PATCH] Continued: - renamed administrative business-data interface as this break naming convention - added thrown exception to generic business-data interface - added remote interfaces for administrative and general purposes, the general already have 2 business methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- ...> AdminBusinessDataSessionBeanRemote.java} | 2 +- .../BusinessDataSessionBeanRemote.java | 2 +- ...AdminCompanyEmployeeSessionBeanRemote.java | 30 +++++++++++ .../CompanyEmployeeSessionBeanRemote.java | 51 +++++++++++++++++++ 4 files changed, 83 insertions(+), 2 deletions(-) rename src/org/mxchange/jcontactsbusiness/basicdata/{BusinessDataAdminSessionBeanRemote.java => AdminBusinessDataSessionBeanRemote.java} (94%) create mode 100644 src/org/mxchange/jcontactsbusiness/employee/AdminCompanyEmployeeSessionBeanRemote.java create mode 100644 src/org/mxchange/jcontactsbusiness/employee/CompanyEmployeeSessionBeanRemote.java diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataAdminSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/basicdata/AdminBusinessDataSessionBeanRemote.java similarity index 94% rename from src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataAdminSessionBeanRemote.java rename to src/org/mxchange/jcontactsbusiness/basicdata/AdminBusinessDataSessionBeanRemote.java index 25d0c83..f942639 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataAdminSessionBeanRemote.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/AdminBusinessDataSessionBeanRemote.java @@ -26,7 +26,7 @@ import javax.ejb.Remote; * @author Roland Häder */ @Remote -public interface BusinessDataAdminSessionBeanRemote extends Serializable { +public interface AdminBusinessDataSessionBeanRemote extends Serializable { /** * Returns a list, even empty if not thing found, from all business diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java index 12f609f..a44f443 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessDataSessionBeanRemote.java @@ -18,7 +18,7 @@ package org.mxchange.jcontactsbusiness.basicdata; import java.io.Serializable; import javax.ejb.Remote; -import org.mxchange.jcontactsbusiness.exceptions.BusinessDataNotFoundException; +import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundException; /** * A remote interface for business contact data diff --git a/src/org/mxchange/jcontactsbusiness/employee/AdminCompanyEmployeeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/employee/AdminCompanyEmployeeSessionBeanRemote.java new file mode 100644 index 0000000..8a61e1a --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/employee/AdminCompanyEmployeeSessionBeanRemote.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.employee; + +import java.io.Serializable; +import javax.ejb.Remote; + +/** + * An interface for administrative purposes on handling company employee data + *

+ * @author Roland Haeder + */ +@Remote +public interface AdminCompanyEmployeeSessionBeanRemote extends Serializable { + +} diff --git a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployeeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployeeSessionBeanRemote.java new file mode 100644 index 0000000..c841ff2 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployeeSessionBeanRemote.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2017 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.employee; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; +import org.mxchange.jcontactsbusiness.exceptions.employee.CompanyEmployeeNotFoundException; + +/** + * An interface for company employee data being handled + *

+ * @author Roland Haeder + */ +@Remote +public interface CompanyEmployeeSessionBeanRemote extends Serializable { + + /** + * Returns a list of all company employees (regardless in which company they work) + *

+ * @return A list of all company employees + */ + List allCompanyEmployees (); + + /** + * Finds a company employee by given employee id + *

+ * @param employeeId Employee id to find company employee instance for + *

+ * @return Company employee instance + *

+ * @throws CompanyEmployeeNotFoundException If the company employee was not + * found + */ + Employee findCompanyEmployeeById (final Long employeeId) throws CompanyEmployeeNotFoundException; + +} -- 2.39.2