|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.framework.payapi.BatchTotalsItem
BatchTotals objects maintain a set of totals for a single currency and amountExp10 within a given batch. A single batch may therefore have a set of BatchTotalsItem objects.
Cassettes should never instantiate a BatchTotalsItem object directly.
Rather, calls to the Batch
object's addPayment
and addCredit
methods will create these objects as needed.
The Batch
class also provides methods to access a batch's
totals items.
BatchTotalsItem implements the Serializable interface so that batch totals can be stored in the database along with the Batch object itself.
Batch
, Serialized FormConstructor Summary | |
---|---|
BatchTotalsItem(short currency,
int amountExp10)
Cassettes should not call this constructor. |
Method Summary | |
---|---|
void |
addCredit(int amount)
Cassettes should not call this method - they should call the Batch object's addCredit method. |
void |
addPayment(int amount)
Cassettes should not call this method - they should call the Batch object's addPayment method. |
int |
getAmountExp10()
Returns the base10 expornent associated with this object. |
int |
getCreditTotal()
Returns the total amount of credits for this object's currency/amountExp10. |
short |
getCurrency()
Returns the currency associated with this object. |
int |
getNumberOfCredits()
Returns the number of credits associated with this object. |
int |
getNumberOfPayments()
Returns the number of payments associated with this object. |
int |
getPaymentTotal()
Returns the total amount of deposits for this object's currency/amountExp10. |
boolean |
removeCredit(int amount)
Cassettes should not call this method - they should call the Batch object's removeCredit method. |
boolean |
removePayment(int amount)
Cassettes should not call this method - they should call the Batch object's removePayment method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BatchTotalsItem(short currency, int amountExp10)
currency
- a short containing the ISO 4217 currency codeamountExp10
- an int containing the base10 exponentMethod Detail |
public void addPayment(int amount)
Batch
object's addPayment
method.
The Batch
object's method will locate the correct
BatchTotalsItem and then then call this method on that object.
This method adds the input amount value to the current deposit total. The number of payments is also incremented by 1.
amount
- an int containing the amount value to add to the
deposit total.Batch.addPayment(com.ibm.etill.framework.payapi.Payment)
public boolean removePayment(int amount)
Batch
object's removePayment
method.
The Batch object's method will locate the correct
BatchTotalsItem and then then call this method on that object.
This method subtracts the input amount value from the current deposit total.
The number of payments is also decremented by 1.
- Parameters:
amount
- an int containing the amount value to subtract from
the deposit total.- Returns:
- boolean -
true
if the Framework should delete this
object, false
if not. - See Also:
Batch.removePayment(com.ibm.etill.framework.payapi.Payment)
public void addCredit(int amount)
Batch
object's addCredit
method.
The Batch object's method will locate the correct
BatchTotalsItem and then then call this method on that object.
This method adds the input amount value to the current credit total.
The number of credits is also incremented by 1.
- Parameters:
amount
- an int containing the amount value to add to the
credit total.- See Also:
Batch.addCredit(com.ibm.etill.framework.payapi.Credit)
public boolean removeCredit(int amount)
Batch
object's removeCredit
method.
The Batch object's method will locate the correct
BatchTotalsItem and then then call this method on that object.
This method subtracts the input amount value from the current credit total.
The number of credits is also decremented by 1.
- Parameters:
amount
- an int containing the amount value to subtract from
the credit total.- Returns:
- boolean -
true
if the Framework should delete this
object, false
if not. - See Also:
Batch.removeCredit(com.ibm.etill.framework.payapi.Credit)
public short getCurrency()
public int getAmountExp10()
public int getNumberOfPayments()
public int getNumberOfCredits()
public int getPaymentTotal()
public int getCreditTotal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |