*/
@Basic (optional = false)
@Temporal (TemporalType.TIMESTAMP)
- @Column (name = "share_created", nullable = false, updatable = false)
- private Date shareCreated;
+ @Column (name = "share_entry_created", updatable = false, nullable = false)
+ private Date shareEntryCreated;
+
+ /**
+ * When this share has been updated
+ */
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "share_entry_updated", insertable = false, nullable = false)
+ private Date shareEntryUpdated;
/**
* Id number
// ... next sharer
this.getShareUserOwner().compareTo(shareableAddressbook.getShareUserOwner()),
// ... next sharee
- this.getShareUserSharee().compareTo(shareableAddressbook.getShareUserSharee()),
- };
+ this.getShareUserSharee().compareTo(shareableAddressbook.getShareUserSharee()),};
// Check all values
final int comparison = Comparables.checkAll(comparators);
if (!Objects.equals(this.getShareAddressbook(), other.getShareAddressbook())) {
return false;
- } else if (!Objects.equals(this.getShareUserOwner(), other.getShareUserOwner())) {
+ } else if (!Objects.equals(this.getShareId(), other.getShareId())) {
return false;
} else if (!Objects.equals(this.getShareUserOwner(), other.getShareUserOwner())) {
return false;
+ } else if (!Objects.equals(this.getShareUserSharee(), other.getShareUserSharee())) {
+ return false;
}
return Objects.equals(this.getShareUserSharee(), other.getShareUserSharee());
@Override
@SuppressWarnings ("ReturnOfDateField")
- public Date getShareCreated () {
- return this.shareCreated;
+ public Date getShareEntryCreated () {
+ return this.shareEntryCreated;
+ }
+
+ @Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setShareEntryCreated (final Date shareEntryCreated) {
+ this.shareEntryCreated = shareEntryCreated;
+ }
+
+ @Override
+ @SuppressWarnings ("ReturnOfDateField")
+ public Date getShareEntryUpdated () {
+ return this.shareEntryUpdated;
}
@Override
@SuppressWarnings ("AssignmentToDateFieldFromParameter")
- public void setShareCreated (final Date shareCreated) {
- this.shareCreated = shareCreated;
+ public void setShareEntryUpdated (final Date shareEntryUpdated) {
+ this.shareEntryUpdated = shareEntryUpdated;
}
@Override
int hash = 7;
hash = 19 * hash + Objects.hashCode(this.getShareAddressbook());
+ hash = 19 * hash + Objects.hashCode(this.getShareId());
hash = 19 * hash + Objects.hashCode(this.getShareUserOwner());
hash = 19 * hash + Objects.hashCode(this.getShareUserSharee());
void setShareUserSharee (final User shareUserSharer);
/**
- * Getter for share creation timestamp
+ * Getter for share created timestamp
* <p>
- * @return Share creation timestamp
+ * @return Share created timestamp
*/
- Date getShareCreated ();
+ Date getShareEntryCreated ();
/**
- * Setter for share creation timestamp
+ * Setter for share created timestamp
* <p>
- * @param shareCreated Share creation timestamp
+ * @param shareCreated Share created timestamp
*/
- void setShareCreated (final Date shareCreated);
+ void setShareEntryCreated (final Date shareCreated);
+
+ /**
+ * Getter for share updated timestamp
+ * <p>
+ * @return Share updated timestamp
+ */
+ Date getShareEntryUpdated ();
+
+ /**
+ * Setter for share updated timestamp
+ * <p>
+ * @param shareUpdated Share updated timestamp
+ */
+ void setShareEntryUpdated (final Date shareUpdated);
@Override
boolean equals (final Object object);