title: How to get rev id right after auditing when using Hibernate Envers
body: <p>I'm using Hibernate Envers for auditing. It works fine. However, I'm try to get the rev id right after modifying the data. I have CustomRevisionEntity as below:</p>
  
  <pre><code>import javax.persistence.Entity; 
  import org.hibernate.envers.DefaultRevisionEntity;
  import org.hibernate.envers.RevisionEntity;
  
  @Entity
  @RevisionEntity(CustomRevisionListener.class)
  public class CustomRevisionEntity extends DefaultRevisionEntity {
  
    private static final long serialVersionUID = 3775550420286576001L;
  
    private String username;
  
    public String getUsername() {
        return username;
    }
  
    public void setUsername(String username) {
        this.username = username;
    }
  }
  </code></pre>
  
  <p>And CustomRevisionListener:</p>
  
  <pre><code>import org.golf.repository.domain.entity.CustomRevisionEntity;
  import org.hibernate.envers.RevisionListener;
  
  public class CustomRevisionListener implements RevisionListener {
  
      public void newRevision(Object revisionEntity) {
          CustomRevisionEntity revision = (CustomRevisionEntity) revisionEntity;
          revision.setUsername("username"); // For testing
      }  
  }
  </code></pre>
  
  <p>So, when for example update address like below, how to get the rev id?</p>
  
  <pre><code>public class TestClass {
      updateAddress(address);
  
      // how to get rev id here?
  }
  </code></pre>
  
  <p>Thanks!</p>