@PrePersist
public void prePersist(Object object) {
System.out.println("prePersist");
if(object instanceof Timestamped){
System.out.println("Setting timestamps.");
Timestamped timestamped = (Timestamped) object;
Date now = new Date();
timestamped.setCreated(now);
timestamped.setUpdated(now);
}
}