private BusinessBasicData basicBusinessData;
/**
- * Reference to company branch offfices
+ * Reference to company branch offices
*/
@Transient
private List<BranchOffice> brancheOffices;
@OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
private Employee companyContact;
- /**
- * Id number
- */
- @Id
- @Column (name = "company_id", nullable = false, updatable = false)
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- private Long companyContactId;
-
/**
* Reference to CEO "employee"
*/
@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.getCompanyContactId(), other.getCompanyContactId())) {
+ if (!Objects.equals(this.getCompanyId(), other.getCompanyId())) {
return false;
} else if (!Objects.equals(this.getCompanyContact(), other.getCompanyContact())) {
return false;
}
@Override
- public Long getCompanyContactId () {
- return this.companyContactId;
+ public Employee getCompanyFounder () {
+ return this.companyFounder;
}
@Override
- public void setCompanyContactId (final Long companyContactId) {
- this.companyContactId = companyContactId;
+ public void setCompanyFounder (final Employee companyFounder) {
+ this.companyFounder = companyFounder;
}
@Override
- public Employee getCompanyFounder () {
- return this.companyFounder;
+ public Long getCompanyId () {
+ return this.companyId;
}
@Override
- public void setCompanyFounder (final Employee companyFounder) {
- this.companyFounder = companyFounder;
+ public void setCompanyId (final Long companyId) {
+ this.companyId = companyId;
}
@Override
public int hashCode () {
int hash = 3;
- hash = 37 * hash + Objects.hashCode(this.getCompanyContactId());
+ hash = 37 * hash + Objects.hashCode(this.getCompanyId());
hash = 37 * hash + Objects.hashCode(this.getCompanyContact());
hash = 37 * hash + Objects.hashCode(this.getCompanyFounder());
hash = 37 * hash + Objects.hashCode(this.getBasicBusinessData());