public abstract class AbstractAuditWorkUnit extends Object implements AuditWorkUnit
| Modifier and Type | Field and Description |
|---|---|
protected AuditStrategy |
auditStrategy |
protected String |
entityName |
protected EnversService |
enversService |
protected Serializable |
id |
protected RevisionType |
revisionType |
protected SessionImplementor |
sessionImplementor |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuditWorkUnit(SessionImplementor sessionImplementor,
String entityName,
EnversService enversService,
Serializable id,
RevisionType revisionType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
fillDataWithId(Map<String,Object> data,
Object revision) |
Serializable |
getEntityId() |
String |
getEntityName() |
RevisionType |
getRevisionType() |
boolean |
isPerformed() |
void |
perform(Session session,
Object revisionData)
Perform this work unit in the given session.
|
protected void |
setPerformed(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 Serializable id
protected final String entityName
protected final AuditStrategy auditStrategy
protected final RevisionType revisionType
protected AbstractAuditWorkUnit(SessionImplementor sessionImplementor, String entityName, EnversService enversService, Serializable id, RevisionType revisionType)
public void perform(Session session, 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 Serializable getEntityId()
getEntityId in interface AuditWorkUnitpublic boolean isPerformed()
isPerformed in interface AuditWorkUnitpublic String getEntityName()
getEntityName in interface AuditWorkUnitprotected void setPerformed(Object performedData)
public void undo(Session session)
undo in interface AuditWorkUnitpublic RevisionType getRevisionType()
getRevisionType in interface AuditWorkUnitCopyright © 2001-2017 Red Hat, Inc. All Rights Reserved.