@OneToOne (targetEntity = BusinessBranchOffice.class, cascade = CascadeType.REFRESH)
private BranchOffice employeeBranchOffice;
- /**
- * Timestamp when this entry has been created
- */
- @Basic (optional = false)
- @Temporal (TemporalType.TIMESTAMP)
- @Column (name = "employee_entry_created", nullable = false, updatable = false)
- private Date employeeCreated;
-
/**
* Department the employee works at
*/
@Column (name = "employee_email_address", length = 30)
private String employeeEmailAddress;
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "employee_entry_created", nullable = false, updatable = false)
+ private Date employeeEntryCreated;
+
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "employee_entry_updated", insertable = false)
+ private Date employeeEntryUpdated;
+
/**
* Head quarters id number (if the employee works there)
*/
// ... branch office
BranchOffices.compare(this.getEmployeeBranchOffice(), employable.getEmployeeBranchOffice()),
// ... next headquarters
- Headquarters.compare(this.getEmployeeHeadquarter(), employable.getEmployeeHeadquarter()),
- };
+ Headquarters.compare(this.getEmployeeHeadquarter(), employable.getEmployeeHeadquarter()),};
// Check all values
final int comparison = Comparables.checkAll(comparators);
this.employeeBranchOffice = employeeBranchOffice;
}
- @Override
- @SuppressWarnings ("ReturnOfDateField")
- public Date getEmployeeCreated () {
- return this.employeeCreated;
- }
-
- @Override
- @SuppressWarnings ("AssignmentToDateFieldFromParameter")
- public void setEmployeeCreated (final Date employeeCreated) {
- this.employeeCreated = employeeCreated;
- }
-
@Override
public Department getEmployeeDepartment () {
return this.employeeDepartment;
this.employeeEmailAddress = employeeEmailAddress;
}
+ @Override
+ @SuppressWarnings ("ReturnOfDateField")
+ public Date getEmployeeEntryCreated () {
+ return this.employeeEntryCreated;
+ }
+
+ @Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setEmployeeEntryCreated (final Date employeeEntryCreated) {
+ this.employeeEntryCreated = employeeEntryCreated;
+ }
+
+ @Override
+ @SuppressWarnings ("ReturnOfDateField")
+ public Date getEmployeeEntryUpdated () {
+ return this.employeeEntryUpdated;
+ }
+
+ @Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setEmployeeEntryUpdated (final Date employeeEntryUpdated) {
+ this.employeeEntryUpdated = employeeEntryUpdated;
+ }
+
@Override
public Headquarter getEmployeeHeadquarter () {
return this.employeeHeadquarter;
* <p>
* @return Timestamp when this entry has been created
*/
- Date getEmployeeCreated ();
+ Date getEmployeeEntryCreated ();
/**
* Setter for timestamp when this entry has been created
* <p>
* @param employeeCreated Timestamp when this entry has been created
*/
- void setEmployeeCreated (final Date employeeCreated);
+ void setEmployeeEntryCreated (final Date employeeCreated);
+
+ /**
+ * Getter for timestamp when this entry has been updated
+ * <p>
+ * @return Timestamp when this entry has been updated
+ */
+ Date getEmployeeEntryUpdated ();
+
+ /**
+ * Setter for timestamp when this entry has been updated
+ * <p>
+ * @param employeeUpdated Timestamp when this entry has been updated
+ */
+ void setEmployeeEntryUpdated (final Date employeeUpdated);
@Override
boolean equals (final Object object);