|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Supervisor.getThreadCommitPoint
.
Implemented by objects which will be used to manage database commits. The existence of this interface is historical and should not be used for new cassette implementations.
Each Commerce Payments thread maintains a CommitPoint object which implements
this interface. Therefore, it is recommended that all database commits
be managed using the current thread's CommitPoint, which is obtained
using Supervisor.getThreadCommitPoint
.
Commitable objects collect Archivable objects on a set of three lists (create, update and delete) until a commit point is reached. At that point, the Commitable object manages the commit or rollback of operations on all three lists as a single unit.
CommitPoint
,
Supervisor.getThreadCommitPoint()
Method Summary | |
---|---|
void |
addToBoundOrders(Order order)
Deprecated. |
void |
addToCreateList(Archivable newItem)
Deprecated. Adds an Archivable object to the list of objects to be created. |
void |
addToDeleteList(Archivable newItem)
Deprecated. Adds an Archivable object to the list of objects to be deleted |
void |
addToUpdateList(Archivable newItem)
Deprecated. Adds an Archivable object to the list of objects to be updated. |
void |
commit()
Deprecated. Causes all the collected data to be commited to the database. |
void |
noCommit()
Deprecated. Clears the lists of Archivable objects: the commit will not happen. |
Method Detail |
public void addToCreateList(Archivable newItem)
Archivable
- The item to create in the database upon the next commit.
This will be accomplished by calling the object's
createRecord
method when this Commitable
object's commit
is invoked.public void addToUpdateList(Archivable newItem)
Archivable
- The item to update in the database upon the next commit.
This will be accomplished by calling the object's
updateRecord
method when this Commitable
object's commit
is invoked.public void addToDeleteList(Archivable newItem)
Archivable
- The item to delete in the database upon the next commit.
This will be accomplished by calling the object's
deleteRecord
method when this Commitable
object's commit
is invoked.public void commit()
createRecord
method.
updateRecord
method.
deleteRecord
method.
ETillFrameworkException
- Thrown if the commit fails.public void noCommit()
ETillFrameworkException
- Thrown if the clearing of the lists fails.public void addToBoundOrders(Order order)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |