void setAddressbookId (final Long addressbookId);
/**
- * Getter for addressbook creation timestamp
+ * Getter for addressbook created timestamp
* <p>
- * @return Addressbook creation timestamp
+ * @return Addressbook created timestamp
*/
Date getAddressbookCreated ();
/**
- * Setter for addressbook creation timestamp
+ * Setter for addressbook created timestamp
* <p>
- * @param addressbookCreated Addressbook creation timestamp
+ * @param addressbookCreated Addressbook created timestamp
*/
void setAddressbookCreated (final Date addressbookCreated);
+ /**
+ * Getter for addressbook updated timestamp
+ * <p>
+ * @return Addressbook updated timestamp
+ */
+ Date getAddressbookUpdated ();
+
+ /**
+ * Setter for addressbook updated timestamp
+ * <p>
+ * @param addressbookUpdated Addressbook updated timestamp
+ */
+ void setAddressbookUpdated (final Date addressbookUpdated);
+
/**
* Getter for addressbook's name
* <p>
*/
@Basic (optional = false)
@Temporal (value = TemporalType.TIMESTAMP)
- @Column (name = "addressbook_created", nullable = false, updatable = false)
+ @Column (name = "addressbook_created", updatable = false, nullable = false)
private Date addressbookCreated;
/**
@Column (name = "addressbook_status", nullable = false, length = 10)
private AddressbokStatus addressbookStatus;
+ /**
+ * When this address book has been created
+ */
+ @Temporal (value = TemporalType.TIMESTAMP)
+ @Column (name = "addressbook_updated", insertable = false, nullable = false)
+ private Date addressbookUpdated;
+
/**
* Connection to "users" table
*/
final Addressbook other = (Addressbook) object;
- if (!Objects.equals(this.getAddressbookName(), other.getAddressbookName())) {
+ if (!Objects.equals(this.getAddressbookId(), other.getAddressbookId())) {
+ return false;
+ } else if (!Objects.equals(this.getAddressbookLastLocked(), other.getAddressbookLastLocked())) {
+ return false;
+ } else if (!Objects.equals(this.getAddressbookLastLockedReason(), other.getAddressbookLastLockedReason())) {
+ return false;
+ } else if (!Objects.equals(this.getAddressbookName(), other.getAddressbookName())) {
+ return false;
+ } else if (!Objects.equals(this.getAddressbookStatus(), other.getAddressbookStatus())) {
return false;
} else if (!Objects.equals(this.getAddressbookUser(), other.getAddressbookUser())) {
return false;
this.addressbookStatus = addressbookStatus;
}
+ @Override
+ @SuppressWarnings ("ReturnOfDateField")
+ public Date getAddressbookUpdated () {
+ return this.addressbookUpdated;
+ }
+
+ @Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setAddressbookUpdated (final Date addressbookUpdated) {
+ this.addressbookUpdated = addressbookUpdated;
+ }
+
@Override
public User getAddressbookUser () {
return this.addressbookUser;
public int hashCode () {
int hash = 7;
+ hash = 59 * hash + Objects.hashCode(this.getAddressbookId());
+ hash = 59 * hash + Objects.hashCode(this.getAddressbookLastLocked());
+ hash = 59 * hash + Objects.hashCode(this.getAddressbookLastLockedReason());
hash = 59 * hash + Objects.hashCode(this.getAddressbookName());
+ hash = 59 * hash + Objects.hashCode(this.getAddressbookStatus());
hash = 59 * hash + Objects.hashCode(this.getAddressbookUser());
return hash;
*/
void setAddressbookEntryCreated (final Date addressbookEntryCreated);
+ /**
+ * Getter for entry updated timestamp
+ * <p>
+ * @return Entry updated timestamp
+ */
+ Date getAddressbookEntryUpdated ();
+
+ /**
+ * Setter for entry updated timestamp
+ * <p>
+ * @param addressbookEntryUpdated Entry updated timestamp
+ */
+ void setAddressbookEntryUpdated (final Date addressbookEntryUpdated);
+
/**
* Getter for private contact
* <p>
*/
@Basic (optional = false)
@Temporal (TemporalType.TIMESTAMP)
- @Column (name = "entry_created", nullable = false, updatable = false)
+ @Column (name = "entry_created", updatable = false, nullable = false)
private Date addressbookEntryCreated;
/**
@OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH)
private Contact addressbookEntryPrivateContact;
+ /**
+ * When this address book entry has been updated
+ */
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "entry_updated", insertable = false, nullable = false)
+ private Date addressbookEntryUpdated;
+
/**
* Connection to table "address books"
*/
if (!Objects.equals(this.getAddressbookEntryBusinessBasicData(), other.getAddressbookEntryBusinessBasicData())) {
return false;
+ } else if (!Objects.equals(this.getAddressbookEntryId(), other.getAddressbookEntryId())) {
+ return false;
} else if (!Objects.equals(this.getAddressbookEntryPrivateContact(), other.getAddressbookEntryPrivateContact())) {
return false;
} else if (!Objects.equals(this.getEntryAddressbook(), other.getEntryAddressbook())) {
this.addressbookEntryPrivateContact = addressbookEntryPrivateContact;
}
+ @Override
+ @SuppressWarnings ("ReturnOfDateField")
+ public Date getAddressbookEntryUpdated () {
+ return this.addressbookEntryUpdated;
+ }
+
+ @Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setAddressbookEntryUpdated (final Date addressbookEntryUpdated) {
+ this.addressbookEntryUpdated = addressbookEntryUpdated;
+ }
+
@Override
public Addressbook getEntryAddressbook () {
return this.entryAddressbook;
int hash = 3;
hash = 19 * hash + Objects.hashCode(this.getAddressbookEntryBusinessBasicData());
+ hash = 19 * hash + Objects.hashCode(this.getAddressbookEntryId());
hash = 19 * hash + Objects.hashCode(this.getAddressbookEntryPrivateContact());
hash = 19 * hash + Objects.hashCode(this.getEntryAddressbook());