@Column (name = "job_position_name", nullable = false, unique = true)
private String jobPositionName;
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "job_position_updated", insertable = false)
+ private Calendar jobPositionUpdated;
+
@Override
public boolean equals (final Object object) {
- if (null == object) {
+ if (this == object) {
+ return true;
+ } else if (null == object) {
return false;
} else if (this.getClass() != object.getClass()) {
return false;
final JobPosition other = (JobPosition) object;
- return Objects.equals(this.getJobPositionName(), other.getJobPositionName());
+ if (!Objects.equals(this.getJobPositionName(), other.getJobPositionName())) {
+ return false;
+ } else if (!Objects.equals(this.getJobPositionId(), other.getJobPositionId())) {
+ return false;
+ }
+
+ return true;
}
@Override
public int hashCode () {
int hash = 7;
+
+ hash = 37 * hash + Objects.hashCode(this.getJobPositionId());
hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
+
return hash;
}
this.jobPositionName = jobPositionName;
}
+ @Override
+ @SuppressWarnings ("ReturnOfDateField")
+ public Calendar getJobPositionUpdated () {
+ return this.jobPositionUpdated;
+ }
+
+ @Override
+ @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+ public void setJobPositionUpdated (final Calendar jobPositionUpdated) {
+ this.jobPositionUpdated = jobPositionUpdated;
+ }
+
}
*/
void setJobPositionCreated (final Calendar jobPositionCreated);
+ /**
+ * Getter for timestamp when this entry has been updated
+ * <p>
+ * @return Timestamp when this entry has been updated
+ */
+ Calendar getJobPositionUpdated ();
+
+ /**
+ * Setter for timestamp when this entry has been updated
+ * <p>
+ * @param jobPositionUpdated Timestamp when this entry has been updated
+ */
+ void setJobPositionUpdated (final Calendar jobPositionUpdated);
+
@Override
boolean equals (final Object object);