void setCompanyContact (final Employee companyContact);
/**
- * Getter for basic company data
+ * Getter for business contact id
* <p>
- * @return Basic company data
+ * @return Business contact id
*/
- Long getCompanyId ();
+ Long getBusinessContactId ();
/**
- * Setter for basic company data
+ * Setter for business contact id
* <p>
- * @param companyContactId Basic company data
+ * @param businessContactId Business contact id
*/
- void setCompanyId (final Long companyContactId);
+ void setBusinessContactId (final Long businessContactId);
/**
* Getter for company founder
@Transient
private List<BranchOffice> brancheOffices;
+ /**
+ * Id number
+ */
+ @Id
+ @Column (name = "business_contact_id", nullable = false, updatable = false)
+ @GeneratedValue (strategy = GenerationType.IDENTITY)
+ private Long businessContactId;
+
/**
* Reference to contact person
*/
@OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
private Employee companyFounder;
- /**
- * Id number
- */
- @Id
- @Column (name = "company_id", nullable = false, updatable = false)
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- private Long companyId;
-
/**
* Timestamp when this entry has been created
*/
final BusinessContact other = (BusinessContact) object;
- if (!Objects.equals(this.getCompanyId(), other.getCompanyId())) {
+ if (!Objects.equals(this.getBusinessContactId(), other.getBusinessContactId())) {
return false;
} else if (!Objects.equals(this.getCompanyContact(), other.getCompanyContact())) {
return false;
this.brancheOffices = brancheOffices;
}
+ @Override
+ public Long getBusinessContactId () {
+ return this.businessContactId;
+ }
+
+ @Override
+ public void setBusinessContactId (final Long businessContactId) {
+ this.businessContactId = businessContactId;
+ }
+
@Override
public Employee getCompanyContact () {
return this.companyContact;
this.companyFounder = companyFounder;
}
- @Override
- public Long getCompanyId () {
- return this.companyId;
- }
-
- @Override
- public void setCompanyId (final Long companyId) {
- this.companyId = companyId;
- }
-
@Override
@SuppressWarnings ("ReturnOfDateField")
public Calendar getContactCreated () {
public int hashCode () {
int hash = 3;
- hash = 37 * hash + Objects.hashCode(this.getCompanyId());
+ hash = 37 * hash + Objects.hashCode(this.getBusinessContactId());
hash = 37 * hash + Objects.hashCode(this.getCompanyContact());
hash = 37 * hash + Objects.hashCode(this.getCompanyFounder());
hash = 37 * hash + Objects.hashCode(this.getBasicBusinessData());