org.hibernate.envers.synchronization.work
Class PersistentCollectionChangeWorkUnit
java.lang.Object
   org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
       org.hibernate.envers.synchronization.work.PersistentCollectionChangeWorkUnit
org.hibernate.envers.synchronization.work.PersistentCollectionChangeWorkUnit
- All Implemented Interfaces: 
- AuditWorkUnit, WorkUnitMergeDispatcher, WorkUnitMergeVisitor
- public class PersistentCollectionChangeWorkUnit 
- extends AbstractAuditWorkUnit- implements AuditWorkUnit
- Author:
- Adam Warski (adam at warski dot org)
 
 
 
| Constructor Summary | 
| PersistentCollectionChangeWorkUnit(SessionImplementor sessionImplementor,
                                   String entityName,
                                   AuditConfiguration auditCfg,
                                   PersistentCollection collection,
                                   CollectionEntry collectionEntry,
                                   Serializable snapshot,
                                   Serializable id,
                                   String referencingPropertyName)
 | 
| PersistentCollectionChangeWorkUnit(SessionImplementor sessionImplementor,
                                   String entityName,
                                   AuditConfiguration verCfg,
                                   Serializable id,
                                   List<PersistentCollectionChangeData> collectionChanges,
                                   String referencingPropertyName)
 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
PersistentCollectionChangeWorkUnit
public PersistentCollectionChangeWorkUnit(SessionImplementor sessionImplementor,
                                          String entityName,
                                          AuditConfiguration auditCfg,
                                          PersistentCollection collection,
                                          CollectionEntry collectionEntry,
                                          Serializable snapshot,
                                          Serializable id,
                                          String referencingPropertyName)
PersistentCollectionChangeWorkUnit
public PersistentCollectionChangeWorkUnit(SessionImplementor sessionImplementor,
                                          String entityName,
                                          AuditConfiguration verCfg,
                                          Serializable id,
                                          List<PersistentCollectionChangeData> collectionChanges,
                                          String referencingPropertyName)
containsWork
public boolean containsWork()
- 
- Specified by:
- containsWorkin interface- AuditWorkUnit
 
- 
 
generateData
public Map<String,Object> generateData(Object revisionData)
- 
- Specified by:
- generateDatain 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.
 
perform
public void perform(Session session,
                    Object revisionData)
- Description copied from interface: AuditWorkUnit
- Perform this work unit in the given session.
 
- 
- Specified by:
- performin interface- AuditWorkUnit
- Overrides:
- performin class- AbstractAuditWorkUnit
 
- 
- 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.
 
getReferencingPropertyName
public String getReferencingPropertyName()
- 
 
- 
 
getCollectionChanges
public List<PersistentCollectionChangeData> getCollectionChanges()
- 
 
- 
 
merge
public AuditWorkUnit merge(AddWorkUnit second)
- 
- Specified by:
- mergein interface- WorkUnitMergeVisitor
 
- 
 
merge
public AuditWorkUnit merge(ModWorkUnit second)
- 
- Specified by:
- mergein interface- WorkUnitMergeVisitor
 
- 
 
merge
public AuditWorkUnit merge(DelWorkUnit second)
- 
- Specified by:
- mergein interface- WorkUnitMergeVisitor
 
- 
 
merge
public AuditWorkUnit merge(CollectionChangeWorkUnit second)
- 
- Specified by:
- mergein interface- WorkUnitMergeVisitor
 
- 
 
merge
public AuditWorkUnit merge(FakeBidirectionalRelationWorkUnit second)
- 
- Specified by:
- mergein interface- WorkUnitMergeVisitor
 
- 
 
dispatch
public AuditWorkUnit dispatch(WorkUnitMergeVisitor first)
- Description copied from interface: WorkUnitMergeDispatcher
- Shuold be invoked on the second work unit.
 
- 
- Specified by:
- dispatchin 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-2010 Red Hat, Inc.  All Rights Reserved.