private Long companyBasicId;
/**
- * Company name
+ * Comments (any)
*/
- @Basic (optional = false)
- @Column (name = "company_name", length = 100, nullable = false, unique = true)
- private String companyName;
+ @Lob
+ @Column (name = "company_comments")
+ private String companyComments;
+
+ /**
+ * Company's main email address (example: info@company.com)
+ */
+ @Column (name = "company_email_address", length = 100)
+ private String companyEmailAddress;
+
+ /**
+ * Company's main fax numbers: +ccxxxxxxxxxx
+ */
+ @JoinColumn (name = "company_fax_number_id")
+ @OneToMany (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
+ private List<DialableFaxNumber> companyFaxNumberList;
/**
* Legal status of company (example: "Inc.", "GmbH")
private BusinessLogo companyLogo;
/**
- * Tax number
+ * Company name
*/
@Basic (optional = false)
- @Column (name = "company_tax_number", length = 30)
- private String companyTaxNumber;
-
- /**
- * URL for company website
- */
- @Column (name = "company_website_url")
- private String companyWebsiteUrl;
+ @Column (name = "company_name", length = 100, nullable = false)
+ private String companyName;
/**
* Company's main phone number: +ccxxxxxxxxxx
private List<DialableLandLineNumber> companyPhoneNumber;
/**
- * Company's main fax numbers: +ccxxxxxxxxxx
- */
- @JoinColumn (name = "company_fax_number_id")
- @OneToMany (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
- private List<DialableFaxNumber> companyFaxNumberList;
-
- /**
- * Company's main email address (example: info@company.com)
+ * Tax number
*/
- @Column (name = "company_email_address", length = 100)
- private String companyEmailAddress;
+ @Column (name = "company_tax_number", length = 30)
+ private String companyTaxNumber;
/**
- * Comments (any)
+ * URL for company website
*/
- @Lob
- @Column (name = "company_comments")
- private String companyComments;
+ @Column (name = "company_website_url")
+ private String companyWebsiteUrl;
@Override
public int compareTo (final BusinessBasicData businessData) {
private static final long serialVersionUID = 47_957_817_276_871_852L;
/**
- * Id number
- */
- @Id
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- @Column (name = "branch_id", length = 20, nullable = false, updatable = false)
- private Long branchId;
-
- /**
- * Branch office's street name
- */
- @Basic (optional = false)
- @Column (name = "branch_street", length = 100, nullable = false)
- private String branchStreet;
-
- /**
- * Branch office's house number
+ * Branch office's city name
*/
@Basic (optional = false)
- @Column (name = "branch_house_number", length = 3, nullable = false)
- private Short branchHouseNumber;
+ @Column (name = "branch_city", length = 100, nullable = false)
+ private String branchCity;
/**
- * Branch office's store (if multiple-store building)
+ * Branch office's country code
*/
- @Column (name = "branch_store", length = 3)
- private Short branchStore;
+ @JoinColumn (name = "branch_country_id", nullable = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
+ private Country branchCountry;
/**
- * Branch office's suite number (if applyable)
+ * Branch office's main email address (example: branch-name@company.com)
*/
- @Column (name = "branch_suite_number", length = 4)
- private Short branchSuiteNumber;
+ @Column (name = "branch_email_address", length = 100)
+ private String branchEmailAddress;
/**
- * Branch office's ZIP code
+ * Branch office's main fax number: +ccxxxxxxxxxx
*/
- @Basic (optional = false)
- @Column (name = "branch_zip_code", length = 6, nullable = false)
- private Integer branchZipCode;
+ @JoinColumn (name = "branch_fax_number_id")
+ @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
+ private DialableFaxNumber branchFaxNumber;
/**
- * Branch office's city name
+ * Branch office's house number
*/
@Basic (optional = false)
- @Column (name = "branch_city", length = 100, nullable = false)
- private String branchCity;
+ @Column (name = "branch_house_number", length = 3, nullable = false)
+ private Short branchHouseNumber;
/**
- * Branch office's country code
+ * Id number
*/
- @JoinColumn (name = "branch_country_id", nullable = false)
- @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
- private Country branchCountry;
+ @Id
+ @GeneratedValue (strategy = GenerationType.IDENTITY)
+ @Column (name = "branch_id", length = 20, nullable = false, updatable = false)
+ private Long branchId;
/**
* Branch office's main phone number: +ccxxxxxxxxxx
private DialableLandLineNumber branchPhoneNumber;
/**
- * Branch office's main fax number: +ccxxxxxxxxxx
+ * Branch office's store (if multiple-store building)
*/
- @JoinColumn (name = "branch_fax_number_id")
- @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
- private DialableFaxNumber branchFaxNumber;
+ @Column (name = "branch_store", length = 3)
+ private Short branchStore;
/**
- * Branch office's main email address (example: branch-name@company.com)
+ * Branch office's street name
*/
- @Column (name = "branch_email_address", length = 100)
- private String branchEmailAddress;
+ @Basic (optional = false)
+ @Column (name = "branch_street", length = 100, nullable = false)
+ private String branchStreet;
+
+ /**
+ * Branch office's suite number (if applyable)
+ */
+ @Column (name = "branch_suite_number", length = 4)
+ private Short branchSuiteNumber;
+
+ /**
+ * Branch office's ZIP code
+ */
+ @Basic (optional = false)
+ @Column (name = "branch_zip_code", length = 6, nullable = false)
+ private Integer branchZipCode;
@Override
public int compareTo (final BranchOffice branchOffice) {
this.branchHouseNumber = branchHouseNumber;
}
+ @Override
+ public Long getBranchId () {
+ return this.branchId;
+ }
+
+ @Override
+ public void setBranchId (final Long branchId) {
+ this.branchId = branchId;
+ }
+
@Override
public DialableLandLineNumber getBranchPhoneNumber () {
return this.branchPhoneNumber;
public void setBranchZipCode (final Integer branchZipCode) {
this.branchZipCode = branchZipCode;
}
-
- @Override
- public Long getBranchId () {
- return this.branchId;
- }
-
- @Override
- public void setBranchId (final Long branchId) {
- this.branchId = branchId;
- }
}
*/
package org.mxchange.jcontactsbusiness.employee;
-import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
*/
private static final long serialVersionUID = 48_959_819_859_812_076L;
- /**
- * Id number
- */
- @Id
- @Column (name = "employee_id", length = 20, nullable = false, updatable = false)
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- private Long employeeId;
-
/**
* Branch office the employee works at
*/
@JoinColumn (name = "employee_branch_id")
- @OneToOne (targetEntity = CompanyBranchOffice.class, cascade = CascadeType.ALL, orphanRemoval = true)
+ @OneToOne (targetEntity = CompanyBranchOffice.class, cascade = CascadeType.ALL)
private BranchOffice employeeBranchOffice;
/**
* Department the employee works at
*/
- @JoinColumn (name = "employee_department_id", nullable = false)
- @OneToOne (targetEntity = CompanyDepartment.class, cascade = CascadeType.ALL, optional = false)
+ @JoinColumn (name = "employee_department_id")
+ @OneToOne (targetEntity = CompanyDepartment.class, cascade = CascadeType.ALL)
private Department employeeDepartment;
/**
@Column (name = "employee_email_address", length = 30)
private String employeeEmailAddress;
+ /**
+ * Id number
+ */
+ @Id
+ @Column (name = "employee_id", length = 20, nullable = false, updatable = false)
+ @GeneratedValue (strategy = GenerationType.IDENTITY)
+ private Long employeeId;
+
/**
* Employee's business mobile number
*/
/**
* Employee's number
*/
- @Basic (optional = false)
- @Column (name = "employee_number", length = 20, nullable = false)
+ @Column (name = "employee_number", length = 20)
private String employeeNumber;
/**
/**
* Employee's position (example: CEO)
*/
- @JoinColumn (name = "employee_position_id", nullable = false)
- @OneToOne (targetEntity = EmployeePosition.class, optional = false, cascade = CascadeType.ALL)
+ @JoinColumn (name = "employee_position_id")
+ @OneToOne (targetEntity = EmployeePosition.class, cascade = CascadeType.ALL)
private JobPosition employeePosition;
@Override
@OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
private Country headquartersCountry;
+ /**
+ * Headquarters' fax number
+ */
+ @JoinColumn (name = "headquarters_fax_number_id")
+ @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
+ private DialableFaxNumber headquartersFaxNumber;
+
/**
* Headquarters' house number
*/
@Column (name = "headquarters_id", length = 20, nullable = false, updatable = false)
private Long headquartersId;
+ /**
+ * Headquarters' phone number
+ */
+ @JoinColumn (name = "headquarters_phone_number_id")
+ @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
+ private DialableLandLineNumber headquartersPhoneNumber;
+
/**
* Headquarters' store number (multi-store building only)
*/
@Column (name = "headquarters_zip_code", length = 6, nullable = false)
private Integer headquartersZipCode;
- /**
- * Headquarters' phone number
- */
- @JoinColumn (name = "headquarters_phone_number_id")
- @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
- private DialableLandLineNumber headquartersPhoneNumber;
-
- /**
- * Headquarters' fax number
- */
- @JoinColumn (name = "headquarters_fax_number_id")
- @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
- private DialableFaxNumber headquartersFaxNumber;
-
@Override
public int compareTo (final HeadQuartersData headQuartersData) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
this.headquartersCountry = headquartersCountry;
}
+ @Override
+ public DialableFaxNumber getHeadquartersFaxNumber () {
+ return this.headquartersFaxNumber;
+ }
+
+ @Override
+ public void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber) {
+ this.headquartersFaxNumber = headquartersFaxNumber;
+ }
+
@Override
public Short getHeadquartersHouseNumber () {
return this.headquartersHouseNumber;
this.headquartersId = headquartersId;
}
+ @Override
+ public DialableLandLineNumber getHeadquartersPhoneNumber () {
+ return this.headquartersPhoneNumber;
+ }
+
+ @Override
+ public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) {
+ this.headquartersPhoneNumber = headquartersPhoneNumber;
+ }
+
@Override
public Short getHeadquartersStore () {
return this.headquartersStore;
public void setHeadquartersZipCode (final Integer headquartersZipCode) {
this.headquartersZipCode = headquartersZipCode;
}
-
- @Override
- public DialableLandLineNumber getHeadquartersPhoneNumber () {
- return this.headquartersPhoneNumber;
- }
-
- @Override
- public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) {
- this.headquartersPhoneNumber = headquartersPhoneNumber;
- }
-
- @Override
- public DialableFaxNumber getHeadquartersFaxNumber () {
- return this.headquartersFaxNumber;
- }
-
- @Override
- public void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber) {
- this.headquartersFaxNumber = headquartersFaxNumber;
- }
}
*/
public interface BusinessLogo extends Serializable {
+ /**
+ * Getter for logo's local file name
+ * <p>
+ * @return Logo's local file name
+ */
+ public String getLogoFileName ();
+
+ /**
+ * Setter for logo's local file name
+ * <p>
+ * @param logoFileName Logo's local file name
+ */
+ public void setLogoFileName (final String logoFileName);
+
/**
* Getter for logo's id number
* <p>
*/
package org.mxchange.jcontactsbusiness.logo;
+import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
*/
private static final long serialVersionUID = 475_871_875_718_751_285L;
+ /**
+ * Local file name of the logo (relative to /resources/logos/)
+ */
+ @Basic (optional = false)
+ @Column (name = "logo_file_name", nullable = false, unique = true, updatable = false)
+ private String logoFileName;
+
/**
* Id number
*/
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
+ @Override
+ public String getLogoFileName () {
+ return this.logoFileName;
+ }
+
+ @Override
+ public void setLogoFileName (final String logoFileName) {
+ this.logoFileName = logoFileName;
+ }
+
@Override
public Long getLogoId () {
return this.logoId;
public void setLogoId (final Long logoId) {
this.logoId = logoId;
}
-
}