From e40a4016e0c31b50c908a2f8771c6b9c4f9e86c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 24 Sep 2017 22:59:59 +0200 Subject: [PATCH] Continued: - added remote interfaces for company departments, admin and general - general has already 2 first business methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- ...minCompanyDepartmentSessionBeanRemote.java | 30 +++++++++++ .../CompanyDepartmentSessionBeanRemote.java | 53 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 src/org/mxchange/jcontactsbusiness/model/department/AdminCompanyDepartmentSessionBeanRemote.java create mode 100644 src/org/mxchange/jcontactsbusiness/model/department/CompanyDepartmentSessionBeanRemote.java diff --git a/src/org/mxchange/jcontactsbusiness/model/department/AdminCompanyDepartmentSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/department/AdminCompanyDepartmentSessionBeanRemote.java new file mode 100644 index 0000000..2f12edc --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/model/department/AdminCompanyDepartmentSessionBeanRemote.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017 Roland Häder + * + * 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.model.department; + +import java.io.Serializable; +import javax.ejb.Remote; + +/** + * A remote interface for business contact data + *

+ * @author Roland Häder + */ +@Remote +public interface AdminCompanyDepartmentSessionBeanRemote extends Serializable { + +} diff --git a/src/org/mxchange/jcontactsbusiness/model/department/CompanyDepartmentSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/department/CompanyDepartmentSessionBeanRemote.java new file mode 100644 index 0000000..4b6f6e8 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/model/department/CompanyDepartmentSessionBeanRemote.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2017 Roland Häder + * + * 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.model.department; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.Remote; +import org.mxchange.jcontactsbusiness.exceptions.department.CompanyDepartmentNotFoundException; + +/** + * A remote interface for business contact data + *

+ * @author Roland Häder + */ +@Remote +public interface CompanyDepartmentSessionBeanRemote extends Serializable { + + /** + * Retrieves a single company department entity for given id number or + * throws a proper exception if not found. + *

+ * @param departmentId Company department id to lookup + *

+ * @return Company department instance + *

+ * @throws CompanyDepartmentNotFoundException If the id number could not be + * looked up and solved into an entity + */ + Department findDepartmentById (final Long departmentId) throws CompanyDepartmentNotFoundException; + + /** + * Returns a list, even empty if not thing found, from all company + * departments. NULL should not be returned by this method. + *

+ * @return A list with all company departments + */ + List allCompanyDepartments (); + +} -- 2.39.5