private final class RecordBuffer.ReversibleCreate extends AbstractReversible
Reversible
which on rollback
reverses a record create action by deleting its DMO in the underlying
persistence session.Modifier and Type | Field and Description |
---|---|
private boolean |
persisted
Flag indicating associated record was persisted to the database
|
LOG
Constructor and Description |
---|
ReversibleCreate()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getAction()
Get a string which briefly describes the action which this object
will reverse upon rollback.
|
(package private) void |
markPersisted()
Invoked to mark the action as truly reversible.
|
protected void |
rollbackWorker(boolean rollForward,
boolean transaction)
Reverse the creation of the underlying database record by deleting
it from the underlying persistence session, which deletes it from
the database.
|
getBuffer, getDMO, getDMOName, getId, getIdentifier, isNullDMOAllowed, prepareRollback, rollback, setDMO, storesDMO
duplicate, isNewlyCreated, setNewlyCreated, toString
private boolean persisted
protected java.lang.String getAction()
getAction
in class Reversible
protected void rollbackWorker(boolean rollForward, boolean transaction) throws PersistenceException
rollbackWorker
in class AbstractReversible
rollForward
- If true
, this method is being invoked in order
to re-roll forward a non-undoable change, after a
database-level rollback. This indicates the modification is
made within a new transaction invoked after the
database-level rollback.
If false
, this method is being invoked in order
to roll back an undoable change within the context of an
application-level, full transaction or sub-transaction
rollback.transaction
- true
if this rollback occurs at a full
transaction boundary, else false
.PersistenceException
- if an error occurs at the database or in the persistence
layer when deleting the record.void markPersisted()