abstract class SQLRedo
extends java.lang.Object
The top-level class is abstract. To use this class, instantiate one of the specialized, concrete, inner subclasses.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SQLRedo.BulkUpdate
A bulk action (delete or update) which affects 0 or more records.
|
(package private) static class |
SQLRedo.Delete
A delete action for a single record.
|
(package private) static class |
SQLRedo.Insert
An insert action for a single record.
|
protected static interface |
SQLRedo.ThrowingAction
A no-arg functional interface which throws PersistenceException, to avoid having to handle
this exception in every defined lambda expression.
|
(package private) static class |
SQLRedo.Update
An update action for a single record.
|
Modifier and Type | Field and Description |
---|---|
private SQLRedo.ThrowingAction |
action
Lambda which performs the redo action and possibly throws a persistence exception
|
private boolean |
active
Flag indicating that the original action was rolled back and redo is required
|
Modifier | Constructor and Description |
---|---|
protected |
SQLRedo(SQLRedo.ThrowingAction action)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
perform()
Perform this object's redo action, if it was marked active.
|
(package private) void |
setActive()
Mark this redo action as active, meaning the original action which this object was undone
by a full or sub-transaction rollback, and needs to be re-applied.
|
private final SQLRedo.ThrowingAction action
private boolean active
protected SQLRedo(SQLRedo.ThrowingAction action)
action
- Lambda which performs the redo action and possibly throws a persistence exception.void setActive()
void perform() throws PersistenceException
PersistenceException
- if there is an error executing the action.