]> git.mxchange.org Git - jcontacts-business-lib.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 16 Oct 2017 18:30:17 +0000 (20:30 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 16 Oct 2017 19:49:02 +0000 (21:49 +0200)
- renamed remote interfaces for employees as there is no need for explicit
  company employees
- removed all find*ById() as they were a performance problem
- removed more that causes unneccessary load on EJB container

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/basicdata/AdminBasicCompanyDataSessionBeanRemote.java
src/org/mxchange/jcontactsbusiness/model/basicdata/BasicCompanyDataSessionBeanRemote.java
src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOfficeSessionBeanRemote.java
src/org/mxchange/jcontactsbusiness/model/department/DepartmentSessionBeanRemote.java
src/org/mxchange/jcontactsbusiness/model/employee/AdminCompanyEmployeeSessionBeanRemote.java [deleted file]
src/org/mxchange/jcontactsbusiness/model/employee/AdminEmployeeSessionBeanRemote.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/model/employee/CompanyEmployeeSessionBeanRemote.java [deleted file]
src/org/mxchange/jcontactsbusiness/model/employee/EmployeeSessionBeanRemote.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/model/opening_time/OpeningTimeSessionBeanRemote.java

index b5bff9854751d20be23033a7417057e0d06c75fc..97563dcbda3bf063dbbf80f7b3ea82a6b98e228d 100644 (file)
@@ -18,8 +18,8 @@ package org.mxchange.jcontactsbusiness.model.basicdata;
 
 import java.io.Serializable;
 import javax.ejb.Remote;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicCompanyDataAlreadyAddedException;
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataAlreadyAddedException;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
 
 /**
  * A remote interface for business contact data
@@ -37,9 +37,9 @@ public interface AdminBasicCompanyDataSessionBeanRemote extends Serializable {
         * <p>
         * @return Updated basic data
         * <p>
-        * @throws BasicCompanyDataAlreadyAddedException If the company name was already
+        * @throws BasicDataAlreadyAddedException If the company name was already
         * found
         */
-       BusinessBasicData addCompanyBasicData (final BusinessBasicData basicData) throws BasicCompanyDataAlreadyAddedException;
+       BasicData addBusinessBasicData (final BasicData basicData) throws BasicDataAlreadyAddedException;
 
 }
index 967fcb210f831d548296b6a7270cc9a6e01ba56e..6ddbb70db3bcf8e27a4d66d644992cc8fa90dc07 100644 (file)
  */
 package org.mxchange.jcontactsbusiness.model.basicdata;
 
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Remote;
-import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicCompanyDataNotFoundException;
 
 /**
  * A remote interface for business contact data
@@ -30,34 +28,12 @@ import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicCompanyDataNotFo
 @Remote
 public interface BasicCompanyDataSessionBeanRemote extends Serializable {
 
-       /**
-        * Checks whether given company name already exists
-        * <p>
-        * @param companyName Company name to check
-        * <p>
-        * @return Whether the company name exists
-        */
-       Boolean isCompanyNameUsed (final String companyName);
-
-       /**
-        * Retrieves a single business data entity for given id number or throws a
-        * proper exception if not found.
-        * <p>
-        * @param basicDataId Company basic data id to lookup
-        * <p>
-        * @return Business contact instance
-        * <p>
-        * @throws BasicCompanyDataNotFoundException If the id number could not be
-        * looked up and solved into an entity
-        */
-       BusinessBasicData findBasicDataById (final Long basicDataId) throws BasicCompanyDataNotFoundException;
-
        /**
         * Returns a list, even empty if not thing found, from all business
         * contacts. NULL should not be returned by this method.
         * <p>
         * @return A list with all business contacts
         */
-       List<BusinessBasicData> allCompanyBasicData ();
+       List<BasicData> allBusinessBasicData ();
 
 }
index 7a70924da063eadec16b2cbf97191812a5b4cd88..e917a491ffa6ff96d769f2c20404ff2efd3a4b76 100644 (file)
@@ -19,7 +19,6 @@ package org.mxchange.jcontactsbusiness.model.branchoffice;
 import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Remote;
