*/
@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());