public class PersistentCollectionChangeWorkUnit extends AbstractAuditWorkUnit implements AuditWorkUnit
Modifier and Type | Class and Description |
---|---|
static class |
PersistentCollectionChangeWorkUnit.PersistentCollectionChangeWorkUnitId
A unique identifier for a collection work unit.
|
auditStrategy, entityName, id, revisionType, sessionImplementor, verCfg
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsWork() |
AuditWorkUnit |
dispatch(WorkUnitMergeVisitor first)
Should be invoked on the second work unit.
|
Map<String,Object> |
generateData(Object revisionData) |
List<PersistentCollectionChangeData> |
getCollectionChanges() |
String |
getReferencingPropertyName() |
AuditWorkUnit |
merge(AddWorkUnit second) |
AuditWorkUnit |
merge(CollectionChangeWorkUnit second) |
AuditWorkUnit |
merge(DelWorkUnit second) |
AuditWorkUnit |
merge(FakeBidirectionalRelationWorkUnit second) |
AuditWorkUnit |
merge(ModWorkUnit second) |
void |
perform(Session session,
Object revisionData)
Perform this work unit in the given session.
|
fillDataWithId, getEntityId, getEntityName, getRevisionType, isPerformed, setPerformed, undo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEntityId, getEntityName, getRevisionType, isPerformed, undo
public PersistentCollectionChangeWorkUnit(SessionImplementor sessionImplementor, String entityName, AuditConfiguration auditCfg, PersistentCollection collection, CollectionEntry collectionEntry, Serializable snapshot, Serializable id, String referencingPropertyName)
public PersistentCollectionChangeWorkUnit(SessionImplementor sessionImplementor, String entityName, AuditConfiguration verCfg, Serializable id, List<PersistentCollectionChangeData> collectionChanges, String referencingPropertyName)
public boolean containsWork()
containsWork
in interface AuditWorkUnit
public Map<String,Object> generateData(Object revisionData)
generateData
in interface AuditWorkUnit
revisionData
- The current revision data, which will be used to populate the work unit with the correct
revision relation.public void perform(Session session, Object revisionData)
AuditWorkUnit
perform
in interface AuditWorkUnit
perform
in class AbstractAuditWorkUnit
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.public String getReferencingPropertyName()
public List<PersistentCollectionChangeData> getCollectionChanges()
public AuditWorkUnit merge(AddWorkUnit second)
merge
in interface WorkUnitMergeVisitor
public AuditWorkUnit merge(ModWorkUnit second)
merge
in interface WorkUnitMergeVisitor
public AuditWorkUnit merge(DelWorkUnit second)
merge
in interface WorkUnitMergeVisitor
public AuditWorkUnit merge(CollectionChangeWorkUnit second)
merge
in interface WorkUnitMergeVisitor
public AuditWorkUnit merge(FakeBidirectionalRelationWorkUnit second)
merge
in interface WorkUnitMergeVisitor
public AuditWorkUnit dispatch(WorkUnitMergeVisitor first)
WorkUnitMergeDispatcher
dispatch
in interface WorkUnitMergeDispatcher
first
- First work unit (that is, the one added earlier).Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.