-import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeNotFoundException;
 
 /**
  * A remote interface for branch offices
@@ -29,17 +28,6 @@ import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeNotFou
 @Remote
 public interface BranchOfficeSessionBeanRemote extends Serializable {
 
-       /**
-        * Tries to find a branch office with given id number
-        * <p>
-        * @param branchOfficeId Branch office id
-        * <p>
-        * @return A branch office instance
-        * <p>
-        * @throws BranchOfficeNotFoundException If the branch office was not found
-        */
-       BranchOffice findBranchOfficeById (final Long branchOfficeId) throws BranchOfficeNotFoundException;
-
        /**
         * Returns a list of all branch offices
         * <p>
index 53281e93a98b7cd5bbfa0b6b368c68f030bf08b8..0417998ce09b8cb412c0bb5da2e9873c8b1a8de8 100644 (file)
@@ -19,7 +19,6 @@ package org.mxchange.jcontactsbusiness.model.department;
 import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Remote;
-import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundException;
 
 /**
  * A remote interface for departments
@@ -29,19 +28,6 @@ import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundEx
 @Remote
 public interface DepartmentSessionBeanRemote extends Serializable {
 
-       /**
-        * Retrieves a single company department entity for given id number or
-        * throws a proper exception if not found.
-        * <p>
-        * @param departmentId Company department id to lookup
-        * <p>
-        * @return Company department instance
-        * <p>
-        * @throws DepartmentNotFoundException If the id number could not be
-        * looked up and solved into an entity
-        */
-       Department findDepartmentById (final Long departmentId) throws DepartmentNotFoundException;
-
        /**
         * Returns a list, even empty if not thing found, from all company
         * departments. NULL should not be returned by this method.
diff --git a/src/org/mxchange/jcontactsbusiness/model/employee/AdminCompanyEmployeeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/employee/AdminCompanyEmployeeSessionBeanRemote.java
deleted file mode 100644 (file)
index 0f8fd97..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.model.employee;
-
-import java.io.Serializable;
-import javax.ejb.Remote;
-
-/**
- * An interface for administrative purposes on handling company employee data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface AdminCompanyEmployeeSessionBeanRemote extends Serializable {
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/model/employee/AdminEmployeeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/employee/AdminEmployeeSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..5b7c896
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.model.employee;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+
+/**
+ * An interface for administrative purposes on handling company employee data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface AdminEmployeeSessionBeanRemote extends Serializable {
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/model/employee/CompanyEmployeeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/employee/CompanyEmployeeSessionBeanRemote.java
deleted file mode 100644 (file)
index f51b26f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.model.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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface CompanyEmployeeSessionBeanRemote extends Serializable {
-
-       /**
-        * Returns a list of all company employees (regardless in which company they work)
-        * <p>
-        * @return A list of all company employees
-        */
-       List<Employee> allCompanyEmployees ();
-
-       /**
-        * Finds a company employee by given employee id
-        * <p>
-        * @param employeeId Employee id to find company employee instance for
-        * <p>
-        * @return Company employee instance
-        * <p>
-        * @throws CompanyEmployeeNotFoundException If the company employee was not
-        * found
-        */
-       Employee findCompanyEmployeeById (final Long employeeId) throws CompanyEmployeeNotFoundException;
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/model/employee/EmployeeSessionBeanRemote.java b/src/org/mxchange/jcontactsbusiness/model/employee/EmployeeSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..78c748b
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.model.employee;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+
+/**
+ * An interface for company employee data being handled
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface EmployeeSessionBeanRemote extends Serializable {
+
+       /**
+        * Returns a list of all company employees (regardless in which company they work)
+        * <p>
+        * @return A list of all company employees
+        */
+       List<Employable> allEmployees ();
+
+}
index 249668c9d1b504166e7cf8c251f1b1de67361682..7e0dae110036564c0cdb833777d31d776cd2e5d9 100644 (file)
@@ -19,7 +19,6 @@ package org.mxchange.jcontactsbusiness.model.opening_time;
 import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Remote;
-import org.mxchange.jcontactsbusiness.exceptions.opening_time.OpeningTimeNotFoundException;
 
 /**
  * A remote interface for opening times
@@ -29,19 +28,6 @@ import org.mxchange.jcontactsbusiness.exceptions.opening_time.OpeningTimeNotFoun
 @Remote
 public interface OpeningTimeSessionBeanRemote extends Serializable {
 
-       /**
-        * Retrieves a single company department entity for given id number or
-        * throws a proper exception if not found.
-        * <p>
-        * @param openingId Company department id to lookup
-        * <p>
-        * @return Company department instance
-        * <p>
-        * @throws OpeningTimeNotFoundException If the id number could not be looked
-        * up and solved into an entity
-        */
-       OpeningTime findOpeningTimesById (final Long openingId) throws OpeningTimeNotFoundException;
-
        /**
         * Returns a list, even empty if not thing found, from all opening times.
         * NULL should not be returned by this method.