file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
file.reference.jcountry-core.jar=lib/jcountry-core.jar
file.reference.jphone-core.jar=lib/jphone-core.jar
+file.reference.juser-core.jar=lib/juser-core.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=false
${file.reference.jcontacts-core.jar}:\
${file.reference.jcountry-core.jar}:\
${file.reference.jphone-core.jar}:\
+ ${file.reference.juser-core.jar}:\
${libs.jpa20-persistence.classpath}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
source.reference.jcontacts-core.jar=../jcontacts-core/src/
source.reference.jcountry-core.jar=../jcountry-code/src/
source.reference.jphone-core.jar=../jphone-core/src/
+source.reference.juser-core.jar=../juser-core/src/
src.dir=src
test.src.dir=test
package org.mxchange.jcontactsbusiness;
import java.io.Serializable;
+import java.util.Calendar;
import java.util.List;
import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
import org.mxchange.jcontactsbusiness.branch.BranchOffice;
import org.mxchange.jcontactsbusiness.employee.Employee;
import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for business contact classes
*/
void setHeadQuartersData (final HeadQuartersData headQuartersData);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getContactUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param contactUserOwner User owner instance
+ */
+ void setContactUserOwner (final User contactUserOwner);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getContactCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param contactCreated Timestamp when this entry has been created
+ */
+ void setContactCreated (final Calendar contactCreated);
+
@Override
- boolean equals (final Object object);
+ boolean equals (final Object object);
@Override
- int hashCode ();
+ int hashCode ();
}
*/
package org.mxchange.jcontactsbusiness;
+import java.util.Calendar;
import java.util.List;
import java.util.Objects;
+import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
import org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData;
import org.mxchange.jcontactsbusiness.employee.Employee;
import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData;
import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for business contacts
@OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL, optional = false)
private HeadQuartersData headQuartersData;
- @Override
- public int compareTo (final BusinessContact businessContact) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final BusinessContact other = (BusinessContact) object;
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User contactUserOwner;
- return Objects.equals(this.getBasicBusinessData(), other.getBasicBusinessData());
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "company_entry_created", nullable = false, updatable = false)
+ private Calendar contactCreated;
@Override
public BusinessBasicData getBasicBusinessData () {
this.companyFounder = companyFounder;
}
+ @Override
+ public Calendar getContactCreated () {
+ return this.contactCreated;
+ }
+
+ @Override
+ public void setContactCreated (final Calendar contactCreated) {
+ this.contactCreated = contactCreated;
+ }
+
+ @Override
+ public User getContactUserOwner () {
+ return this.contactUserOwner;
+ }
+
+ @Override
+ public void setContactUserOwner (final User contactUserOwner) {
+ this.contactUserOwner = contactUserOwner;
+ }
+
@Override
public List<Employee> getEmployees () {
return this.employees;
this.headQuartersData = headQuartersData;
}
+ @Override
+ public int compareTo (final BusinessContact businessContact) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final BusinessContact other = (BusinessContact) object;
+
+ return Objects.equals(this.getBasicBusinessData(), other.getBasicBusinessData());
+ }
+
@Override
public int hashCode () {
int hash = 3;
package org.mxchange.jcontactsbusiness.basicdata;
import java.io.Serializable;
+import java.util.Calendar;
import org.mxchange.jcontactsbusiness.logo.BusinessLogo;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for basic business data
*/
void setCompanyWebsiteUrl (final String companyWebsiteUrl);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getBasicUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param basicUserOwner User owner instance
+ */
+ void setBasicUserOwner (final User basicUserOwner);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getBasicCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param basicCreated Timestamp when this entry has been created
+ */
+ void setBasicCreated (final Calendar basicCreated);
+
@Override
boolean equals (final Object object);
*/
package org.mxchange.jcontactsbusiness.basicdata;
+import java.util.Calendar;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import org.mxchange.jcontactsbusiness.logo.BusinessLogo;
import org.mxchange.jcontactsbusiness.logo.CompanyLogo;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for basic company data
@Column (name = "company_website_url")
private String companyWebsiteUrl;
- @Override
- public int compareTo (final BusinessBasicData businessData) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final BusinessBasicData other = (BusinessBasicData) object;
-
- if (!Objects.equals(this.getCompanyLegalStatus(), other.getCompanyLegalStatus())) {
- return false;
- } else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) {
- return false;
- } else if (!Objects.equals(this.getCompanyTaxNumber(), other.getCompanyTaxNumber())) {
- return false;
- }
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User basicUserOwner;
- return true;
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "company_entry_created", nullable = false, updatable = false)
+ private Calendar basicCreated;
@Override
public Long getCompanyBasicId () {
this.companyWebsiteUrl = companyWebsiteUrl;
}
+ @Override
+ public Calendar getBasicCreated () {
+ return this.basicCreated;
+ }
+
+ @Override
+ public void setBasicCreated (final Calendar basicCreated) {
+ this.basicCreated = basicCreated;
+ }
+
+ @Override
+ public User getBasicUserOwner () {
+ return this.basicUserOwner;
+ }
+
+ @Override
+ public void setBasicUserOwner (final User basicUserOwner) {
+ this.basicUserOwner = basicUserOwner;
+ }
+
+ @Override
+ public int compareTo (final BusinessBasicData businessData) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final BusinessBasicData other = (BusinessBasicData) object;
+
+ if (!Objects.equals(this.getCompanyLegalStatus(), other.getCompanyLegalStatus())) {
+ return false;
+ } else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) {
+ return false;
+ } else if (!Objects.equals(this.getCompanyTaxNumber(), other.getCompanyTaxNumber())) {
+ return false;
+ }
+
+ return true;
+ }
+
@Override
public int hashCode () {
int hash = 5;
package org.mxchange.jcontactsbusiness.branch;
import java.io.Serializable;
+import java.util.Calendar;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for branch offices
*/
void setBranchCompanyContact (final Long branchCompanyContact);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getBranchUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param branchUserOwner User owner instance
+ */
+ void setBranchUserOwner (final User branchUserOwner);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getBranchCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param branchCreated Timestamp when this entry has been created
+ */
+ void setBranchCreated (final Calendar branchCreated);
+
@Override
boolean equals (final Object object);
*/
package org.mxchange.jcontactsbusiness.branch;
+import java.util.Calendar;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import org.mxchange.jcontactsbusiness.CompanyContact;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jcountry.data.CountryData;
import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for company branch offices
@Column (name = "branch_zip_code", length = 6, nullable = false)
private Integer branchZipCode;
- @Override
- public int compareTo (final BranchOffice branchOffice) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final BranchOffice other = (BranchOffice) object;
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "branch_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User branchUserOwner;
- if (!Objects.equals(this.getBranchCity(), other.getBranchCity())) {
- return false;
- }
- if (!Objects.equals(this.getBranchCountry(), other.getBranchCountry())) {
- return false;
- }
- if (!Objects.equals(this.getBranchHouseNumber(), other.getBranchHouseNumber())) {
- return false;
- }
- if (!Objects.equals(this.getBranchStore(), other.getBranchStore())) {
- return false;
- }
- if (!Objects.equals(this.getBranchStreet(), other.getBranchStreet())) {
- return false;
- }
- if (!Objects.equals(this.getBranchSuiteNumber(), other.getBranchSuiteNumber())) {
- return false;
- }
- if (!Objects.equals(this.getBranchZipCode(), other.getBranchZipCode())) {
- return false;
- }
- return true;
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "branch_entry_created", nullable = false, updatable = false)
+ private Calendar branchCreated;
@Override
public String getBranchCity () {
this.branchZipCode = branchZipCode;
}
+ @Override
+ public Calendar getBranchCreated () {
+ return this.branchCreated;
+ }
+
+ @Override
+ public void setBranchCreated (final Calendar branchCreated) {
+ this.branchCreated = branchCreated;
+ }
+
+ @Override
+ public User getBranchUserOwner () {
+ return this.branchUserOwner;
+ }
+
+ @Override
+ public void setBranchUserOwner (final User branchUserOwner) {
+ this.branchUserOwner = branchUserOwner;
+ }
+
+ @Override
+ public int compareTo (final BranchOffice branchOffice) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final BranchOffice other = (BranchOffice) object;
+
+ if (!Objects.equals(this.getBranchCity(), other.getBranchCity())) {
+ return false;
+ } else if (!Objects.equals(this.getBranchCountry(), other.getBranchCountry())) {
+ return false;
+ } else if (!Objects.equals(this.getBranchHouseNumber(), other.getBranchHouseNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getBranchStore(), other.getBranchStore())) {
+ return false;
+ } else if (!Objects.equals(this.getBranchStreet(), other.getBranchStreet())) {
+ return false;
+ } else if (!Objects.equals(this.getBranchSuiteNumber(), other.getBranchSuiteNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getBranchZipCode(), other.getBranchZipCode())) {
+ return false;
+ }
+
+ return true;
+ }
+
@Override
public int hashCode () {
int hash = 7;
*/
package org.mxchange.jcontactsbusiness.department;
+import java.util.Calendar;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import org.mxchange.jcontactsbusiness.BusinessContact;
import org.mxchange.jcontactsbusiness.CompanyContact;
import org.mxchange.jcontactsbusiness.branch.BranchOffice;
import org.mxchange.jcontactsbusiness.employee.Employee;
import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData;
import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for company departments
@Column (name = "department_name", length = 100, nullable = false)
private String departmentName;
- @Override
- public int compareTo (final Department department) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final Department other = (Department) object;
-
- if (!Objects.equals(this.getDepartmentCompany(), other.getDepartmentCompany())) {
- return false;
- } else if (!Objects.equals(this.getDepartmentName(), other.getDepartmentName())) {
- return false;
- }
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "department_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User departmentUserOwner;
- return true;
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "department_entry_created", nullable = false, updatable = false)
+ private Calendar departmentCreated;
@Override
public HeadQuartersData getDepartentHeadquarters () {
this.departmentName = departmentName;
}
+ @Override
+ public Calendar getDepartmentCreated () {
+ return this.departmentCreated;
+ }
+
+ @Override
+ public void setDepartmentCreated (final Calendar departmentCreated) {
+ this.departmentCreated = departmentCreated;
+ }
+
+ @Override
+ public User getDepartmentUserOwner () {
+ return this.departmentUserOwner;
+ }
+
+ @Override
+ public void setDepartmentUserOwner (final User departmentUserOwner) {
+ this.departmentUserOwner = departmentUserOwner;
+ }
+
+ @Override
+ public int compareTo (final Department department) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final Department other = (Department) object;
+
+ if (!Objects.equals(this.getDepartmentCompany(), other.getDepartmentCompany())) {
+ return false;
+ } else if (!Objects.equals(this.getDepartmentName(), other.getDepartmentName())) {
+ return false;
+ }
+
+ return true;
+ }
+
@Override
public int hashCode () {
int hash = 5;
package org.mxchange.jcontactsbusiness.department;
import java.io.Serializable;
+import java.util.Calendar;
import org.mxchange.jcontactsbusiness.BusinessContact;
import org.mxchange.jcontactsbusiness.branch.BranchOffice;
import org.mxchange.jcontactsbusiness.employee.Employee;
import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for company departments
*/
void setDepartmentName (final String departmentName);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getDepartmentUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param departmentUserOwner User owner instance
+ */
+ void setDepartmentUserOwner (final User departmentUserOwner);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getDepartmentCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param departmentCreated Timestamp when this entry has been created
+ */
+ void setDepartmentCreated (final Calendar departmentCreated);
+
@Override
boolean equals (final Object object);
*/
package org.mxchange.jcontactsbusiness.employee;
+import java.util.Calendar;
import java.util.Objects;
+import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontacts.contact.UserContact;
import org.mxchange.jcontactsbusiness.BusinessContact;
import org.mxchange.jcontactsbusiness.jobposition.JobPosition;
import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for company employees (including CEO)
* Employee's position (example: CEO)
*/
@JoinColumn (name = "employee_position_id")
- @OneToOne (targetEntity = EmployeePosition.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+ @OneToOne (targetEntity = EmployeePosition.class, cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
private JobPosition employeePosition;
- @Override
- public int compareTo (final Employee employee) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final Employee other = (Employee) object;
-
- if (!Objects.equals(this.getEmployeeCompany(), other.getEmployeeCompany())) {
- return false;
- } else if (!Objects.equals(this.getEmployeeNumber(), other.getEmployeeNumber())) {
- return false;
- } else if (!Objects.equals(this.getEmployeePersonalData(), other.getEmployeePersonalData())) {
- return false;
- }
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "employee_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User employeeUserOwner;
- return true;
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "employee_entry_created", nullable = false, updatable = false)
+ private Calendar employeeCreated;
@Override
public BranchOffice getEmployeeBranchOffice () {
this.employeePosition = employeePosition;
}
+ @Override
+ public Calendar getEmployeeCreated () {
+ return this.employeeCreated;
+ }
+
+ @Override
+ public void setEmployeeCreated (final Calendar employeeCreated) {
+ this.employeeCreated = employeeCreated;
+ }
+
+ @Override
+ public User getEmployeeUserOwner () {
+ return this.employeeUserOwner;
+ }
+
+ @Override
+ public void setEmployeeUserOwner (final User employeeUserOwner) {
+ this.employeeUserOwner = employeeUserOwner;
+ }
+
+ @Override
+ public int compareTo (final Employee employee) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final Employee other = (Employee) object;
+
+ if (!Objects.equals(this.getEmployeeCompany(), other.getEmployeeCompany())) {
+ return false;
+ } else if (!Objects.equals(this.getEmployeeNumber(), other.getEmployeeNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getEmployeePersonalData(), other.getEmployeePersonalData())) {
+ return false;
+ }
+
+ return true;
+ }
+
@Override
public int hashCode () {
int hash = 3;
package org.mxchange.jcontactsbusiness.employee;
import java.io.Serializable;
+import java.util.Calendar;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontactsbusiness.BusinessContact;
import org.mxchange.jcontactsbusiness.branch.BranchOffice;
import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
import org.mxchange.jcontactsbusiness.jobposition.JobPosition;
import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for employees
*/
void setEmployeePosition (final JobPosition employeePosition);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getEmployeeUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param employeeUserOwner User owner instance
+ */
+ void setEmployeeUserOwner (final User employeeUserOwner);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getEmployeeCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param employeeCreated Timestamp when this entry has been created
+ */
+ void setEmployeeCreated (final Calendar employeeCreated);
+
@Override
boolean equals (final Object object);
*/
package org.mxchange.jcontactsbusiness.headquarters;
+import java.util.Calendar;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jcountry.data.CountryData;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for company headquarts data
@Column (name = "headquarters_zip_code", length = 6, nullable = false)
private Integer headquartersZipCode;
- @Override
- public int compareTo (final HeadQuartersData headQuartersData) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final HeadQuartersData other = (HeadQuartersData) object;
-
- if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
- return false;
- } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
- return false;
- } else if (!Objects.equals(this.getHeadquartersHouseNumber(), other.getHeadquartersHouseNumber())) {
- return false;
- } else if (!Objects.equals(this.getHeadquartersStore(), other.getHeadquartersStore())) {
- return false;
- } else if (!Objects.equals(this.getHeadquartersStreet(), other.getHeadquartersStreet())) {
- return false;
- } else if (!Objects.equals(this.getHeadquartersSuiteNumber(), other.getHeadquartersSuiteNumber())) {
- return false;
- } else if (!Objects.equals(this.getHeadquartersZipCode(), other.getHeadquartersZipCode())) {
- return false;
- }
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "headquarters_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User headquartersUserOwner;
- return true;
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "headquarters_entry_created", nullable = false, updatable = false)
+ private Calendar headquartersCreated;
@Override
public String getHeadquartersCity () {
this.headquartersZipCode = headquartersZipCode;
}
+ @Override
+ public Calendar getHeadquartersCreated () {
+ return this.headquartersCreated;
+ }
+
+ @Override
+ public void setHeadquartersCreated (final Calendar headquartersCreated) {
+ this.headquartersCreated = headquartersCreated;
+ }
+
+ @Override
+ public User getHeadquartersUserOwner () {
+ return this.headquartersUserOwner;
+ }
+
+ @Override
+ public void setHeadquartersUserOwner (final User headquartersUserOwner) {
+ this.headquartersUserOwner = headquartersUserOwner;
+ }
+
+ @Override
+ public int compareTo (final HeadQuartersData headQuartersData) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final HeadQuartersData other = (HeadQuartersData) object;
+
+ if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
+ return false;
+ } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
+ return false;
+ } else if (!Objects.equals(this.getHeadquartersHouseNumber(), other.getHeadquartersHouseNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getHeadquartersStore(), other.getHeadquartersStore())) {
+ return false;
+ } else if (!Objects.equals(this.getHeadquartersStreet(), other.getHeadquartersStreet())) {
+ return false;
+ } else if (!Objects.equals(this.getHeadquartersSuiteNumber(), other.getHeadquartersSuiteNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getHeadquartersZipCode(), other.getHeadquartersZipCode())) {
+ return false;
+ }
+
+ return true;
+ }
+
@Override
public int hashCode () {
int hash = 7;
package org.mxchange.jcontactsbusiness.headquarters;
import java.io.Serializable;
+import java.util.Calendar;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for headquarters data
*/
void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getHeadquartersUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param headquartersUserOwner User owner instance
+ */
+ void setHeadquartersUserOwner (final User headquartersUserOwner);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getHeadquartersCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param headquartersCreated Timestamp when this entry has been created
+ */
+ void setHeadquartersCreated (final Calendar headquartersCreated);
+
@Override
boolean equals (final Object object);
*/
package org.mxchange.jcontactsbusiness.jobposition;
+import java.util.Calendar;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
/**
* A POJO for job positions
@Column (name = "job_position_name", length = 10, nullable = false, unique = true)
private String jobPositionName;
- @Override
- public int compareTo (final JobPosition jobPosition) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final JobPosition other = (JobPosition) object;
-
- if (!Objects.equals(this.getJobPositionName(), other.getJobPositionName())) {
- return false;
- }
- return true;
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "job_position_created", nullable = false, updatable = false)
+ private Calendar jobPositionCreated;
@Override
public Long getJobPositionId () {
this.jobPositionName = jobPositionName;
}
+ @Override
+ public Calendar getJobPositionCreated () {
+ return this.jobPositionCreated;
+ }
+
+ @Override
+ public void setJobPositionCreated (final Calendar jobPositionCreated) {
+ this.jobPositionCreated = jobPositionCreated;
+ }
+
+ @Override
+ public int compareTo (final JobPosition jobPosition) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final JobPosition other = (JobPosition) object;
+
+ return Objects.equals(this.getJobPositionName(), other.getJobPositionName());
+ }
+
@Override
public int hashCode () {
int hash = 7;
package org.mxchange.jcontactsbusiness.jobposition;
import java.io.Serializable;
+import java.util.Calendar;
/**
* A POJI for job positions
*/
void setJobPositionName (final String jobPositionName);
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getJobPositionCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param jobPositionCreated Timestamp when this entry has been created
+ */
+ void setJobPositionCreated (final Calendar jobPositionCreated);
+
@Override
boolean equals (final Object object);
package org.mxchange.jcontactsbusiness.logo;
import java.io.Serializable;
+import java.util.Calendar;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJI for business logos
*/
void setLogoId (final Long logoId);
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getLogoUploader ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param logoUploader User owner instance
+ */
+ void setLogoUploader (final User logoUploader);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getLogoCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param logoCreated Timestamp when this entry has been created
+ */
+ void setLogoCreated (final Calendar logoCreated);
+
@Override
boolean equals (final Object object);
*/
package org.mxchange.jcontactsbusiness.logo;
+import java.util.Calendar;
import java.util.Objects;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
/**
* A POJO for company logos
@Column (name = "logo_id", length = 20, nullable = false, updatable = false)
private Long logoId;
- @Override
- public int compareTo (final BusinessLogo businessLogo) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (getClass() != object.getClass()) {
- return false;
- }
-
- final BusinessLogo other = (BusinessLogo) object;
+ /**
+ * Logo uploader user instance
+ */
+ @JoinColumn (name = "logo_uploader_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User logoUploader;
- return Objects.equals(this.getLogoFileName(), other.getLogoFileName());
- }
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "logo_entry_created", nullable = false, updatable = false)
+ private Calendar logoCreated;
@Override
public String getLogoFileName () {
this.logoId = logoId;
}
+ @Override
+ public Calendar getLogoCreated () {
+ return this.logoCreated;
+ }
+
+ @Override
+ public void setLogoCreated (final Calendar logoCreated) {
+ this.logoCreated = logoCreated;
+ }
+
+ @Override
+ public User getLogoUploader () {
+ return this.logoUploader;
+ }
+
+ @Override
+ public void setLogoUploader (final User logoUploader) {
+ this.logoUploader = logoUploader;
+ }
+
+ @Override
+ public int compareTo (final BusinessLogo businessLogo) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (getClass() != object.getClass()) {
+ return false;
+ }
+
+ final BusinessLogo other = (BusinessLogo) object;
+
+ return Objects.equals(this.getLogoFileName(), other.getLogoFileName());
+ }
+
@Override
public int hashCode () {
int hash = 3;