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, wait
containsWork, generateData
merge, merge, merge, merge, merge
dispatch
protected 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)
AuditWorkUnit
perform
in interface AuditWorkUnit
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 Serializable getEntityId()
getEntityId
in interface AuditWorkUnit
public boolean isPerformed()
isPerformed
in interface AuditWorkUnit
public String getEntityName()
getEntityName
in interface AuditWorkUnit
protected void setPerformed(Object performedData)
public void undo(Session session)
undo
in interface AuditWorkUnit
public RevisionType getRevisionType()
getRevisionType
in interface AuditWorkUnit
Copyright © 2019 JBoss by Red Hat. All rights reserved.