org.hibernate.envers.test.entities.reventity.trackmodifiedentities
Class CustomTrackingRevisionListener

java.lang.Object
  extended by org.hibernate.envers.test.entities.reventity.trackmodifiedentities.CustomTrackingRevisionListener
All Implemented Interfaces:
EntityTrackingRevisionListener, RevisionListener

public class CustomTrackingRevisionListener
extends Object
implements EntityTrackingRevisionListener


Constructor Summary
CustomTrackingRevisionListener()
           
 
Method Summary
 void entityChanged(Class entityClass, String entityName, Serializable entityId, RevisionType revisionType, Object revisionEntity)
          Called after audited entity data has been persisted.
 void newRevision(Object revisionEntity)
          Called when a new revision is created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomTrackingRevisionListener

public CustomTrackingRevisionListener()
Method Detail

entityChanged

public void entityChanged(Class entityClass,
                          String entityName,
                          Serializable entityId,
                          RevisionType revisionType,
                          Object revisionEntity)
Description copied from interface: EntityTrackingRevisionListener
Called after audited entity data has been persisted.

Specified by:
entityChanged in interface EntityTrackingRevisionListener
Parameters:
entityClass - Audited entity class.
entityName - Name of the audited entity. May be useful when Java class is mapped multiple times, potentially to different tables.
entityId - Identifier of modified entity.
revisionType - Modification type (addition, update or removal).
revisionEntity - An instance of the entity annotated with RevisionEntity.

newRevision

public void newRevision(Object revisionEntity)
Description copied from interface: RevisionListener
Called when a new revision is created.

Specified by:
newRevision in interface RevisionListener
Parameters:
revisionEntity - An instance of the entity annotated with RevisionEntity, which will be persisted after this method returns. All properties on this entity that are to be persisted should be set by this method.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.