import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
import org.mxchange.jcontactsbusiness.model.employee.Employable;
import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
import org.mxchange.jcontactsbusiness.model.logo.BusinessLogo;
import org.mxchange.jcontactsbusiness.model.logo.Logo;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
import org.mxchange.jusercore.model.user.LoginUser;
import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJO for business basic data
@NamedQueries (
{
@NamedQuery (name = "AllBusinessData", query = "SELECT b FROM company_basic_data AS b ORDER BY b.basicDataId"),
- @NamedQuery (name = "SearchBusinessDataById", query = "SELECT b FROM company_basic_data AS b WHERE b.basicDataId = :basicDataId")
}
)
@SuppressWarnings ("PersistenceUnitPresent")
import javax.persistence.Transient;
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.model.contact.UserContact;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
import org.mxchange.jcontactsbusiness.model.branchoffice.BusinessBranchOffice;
import org.mxchange.jcontactsbusiness.model.department.BusinessDepartment;
import org.mxchange.jcontactsbusiness.model.department.Department;
import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
import org.mxchange.jcontactsbusiness.model.jobposition.EmployeePosition;
import org.mxchange.jcontactsbusiness.model.jobposition.JobPosition;
import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
import org.mxchange.jusercore.model.user.LoginUser;
import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJO for company employees (including CEO)
@NamedQueries (
{
@NamedQuery (name = "AllEmployees", query = "SELECT e FROM company_employees AS e ORDER BY e.employeeId ASC"),
- @NamedQuery (name = "SearchEmployeeById", query = "SELECT e FROM company_employees AS e WHERE e.employeeId = :employeeId")
}
)
@SuppressWarnings ("PersistenceUnitPresent")
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
*/
@Entity (name = "company_headquarters")
@Table (name = "company_headquarters")
+@NamedQueries (
+ {
+ @NamedQuery (name = "AllHeadquarters", query = "SELECT hq FROM company_headquarters AS hq ORDER BY hq.headquartersId ASC")
+ }
+)
@SuppressWarnings ("PersistenceUnitPresent")
public class BusinessHeadquarters implements Headquarter {
/**
* Email address of headquarters
*/
- @Column( name = "headquarters_email_address")
+ @Column (name = "headquarters_email_address")
private String headquartersEmailAddress;
/**
// Validate parameters
if (null == headquartersCity) {
// Throw NPE
- throw new NullPointerException("headquartersCity is null");
+ throw new NullPointerException("headquartersCity is null"); //NOI18N
} else if (headquartersCity.isEmpty()) {
// Throw IAE
- throw new IllegalArgumentException("headquartersCity is empty");
+ throw new IllegalArgumentException("headquartersCity is empty"); //NOI18N
} else if (null == headquartersCountry) {
// Throw NPE
- throw new NullPointerException("headquartersCountry is null");
+ throw new NullPointerException("headquartersCountry is null"); //NOI18N
} else if (headquartersCountry.getCountryId() == null) {
// Throw NPE again
- throw new NullPointerException("headquartersCountry.countryId is null");
+ throw new NullPointerException("headquartersCountry.countryId is null"); //NOI18N
} else if (headquartersCountry.getCountryId() < 1) {
// Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("headquartersCountry.countryId={0} is not valid.", headquartersCountry.getCountryId()));
+ throw new IllegalArgumentException(MessageFormat.format("headquartersCountry.countryId={0} is not valid.", headquartersCountry.getCountryId())); //NOI18N
} else if (null == headquartersHouseNumber) {
// Throw NPE
- throw new NullPointerException("headquartersHouseNumber is null");
- } else if (headquartersHouseNumber <1) {
+ throw new NullPointerException("headquartersHouseNumber is null"); //NOI18N
+ } else if (headquartersHouseNumber < 1) {
// Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("headquartersHouseNumber={0} is invalid.", headquartersHouseNumber));
+ throw new IllegalArgumentException(MessageFormat.format("headquartersHouseNumber={0} is invalid.", headquartersHouseNumber)); //NOI18N
} else if (null == headquartersStreet) {
// Throw NPE
- throw new NullPointerException("headquartersStreet is null");
+ throw new NullPointerException("headquartersStreet is null"); //NOI18N
} else if (headquartersStreet.isEmpty()) {
// Throw IAE
- throw new IllegalArgumentException("headquartersStreet is empty");
+ throw new IllegalArgumentException("headquartersStreet is empty"); //NOI18N
} else if (null == headquartersZipCode) {
// Throw NPE
- throw new NullPointerException("headquartersZipCode is null");
- } else if (headquartersZipCode <1) {
+ throw new NullPointerException("headquartersZipCode is null"); //NOI18N
+ } else if (headquartersZipCode < 1) {
// Throw IAE
- throw new IllegalArgumentException(MessageFormat.format("headquartersZipCode={0} is invalid.", headquartersZipCode));
+ throw new IllegalArgumentException(MessageFormat.format("headquartersZipCode={0} is invalid.", headquartersZipCode)); //NOI18N
}
// Set all fields