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 java.io.Serializable |
id |
protected RevisionType |
revisionType |
protected SessionImplementor |
sessionImplementor |
protected AuditConfiguration |
verCfg |
Modifier | Constructor and Description |
---|---|
protected |
AbstractAuditWorkUnit(SessionImplementor sessionImplementor,
java.lang.String entityName,
AuditConfiguration verCfg,
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, wait
containsWork, generateData
merge, merge, merge, merge, merge
dispatch
protected final SessionImplementor sessionImplementor
protected final AuditConfiguration verCfg
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, AuditConfiguration verCfg, 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)
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 java.io.Serializable getEntityId()
getEntityId
in interface AuditWorkUnit
public boolean isPerformed()
isPerformed
in interface AuditWorkUnit
public java.lang.String getEntityName()
getEntityName
in interface AuditWorkUnit
protected void setPerformed(java.lang.Object performedData)
public void undo(Session session)
undo
in interface AuditWorkUnit
public RevisionType getRevisionType()
getRevisionType
in interface AuditWorkUnit
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.