- renamed CompanyDepartment -> Department, there will be no fire department or so
- added remote session beans (general/admin) for opening times with some methods
- removed unused imports
Signed-off-by: Roland Häder <roland@mxchange.org>
*/
package org.mxchange.jcontactsbusiness.model.branchoffice;
-import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
import java.io.Serializable;
import javax.ejb.Remote;
import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeAlreadyAddedException;
/**
- * A remote interface for business contact data
+ * A remote interface for branch offices
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeNotFoundException;
/**
- * A remote interface for business contact data
+ * A remote interface for branch offices
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
+++ /dev/null
-/*
- * 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.department;
-
-import java.io.Serializable;
-import javax.ejb.Remote;
-
-/**
- * A remote interface for business contact data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface AdminCompanyDepartmentSessionBeanRemote extends Serializable {
-
-}
--- /dev/null
+/*
+ * 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.department;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentAlreadyAddedException;
+
+/**
+ * A remote interface for departments
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface AdminDepartmentSessionBeanRemote extends Serializable {
+
+ /**
+ * Adds a given department instance to the database. If it is already found
+ * (department name and company in combination), then throw a proper
+ * exception.
+ * <p>
+ * @param department Department instance to add
+ * <p>
+ * @return Updated department instance
+ * <p>
+ * @throws DepartmentAlreadyAddedException If the department is already
+ * added
+ */
+ Department addDepartment (final Department department) throws DepartmentAlreadyAddedException;
+
+}
+++ /dev/null
-/*
- * 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.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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface CompanyDepartmentSessionBeanRemote 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 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.
- * <p>
- * @return A list with all company departments
- */
- List<Department> allCompanyDepartments ();
-
-}
--- /dev/null
+/*
+ * 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.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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@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.
+ * <p>
+ * @return A list with all company departments
+ */
+ List<Department> allDepartments ();
+
+}
*/
package org.mxchange.jcontactsbusiness.model.employee;
-import org.mxchange.jcontactsbusiness.model.employee.Employee;
import java.io.Serializable;
import java.util.List;
import javax.ejb.Remote;
--- /dev/null
+/*
+ * 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.opening_times;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+
+/**
+ * A remote interface for opening times
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface AdminOpeningTimesSessionBeanRemote extends Serializable {
+
+ /**
+ * Adds a given opening time instance to the database. Please note that this
+ * method will add opening time regardless if found as it is not assigned to
+ * any other entity (at this point of time).
+ * <p>
+ * @param openingTime OpeningTime instance to add
+ * <p>
+ * @return Updated opening time instance
+ */
+ OpeningTimes addOpeningTime (final OpeningTimes openingTime);
+
+}
--- /dev/null
+/*
+ * 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.opening_times;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+import org.mxchange.jcontactsbusiness.exceptions.opening_times.OpeningTimesNotFoundException;
+
+/**
+ * A remote interface for opening times
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface OpeningTimesSessionBeanRemote 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 OpeningTimesNotFoundException If the id number could not be looked
+ * up and solved into an entity
+ */
+ OpeningTimes findOpeningTimesById (final Long openingId) throws OpeningTimesNotFoundException;
+
+ /**
+ * Returns a list, even empty if not thing found, from all opening times.
+ * NULL should not be returned by this method.
+ * <p>
+ * @return A list with all opening times
+ */
+ List<OpeningTimes> allOpeningTimes ();
+
+}