arquillian / continuous-enterprise-development

Testable Solutions for Modern Applications
http://continuousdev.org/
116 stars 150 forks source link

Add created/updated time to Entities #41

Closed aslakknutsen closed 11 years ago

aslakknutsen commented 11 years ago

Can be used as Last-Modified in REST layer.

  @PrePersist
  protected void onCreate() {
    created = new Date();
  }

  @PreUpdate
  protected void onUpdate() {
    updated = new Date();
  }