* <p>
* @return User owner instance
*/
- User getContactUserOwner ();
+ User getContactCompanyUserOwner ();
/**
* Setter for user owner instance
* <p>
* @param contactUserOwner User owner instance
*/
- void setContactUserOwner (final User contactUserOwner);
+ void setContactCompanyUserOwner (final User contactUserOwner);
/**
* Getter for timestamp when this entry has been created
@OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
private Employee companyFounder;
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "company_owner_user_id")
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH)
+ private User contactCompanyUserOwner;
+
/**
* Timestamp when this entry has been created
*/
@Column (name = "company_entry_created", nullable = false, updatable = false)
private Calendar contactCreated;
- /**
- * User owner instance
- */
- @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
- @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
- private User contactUserOwner;
-
/**
* Reference to headquarters data
*/
}
@Override
- @SuppressWarnings ("ReturnOfDateField")
- public Calendar getContactCreated () {
- return this.contactCreated;
+ public User getContactCompanyUserOwner () {
+ return this.contactCompanyUserOwner;
}
@Override
- @SuppressWarnings ("AssignmentToDateFieldFromParameter")
- public void setContactCreated (final Calendar contactCreated) {
- this.contactCreated = contactCreated;
+ public void setContactCompanyUserOwner (final User contactCompanyUserOwner) {
+ this.contactCompanyUserOwner = contactCompanyUserOwner;
}
@Override
- public User getContactUserOwner () {
- return this.contactUserOwner;
+ @SuppressWarnings ("ReturnOfDateField")
+ public Calendar getContactCreated () {
+ return this.contactCreated;
}
@Override
- public void setContactUserOwner (final User contactUserOwner) {
- this.contactUserOwner = contactUserOwner;
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setContactCreated (final Calendar contactCreated) {
+ this.contactCreated = contactCreated;
}
@Override