public abstract class AbstractAuditWorkUnit extends java.lang.Object implements AuditWorkUnit
| Modifier and Type | Field and Description |
|---|---|
protected AuditStrategy |
auditStrategy |
protected java.lang.String |
entityName |
protected EnversService |
enversService |
protected java.io.Serializable |
id |
protected RevisionType |
revisionType |
protected SessionImplementor |
sessionImplementor |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuditWorkUnit(SessionImplementor sessionImplementor,
java.lang.String entityName,
EnversService enversService,
java.io.Serializable id,
RevisionType revisionType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
fillDataWithId(java.util.Map<java.lang.String,java.lang.Object> data,
java.lang.Object revision) |
java.io.Serializable |
getEntityId() |
java.lang.String |
getEntityName() |
RevisionType |
getRevisionType() |
boolean |
isPerformed() |
void |
perform(Session session,
java.lang.Object revisionData)
Perform this work unit in the given session.
|
protected void |
setPerformed(java.lang.Object performedData) |
void |
undo(Session session) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsWork, generateDatamerge, merge, merge, merge, mergedispatchprotected final SessionImplementor sessionImplementor
protected final EnversService enversService
protected final java.io.Serializable id
protected final java.lang.String entityName
protected final AuditStrategy auditStrategy
protected final RevisionType revisionType
protected AbstractAuditWorkUnit(SessionImplementor sessionImplementor, java.lang.String entityName, EnversService enversService, java.io.Serializable id, RevisionType revisionType)
protected void fillDataWithId(java.util.Map<java.lang.String,java.lang.Object> data,
java.lang.Object revision)
public void perform(Session session, java.lang.Object revisionData)
AuditWorkUnitperform in interface AuditWorkUnitsession - 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 java.io.Serializable getEntityId()
getEntityId in interface AuditWorkUnitpublic boolean isPerformed()
isPerformed in interface AuditWorkUnitpublic java.lang.String getEntityName()
getEntityName in interface AuditWorkUnitprotected void setPerformed(java.lang.Object performedData)
public void undo(Session session)
undo in interface AuditWorkUnitpublic RevisionType getRevisionType()
getRevisionType in interface AuditWorkUnitCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.