org.hibernate.envers.synchronization.work
Class ModWorkUnit

java.lang.Object
  extended by org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
      extended by org.hibernate.envers.synchronization.work.ModWorkUnit
All Implemented Interfaces:
AuditWorkUnit, KeepCheckDispatcher, KeepCheckVisitor

public class ModWorkUnit
extends AbstractAuditWorkUnit
implements AuditWorkUnit

Author:
Adam Warski (adam at warski dot org)

Field Summary
 
Fields inherited from class org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
id, verCfg
 
Constructor Summary
ModWorkUnit(String entityName, AuditConfiguration verCfg, Serializable id, org.hibernate.persister.entity.EntityPersister entityPersister, Object[] newState, Object[] oldState)
           
 
Method Summary
 KeepCheckResult check(AddWorkUnit second)
           
 KeepCheckResult check(CollectionChangeWorkUnit second)
           
 KeepCheckResult check(DelWorkUnit second)
           
 KeepCheckResult check(ModWorkUnit second)
           
 boolean containsWork()
           
 KeepCheckResult dispatch(KeepCheckVisitor first)
          Shuold be invoked on the second work unit.
 void perform(org.hibernate.Session session, Object revisionData)
           
 
Methods inherited from class org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
fillDataWithId, getEntityId, getEntityName, isPerformed, setPerformed, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.envers.synchronization.work.AuditWorkUnit
getEntityId, getEntityName, isPerformed, undo
 

Constructor Detail

ModWorkUnit

public ModWorkUnit(String entityName,
                   AuditConfiguration verCfg,
                   Serializable id,
                   org.hibernate.persister.entity.EntityPersister entityPersister,
                   Object[] newState,
                   Object[] oldState)
Method Detail

containsWork

public boolean containsWork()
Specified by:
containsWork in interface AuditWorkUnit

perform

public void perform(org.hibernate.Session session,
                    Object revisionData)
Specified by:
perform in interface AuditWorkUnit

check

public KeepCheckResult check(AddWorkUnit second)
Specified by:
check in interface KeepCheckVisitor

check

public KeepCheckResult check(ModWorkUnit second)
Specified by:
check in interface KeepCheckVisitor

check

public KeepCheckResult check(DelWorkUnit second)
Specified by:
check in interface KeepCheckVisitor

check

public KeepCheckResult check(CollectionChangeWorkUnit second)
Specified by:
check in interface KeepCheckVisitor

dispatch

public KeepCheckResult dispatch(KeepCheckVisitor first)
Description copied from interface: KeepCheckDispatcher
Shuold be invoked on the second work unit.

Specified by:
dispatch in interface KeepCheckDispatcher
Parameters:
first - First work unit (that is, the one added earlier).
Returns:
Which work unit should be kept.


Copyright © 2008 Hibernate.org. All Rights Reserved.