|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.payapi.Transaction | +--com.ibm.etill.framework.payapi.Credit
Credit objects contain all of the generic information that the Framework needs to represent a credit created for a specific order. The combination of this object and the CassetteTransaction object for the same credit constitutes the complete representation of a given credit.
A Credit is uniquely identified by the combination of the merchant number, order number, and credit number. Therefore, all Credits for a given order must be unique.
Among the data maintained in each Credit object are:
com.ibm.etill.framework.payapi.PaymentAPIConstants.java
)
are:
Supervisor.createCredit
method. This happens in several different cases:
This class implements methods to log the generic information about a credit into the ETCREDIT database table and to retrieve that same information later on.
Fields inherited from class com.ibm.etill.framework.payapi.Transaction |
---|
amount, cassetteTransaction, currentState, newTransaction, order, timeStampCreated, timeStampModified, transactionNumber |
Constructor Summary | |
---|---|
Credit(Order order,
String creditNumber)
Cassettes should never call this constructor. |
Method Summary | |
---|---|
void |
createCassetteCredit(ParameterTable protocolData)
Cassettes should not call this method. |
void |
createRecord(Connection conn)
This method should never be called directly from cassettes. |
void |
deleteRecord(Connection conn)
This method should never be called directly from cassettes. |
void |
resetCredit()
Reinitializes this credit object to the state it had when it was first instantiated. |
void |
restoreRecord()
This method should never be called directly from cassettes. |
void |
resurrectCassetteCredit()
Cassettes should not call this method. |
static void |
retrieveCredits(Order currentOrder,
Hashtable collection)
Returns the set of Credit objects that belong to the specified order. |
void |
updateRecord(Connection conn)
This method should never be called directly from cassettes. |
Methods inherited from class com.ibm.etill.framework.payapi.Transaction |
---|
getAcquirerID, getAmount, getBatchNumber, getCassetteTransaction, getCurrentState, getMerchantName, getMerchantNumber, getOrder, getOrderNumber, getReferenceNumber, getTimestampCreated, getTimestampModified, getTransactionNumber, isNewTransaction, setAcquirerID, setAmount, setAmount, setBatchNumber, setCassetteTransaction, setCurrentState, setNewTransaction, setReferenceNumber, setTimeStampCreated, setTimeStampModified, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Credit(Order order, String creditNumber)
Supervisor.createCredit
method.
To resurrect an existing Order and all of its associated objects, including
Credits, call the Supervisor.retrieveOrder
method.
The Framework calls this constructor to create a new Credit having the specified credit number for the specified Order.
Supervisor.createCredit(com.ibm.etill.framework.payapi.Order, java.lang.String, com.ibm.etill.framework.payapi.Amount, com.ibm.etill.framework.payapi.ParameterTable)
,
Supervisor.retrieveOrder(java.lang.String, java.lang.String)
Method Detail |
public void resetCredit()
newTransaction
indicator is set to false
,
resetTransaction
method is invoked.
public void createCassetteCredit(ParameterTable protocolData) throws ETillAbortOperation
newCassetteCredit
method which is responsible for building the cassette's credit object.protocolData
- a ParameterTable that contains the protocol data parameters
which were specified on the API command that is currently
being processed. If no protocol data parameters were
specified, a null will be passed here.ETillAbortOperation
- thrown by the cassette to report errors.public void resurrectCassetteCredit() throws ETillAbortOperation
resurrectCassetteCredit
method which is responsible for recreating the cassette's credit object.ETillAbortOperation
- thrown by the cassette to report errors.public void createRecord(Connection conn) throws ETillAbortOperation
Creates a new record representing this Credit object in the ETCREDIT database table.
This method is part of Credit's implementation of the Archivable interface. The
CommitPoint
object calls this method during commit processing
when this Credit object is a member of the CommitPoint
create list.
Note: Also calls the cassette to create the CassetteCredit in the database.
Connection
- The JDBC Connection object used to access the database.ETillAbortOperation
- thrown if an SQLException is caught.CommitPoint
public void updateRecord(Connection conn) throws ETillAbortOperation
Udates the database record that represents this Credit object in the ETCREDIT table.
This method is part of Credit's implementation of the Archivable interface. The
CommitPoint
object calls this method during commit processing
when this Credit object is a member of the CommitPoint
update list.
Note: Also calls the cassette to update the CassetteCredit in the database.
Connection
- The JDBC Connection object used to access the database.ETillAbortOperation
- thrown if an SQLException is caught.CommitPoint
public void deleteRecord(Connection conn) throws ETillAbortOperation
Deletes the database record that represents this Credit object from the ETCREDIT table.
This method is part of Credit's implementation of the Archivable interface. The
CommitPoint
object calls this method during commit processing
when this Credit object is a member of the CommitPoint
delete list.
Note: Also calls the cassette to delete the CassetteCredit from the database.
Connection
- The JDBC Connection object used to access the database.ETillAbortOperation
- thrown if an SQLException is caught.CommitPoint
public void restoreRecord() throws ETillAbortOperation
Restores the credit from the database record in the ETCREDIT Table.
Also calls the cassette to resurrect the CassetteCredit from the database.
This method is the Credits's implementation of the Restorable interface. The
CommitPoint
object calls this method during noCommit processing.
when this Credit object is a member of the CommitPoint
restore list.
ETillAbortOperation
- thrown if an SQLException is caught.CommitPoint
public static void retrieveCredits(Order currentOrder, Hashtable collection) throws ETillAbortOperation
currentOrder
- the Order object whose credit collection is
being requested.collection
- a caller-supplied Hashtable which will be
populated with the credit collection. The
credit number will serve as the table keys
and the associated table elements will be
the Credit objects.ETillAbortOperation
- thrown if an SQLException is caught.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |