* <p>
* @return Timestamp when this entry has been created
*/
- Date getBranchCreated ();
+ Date getBranchEntryCreated ();
/**
* Setter for timestamp when this entry has been created
* <p>
* @param branchCreated Timestamp when this entry has been created
*/
- void setBranchCreated (final Date branchCreated);
+ void setBranchEntryCreated (final Date branchCreated);
+
+ /**
+ * Getter for timestamp when this entry has been updated
+ * <p>
+ * @return Timestamp when this entry has been updated
+ */
+ Date getBranchEntryUpdated ();
+
+ /**
+ * Setter for timestamp when this entry has been updated
+ * <p>
+ * @param branchUpdated Timestamp when this entry has been updated
+ */
+ void setBranchEntryUpdated (final Date branchUpdated);
@Override
boolean equals (final Object object);
@Override
int hashCode ();
+
}
@OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
private Country branchCountry;
+ /**
+ * Branch office's main email address (example: branch-name@company.com)
+ */
+ @Column (name = "branch_email_address", length = 100)
+ private String branchEmailAddress;
+
/**
* Timestamp when this entry has been created
*/
@Basic (optional = false)
@Temporal (TemporalType.TIMESTAMP)
@Column (name = "branch_entry_created", nullable = false, updatable = false)
- private Date branchCreated;
+ private Date branchEntryCreated;
/**
- * Branch office's main email address (example: branch-name@company.com)
+ * Timestamp when this entry has been created
*/
- @Column (name = "branch_email_address", length = 100)
- private String branchEmailAddress;
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "branch_entry_updated", insertable = false)
+ private Date branchEntryUpdated;
/**
* Branch office's main fax number: +ccxxxxxxxxxx
// @todo Maybe a bit unsafe cast?
final BranchOffice branchOffice = (BranchOffice) object;
- if (!Objects.equals(this.getBranchId(), branchOffice.getBranchId())) {
- return false;
- } else if (!Objects.equals(this.getBranchCity(), branchOffice.getBranchCity())) {
+ if (!Objects.equals(this.getBranchCity(), branchOffice.getBranchCity())) {
return false;
} else if (!Objects.equals(this.getBranchCountry(), branchOffice.getBranchCountry())) {
return false;
this.branchCountry = branchCountry;
}
+ @Override
+ public String getBranchEmailAddress () {
+ return this.branchEmailAddress;
+ }
+
+ @Override
+ public void setBranchEmailAddress (final String branchEmailAddress) {
+ this.branchEmailAddress = branchEmailAddress;
+ }
+
@Override
@SuppressWarnings ("ReturnOfDateField")
- public Date getBranchCreated () {
- return this.branchCreated;
+ public Date getBranchEntryCreated () {
+ return this.branchEntryCreated;
}
@Override
@SuppressWarnings ("AssignmentToDateFieldFromParameter")
- public void setBranchCreated (final Date branchCreated) {
- this.branchCreated = branchCreated;
+ public void setBranchEntryCreated (final Date branchEntryCreated) {
+ this.branchEntryCreated = branchEntryCreated;
}
@Override
- public String getBranchEmailAddress () {
- return this.branchEmailAddress;
+ @SuppressWarnings ("ReturnOfDateField")
+ public Date getBranchEntryUpdated () {
+ return this.branchEntryUpdated;
}
@Override
- public void setBranchEmailAddress (final String branchEmailAddress) {
- this.branchEmailAddress = branchEmailAddress;
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setBranchEntryUpdated (final Date branchEntryUpdated) {
+ this.branchEntryUpdated = branchEntryUpdated;
}
@Override
public int hashCode () {
int hash = 7;
- hash = 53 * hash + Objects.hashCode(this.getBranchId());
hash = 53 * hash + Objects.hashCode(this.getBranchCity());
hash = 53 * hash + Objects.hashCode(this.getBranchCountry());
hash = 53 * hash + Objects.hashCode(this.getBranchNumber());