@OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
private Employee companyFounder;
+ /**
+ * 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;
+
+ /**
+ * User owner instance
+ */
+ @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
+ @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+ private User contactUserOwner;
+
/**
* Reference to employee list
*/
@OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL, optional = false)
private HeadQuartersData headQuartersData;
- /**
- * User owner instance
- */
- @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
- @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
- private User contactUserOwner;
+ @Override
+ public int compareTo (final BusinessContact businessContact) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
- /**
- * 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 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 BusinessBasicData getBasicBusinessData () {
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;