Package net.sf.basedb.core
Class ItemList.DelayedAdditionManager
java.lang.Object
net.sf.basedb.core.ItemList.DelayedAdditionManager
- All Implemented Interfaces:
TransactionalAction
- Enclosing class:
- ItemList
static class ItemList.DelayedAdditionManager extends Object implements TransactionalAction
Handles items that should be added as members to the list, but
since they were created in the same transaction doesn't have any
ID until later in the commit phase.
- Since:
- 3.5.1
-
Field Summary
Fields Modifier and Type Field Description private ItemListData
list
private Set<Listable>
queue
-
Constructor Summary
Constructors Constructor Description DelayedAdditionManager(ItemListData list)
-
Method Summary
Modifier and Type Method Description (package private) boolean
add(Listable item)
(package private) int
addAll(ItemList.DelayedAdditionManager other)
void
onAfterCommit()
Called after a successful commit.void
onBeforeCommit()
This method is called before the commit is about to happen.void
onRollback()
Called after an unsuccessful commit.(package private) Set<Listable>
queue()
(package private) boolean
remove(Listable item)
(package private) int
removeAll(ItemList.DelayedAdditionManager other)
(package private) int
retainAll(ItemList.DelayedAdditionManager other)
-
Field Details
-
list
-
queue
-
-
Constructor Details
-
DelayedAdditionManager
DelayedAdditionManager(ItemListData list)
-
-
Method Details
-
add
-
remove
-
addAll
-
removeAll
-
retainAll
-
queue
-
onBeforeCommit
public void onBeforeCommit()Description copied from interface:TransactionalAction
This method is called before the commit is about to happen. If this method throws an exception the transaction will be rolled back.- Specified by:
onBeforeCommit
in interfaceTransactionalAction
-
onAfterCommit
public void onAfterCommit()Description copied from interface:TransactionalAction
Called after a successful commit. Implementations should not throw any exceptions from this method. If they do, the message is logged, by no other action is taken.- Specified by:
onAfterCommit
in interfaceTransactionalAction
-
onRollback
public void onRollback()Description copied from interface:TransactionalAction
Called after an unsuccessful commit. Implementations should not throw any exceptions from this method. If they do, the message is logged, by no other action is taken.- Specified by:
onRollback
in interfaceTransactionalAction
-