Class AddWorkUnit
java.lang.Object
org.hibernate.envers.internal.synchronization.work.AbstractAuditWorkUnit
org.hibernate.envers.internal.synchronization.work.AddWorkUnit
- All Implemented Interfaces:
AuditWorkUnit, WorkUnitMergeDispatcher, WorkUnitMergeVisitor
-
Field Summary
Fields inherited from class AbstractAuditWorkUnit
auditStrategy, entityName, enversService, id, revisionType, sessionImplementor -
Constructor Summary
ConstructorsConstructorDescriptionAddWorkUnit(org.hibernate.engine.spi.SharedSessionContractImplementor sessionImplementor, String entityName, EnversService enversService, Object id, Map<String, Object> data) AddWorkUnit(org.hibernate.engine.spi.SharedSessionContractImplementor sessionImplementor, String entityName, EnversService enversService, Object id, org.hibernate.persister.entity.EntityPersister entityPersister, Object[] state) -
Method Summary
Modifier and TypeMethodDescriptionbooleandispatch(WorkUnitMergeVisitor first) Should be invoked on the second work unit.generateData(Object revisionData) Object[]getState()merge(AddWorkUnit second) merge(CollectionChangeWorkUnit second) merge(DelWorkUnit second) merge(ModWorkUnit second) Methods inherited from class AbstractAuditWorkUnit
fillDataWithId, getEntityId, getEntityName, getRevisionType, isPerformed, perform, setPerformed, undoMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AuditWorkUnit
getEntityId, getEntityName, getRevisionType, isPerformed, perform, undo
-
Constructor Details
-
Method Details
-
containsWork
public boolean containsWork()- Specified by:
containsWorkin interfaceAuditWorkUnit
-
generateData
- Specified by:
generateDatain interfaceAuditWorkUnit- 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
-
merge
- Specified by:
mergein interfaceWorkUnitMergeVisitor
-
merge
- Specified by:
mergein interfaceWorkUnitMergeVisitor
-
merge
- Specified by:
mergein interfaceWorkUnitMergeVisitor
-
merge
- Specified by:
mergein interfaceWorkUnitMergeVisitor
-
merge
- Specified by:
mergein interfaceWorkUnitMergeVisitor
-
dispatch
Description copied from interface:WorkUnitMergeDispatcherShould be invoked on the second work unit.- Specified by:
dispatchin interfaceWorkUnitMergeDispatcher- Parameters:
first- First work unit (that is, the one added earlier).- Returns:
- The work unit that is the result of the merge.
-