Class AbstractAuditWorkUnit

java.lang.Object
org.hibernate.envers.internal.synchronization.work.AbstractAuditWorkUnit
All Implemented Interfaces:
AuditWorkUnit, WorkUnitMergeDispatcher, WorkUnitMergeVisitor
Direct Known Subclasses:
AddWorkUnit, CollectionChangeWorkUnit, DelWorkUnit, FakeBidirectionalRelationWorkUnit, ModWorkUnit, PersistentCollectionChangeWorkUnit

public abstract class AbstractAuditWorkUnit extends Object implements AuditWorkUnit
  • Field Details

    • sessionImplementor

      protected final org.hibernate.engine.spi.SessionImplementor sessionImplementor
    • enversService

      protected final EnversService enversService
    • id

      protected final Object id
    • entityName

      protected final String entityName
    • auditStrategy

      protected final AuditStrategy auditStrategy
    • revisionType

      protected final RevisionType revisionType
  • Constructor Details

    • AbstractAuditWorkUnit

      protected AbstractAuditWorkUnit(org.hibernate.engine.spi.SessionImplementor sessionImplementor, String entityName, EnversService enversService, Object id, RevisionType revisionType)
  • Method Details

    • fillDataWithId

      protected void fillDataWithId(Map<String,Object> data, Object revision)
    • perform

      public void perform(org.hibernate.Session session, Object revisionData)
      Description copied from interface: AuditWorkUnit
      Perform this work unit in the given session.
      Specified by:
      perform in interface AuditWorkUnit
      Parameters:
      session - Session, in which the work unit should be performed.
      revisionData - The current revision data, which will be used to populate the work unit with the correct revision relation.
    • getEntityId

      public Object getEntityId()
      Specified by:
      getEntityId in interface AuditWorkUnit
    • isPerformed

      public boolean isPerformed()
      Specified by:
      isPerformed in interface AuditWorkUnit
    • getEntityName

      public String getEntityName()
      Specified by:
      getEntityName in interface AuditWorkUnit
    • setPerformed

      protected void setPerformed(Object performedData)
    • undo

      public void undo(org.hibernate.Session session)
      Specified by:
      undo in interface AuditWorkUnit
    • getRevisionType

      public RevisionType getRevisionType()
      Specified by:
      getRevisionType in interface AuditWorkUnit
      Returns:
      Performed modification type.