com.ibm.etill.framework.archive
Interface Archivable

All Known Subinterfaces:
CassetteBatch, CassetteOrder, CassetteTransaction
All Known Implementing Classes:
AdminObject, Batch, Order, Transaction

public interface Archivable

Implemented by any class which needs to save itself to the database. All of the methods described by this interface are called by the commit method of the CommitPoint object with which this Archivable object is associated. The CommitPoint object decides which Archivable method to call based upon the CommitPoint list the Archivable object is a member of.

The methods in this interface should never be called directly by cassettes.

See Also:
CommitPoint

Method Summary
 void createRecord(Connection conn)
          Creates a new record representing this object in a Commerce Payments database table.
 void deleteRecord(Connection conn)
          Deletes an existing or newly-created record representing this object from a database table.
 void updateRecord(Connection conn)
          Updates an existing or newly-created record representing this object in a Payment Server database table.
 

Method Detail

createRecord

public void createRecord(Connection conn)
                  throws ETillAbortOperation
Creates a new record representing this object in a Commerce Payments database table. The CommitPoint object calls this method during commit processing when this Archivable object is a member of the CommitPoint create list. This method should never be called directly from cassettes.

The implementation of this method determines which table is used and which data members from the object are to be stored into the table.

Parameters:
Connection - The JDBC Connection object used to access the database.
Throws:
ETillAbortOperation - Thrown if an SQLException is caught.

updateRecord

public void updateRecord(Connection conn)
                  throws ETillAbortOperation
Updates an existing or newly-created record representing this object in a Payment Server database table. The CommitPoint object calls this method during commit processing when this Archivable object is a member of the CommitPoint update list. This method should never be called directly from cassettes.

If the Archivable object's record is being created within the same CommitPoint as this update, the CommitPoint object will ensure that the update is applied after the record has been created. The implementation of this method determines which fields in the record will be updated.

Parameters:
Connection - The JDBC Connection object used to access the database.
Throws:
ETillAbortOperation - Thrown if an SQLException is caught.

deleteRecord

public void deleteRecord(Connection conn)
                  throws ETillAbortOperation
Deletes an existing or newly-created record representing this object from a database table. The CommitPoint object calls this method during commit processing when this Archivable object is a member of the CommitPoint delete list. This method should never be called directly from cassettes.

If the Archivable object's record is being created within the same CommitPoint as this deletion, the CommitPoint object will simply remove all operations on this record before committing the changes.

Parameters:
Connection - The JDBC Connection object used to access the database.
Throws:
ETillAbortOperation - Thrown if an SQLException is caught.