org.hibernate.envers.synchronization.work
Class AddWorkUnit
java.lang.Object
org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit
org.hibernate.envers.synchronization.work.AddWorkUnit
- All Implemented Interfaces:
- AuditWorkUnit, WorkUnitMergeDispatcher, WorkUnitMergeVisitor
public class AddWorkUnit
- extends AbstractAuditWorkUnit
- implements AuditWorkUnit
Constructor Summary |
AddWorkUnit(SessionImplementor sessionImplementor,
String entityName,
AuditConfiguration verCfg,
Serializable id,
EntityPersister entityPersister,
Object[] state)
|
AddWorkUnit(SessionImplementor sessionImplementor,
String entityName,
AuditConfiguration verCfg,
Serializable id,
Map<String,Object> data)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddWorkUnit
public AddWorkUnit(SessionImplementor sessionImplementor,
String entityName,
AuditConfiguration verCfg,
Serializable id,
EntityPersister entityPersister,
Object[] state)
AddWorkUnit
public AddWorkUnit(SessionImplementor sessionImplementor,
String entityName,
AuditConfiguration verCfg,
Serializable id,
Map<String,Object> data)
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.
getState
public Object[] getState()
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-2013 Red Hat, Inc. All Rights Reserved.