1 package de.spring.example.persistence.domain.audit;
3 import javax.persistence.Entity;
4 import javax.persistence.Table;
6 import org.hibernate.envers.RevisionEntity;
9 @RevisionEntity(MyCustomRevisionListener.class)
10 @Table(name="CUSTOM_REVISION", schema="mybatis_example")
11 public class MyCustomRevision {
12 private String username;
14 // It will be used by JPA when filling the property fields with data coming from data base.
15 protected MyCustomRevision() {
19 // It will be used by my code (for example by Unit Tests)
20 public MyCustomRevision(String username) {
21 this.username = username;
25 * WARNING: JPA REQUIRES GETTERS!!!
28 public String getUsername() {
32 public void setUsername(String username) {
33 this.username = username;