org.hibernate.envers.synchronization.work
Class CollectionChangeWorkUnit

java.lang.Object
  extended by org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
      extended by org.hibernate.envers.synchronization.work.CollectionChangeWorkUnit
All Implemented Interfaces:
AuditWorkUnit, WorkUnitMergeDispatcher, WorkUnitMergeVisitor

public class CollectionChangeWorkUnit
extends AbstractAuditWorkUnit
implements AuditWorkUnit


Field Summary
 
Fields inherited from class org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
auditStrategy, entityName, id, revisionType, sessionImplementor, verCfg
 
Constructor Summary
CollectionChangeWorkUnit(SessionImplementor session, String entityName, String collectionPropertyName, AuditConfiguration verCfg, Serializable id, Object entity)
           
 
Method Summary
 boolean containsWork()
           
 AuditWorkUnit dispatch(WorkUnitMergeVisitor first)
          Should be invoked on the second work unit.
 Map<String,Object> generateData(Object revisionData)
           
 AuditWorkUnit merge(AddWorkUnit second)
           
 AuditWorkUnit merge(CollectionChangeWorkUnit second)
           
 AuditWorkUnit merge(DelWorkUnit second)
           
 AuditWorkUnit merge(FakeBidirectionalRelationWorkUnit second)
           
 AuditWorkUnit merge(ModWorkUnit second)
           
 void mergeCollectionModifiedData(Map<String,Object> data)
           
 
Methods inherited from class org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
fillDataWithId, getEntityId, getEntityName, getRevisionType, isPerformed, perform, 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, getRevisionType, isPerformed, perform, undo
 

Constructor Detail

CollectionChangeWorkUnit

public CollectionChangeWorkUnit(SessionImplementor session,
                                String entityName,
                                String collectionPropertyName,
                                AuditConfiguration verCfg,
                                Serializable id,
                                Object entity)
Method Detail

containsWork

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

generateData

public Map<String,Object> generateData(Object revisionData)
Specified by:
generateData in interface AuditWorkUnit
Parameters:
revisionData - The current revision data, which will be used to populate the work unit with the correct revision relation.
Returns:
Generates data that should be saved when performing this work unit.

mergeCollectionModifiedData

public void mergeCollectionModifiedData(Map<String,Object> data)

merge

public AuditWorkUnit merge(AddWorkUnit second)
Specified by:
merge in interface WorkUnitMergeVisitor

merge

public AuditWorkUnit merge(ModWorkUnit second)
Specified by:
merge in interface WorkUnitMergeVisitor

merge

public AuditWorkUnit merge(DelWorkUnit second)
Specified by:
merge in interface WorkUnitMergeVisitor

merge

public AuditWorkUnit merge(CollectionChangeWorkUnit second)
Specified by:
merge in interface WorkUnitMergeVisitor

merge

public AuditWorkUnit merge(FakeBidirectionalRelationWorkUnit second)
Specified by:
merge in interface WorkUnitMergeVisitor

dispatch

public AuditWorkUnit dispatch(WorkUnitMergeVisitor first)
Description copied from interface: WorkUnitMergeDispatcher
Should be invoked on the second work unit.

Specified by:
dispatch in interface WorkUnitMergeDispatcher
Parameters:
first - First work unit (that is, the one added earlier).
Returns:
The work unit that is the result of the merge.


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