org.hibernate.envers.synchronization.work
Class PersistentCollectionChangeWorkUnit

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

public class PersistentCollectionChangeWorkUnit
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
PersistentCollectionChangeWorkUnit(String entityName, AuditConfiguration verCfg, org.hibernate.collection.PersistentCollection collection, String role, Serializable snapshot, Serializable id)
           
 
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.
 List<PersistentCollectionChangeData> getCollectionChanges()
           
 String getReferencingPropertyName()
           
 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

PersistentCollectionChangeWorkUnit

public PersistentCollectionChangeWorkUnit(String entityName,
                                          AuditConfiguration verCfg,
                                          org.hibernate.collection.PersistentCollection collection,
                                          String role,
                                          Serializable snapshot,
                                          Serializable id)
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

getReferencingPropertyName

public String getReferencingPropertyName()

getCollectionChanges

public List<PersistentCollectionChangeData> getCollectionChanges()

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.