@Test public void prePersist() { Person built = Person.getBuilder(FIRST_NAME, LAST_NAME).build(); built.prePersist(); Date creationTime = built.getCreationTime(); Date modificationTime = built.getModificationTime(); assertNotNull(creationTime); assertNotNull(modificationTime); assertEquals(creationTime, modificationTime); }
@PrePersist public void prePersist() { Date now = new Date(); creationTime = now; modificationTime = now; }
Person { @PrePersist public void prePersist() { Date now = new Date(); creationTime = now; modificationTime = now; } }
Person { @PrePersist public void prePersist() { Date now = new Date(); creationTime = now; modificationTime = now; }  }
Person { @PrePersist public void prePersist() { Date now = new Date(); creationTime = now; modificationTime = now; }  Long getId(); static Builder getBuilder(String firstName, String lastName); Date getCreationTime(); String getFirstName(); String getLastName(); @Transient String getName(); Date getModificationTime(); long getVersion(); void update(String firstName, String lastName); @PreUpdate void preUpdate(); @PrePersist void prePersist(); @Override String toString(); void setId(Long id); }
Person { @PrePersist public void prePersist() { Date now = new Date(); creationTime = now; modificationTime = now; }  Long getId(); static Builder getBuilder(String firstName, String lastName); Date getCreationTime(); String getFirstName(); String getLastName(); @Transient String getName(); Date getModificationTime(); long getVersion(); void update(String firstName, String lastName); @PreUpdate void preUpdate(); @PrePersist void prePersist(); @Override String toString(); void setId(Long id);  }