package net.sourceforge.fenixedu.domain; import java.io.Serializable; import org.joda.time.DateTime; @SuppressWarnings("serial") public class UpdateTimestamp implements Serializable { private DateTime date; public UpdateTimestamp() { this.date = new DateTime(); } public UpdateTimestamp(DateTime date) { this.date = date; } public DateTime getDate() { return date; } public DateTime externalize() { date = new DateTime(); return date; } public int hashCode() { return date.hashCode(); } public boolean equals(Object o) { if (o instanceof UpdateTimestamp) { UpdateTimestamp other = (UpdateTimestamp) o; return date.equals(other.getDate()); } return false; } }