package org.mxchange.jcontactsbusiness.basicdata;
import java.io.Serializable;
-import java.util.List;
import javax.ejb.Remote;
+import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException;
/**
* A remote interface for business contact data
public interface AdminBusinessDataSessionBeanRemote extends Serializable {
/**
- * Returns a list, even empty if not thing found, from all business
- * contacts. NULL should not be returned by this method.
+ * Adds basic business data to database, if not found. If found, a proper
+ * exception is being thrown.
* <p>
- * @return A list with all business contacts
+ * @param basicData Basic data to be persisted
+ * <p>
+ * @return Updated basic data
+ * <p>
+ * @throws BusinessDataAlreadyAddedException If the company name was already
+ * found
*/
- List<BusinessBasicData> allBusinessContacts ();
+ BusinessBasicData addCompanyBasicData (final BusinessBasicData basicData) throws BusinessDataAlreadyAddedException;
}
package org.mxchange.jcontactsbusiness.basicdata;
import java.io.Serializable;
+import java.util.List;
import javax.ejb.Remote;
import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataNotFoundException;
@Remote
public interface BusinessDataSessionBeanRemote 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 businessDataId Business data id to lookup
+ * @param companyDataId Company basic data id to lookup
* <p>
* @return Business contact instance
* <p>
* @throws BusinessDataNotFoundException If the id number could not be
* looked up and solved into an entity
*/
- BusinessBasicData findBusinessDataById (final Long businessDataId) throws BusinessDataNotFoundException;
+ BusinessBasicData findBasicDataById (final Long companyDataId) throws BusinessDataNotFoundException;
+
+ /**
+ * 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 ();
}
--- /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.branchoffice;
+
+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 AdminBranchOfficeSessionBeanRemote 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.branchoffice;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+
+/**
+ * A remote interface for business contact data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface BranchOfficeSessionBeanRemote extends Serializable {
+
+ /**
+ * Returns a list of all branch offices
+ * <p>
+ * @return All branch offices
+ */
+ List<BranchOffice> allBranchOffices ();
+
+}
/*
- * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
+ * 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
/**
* An interface for administrative purposes on handling company employee data
* <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
*/
@Remote
public interface AdminCompanyEmployeeSessionBeanRemote extends Serializable {
/*
- * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
+ * 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
/**
* An interface for company employee data being handled
* <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
*/
@Remote
public interface CompanyEmployeeSessionBeanRemote 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.headquarters;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+import org.mxchange.jcontactsbusiness.exceptions.headquarters.CompanyHeadquartersNotFoundException;
+
+/**
+ * A remote interface for company headquarters data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface CompanyHeadquartersSessionBeanRemote extends Serializable {
+
+ /**
+ * Tries to find company headquarters data by given id number. If not found,
+ * a proper exception is thrown.
+ * <p>
+ * @param headquartersId <p>
+ * @return Headquarters data entity
+ * <p>
+ * @throws CompanyHeadquartersNotFoundException If no headquarters data
+ * could be found
+ */
+ HeadquartersData findCompanyHeadquartersById (final Long headquartersId) throws CompanyHeadquartersNotFoundException;
+
+}