public class AtomicPaymentToBackendLinkObject
extends java.lang.Object
implements java.lang.Comparable
This class maintains the link information between an atomic payment in Payment Rules and its corresponding representation in the Payment Backend System. Thus the attributes of this class include a reference to an atomic payment, as well as state and amount attributes for the corresponding backend payment object.
It is used by PaymentSorter to provide a list of Backend Payment objects on which the payment action rule must take some action on. An attribute, availableAmount, is a placeholder for the amount of an atomic payment that is still available for allocation for a given phase of the operation. Thus if the total amount of the atomic payment is 30.00, and the reservation amount is 10.00, the availableAmount would be 20.00 in the reservation phase.
Another attribute, requestAmount, is the cumulative sum of the amounts that are allocated for a given phase of operation for a given atomic payment. Thus if total amount of the atomic payment is 30.00, and reservation amount is 10.00, and an additional 15.00 is allocated to this atomic payment. The requestAmount would now be 25.00. The availableAmount is used by the PaymentSorter in making its decision regarding which Backend Payment objects should be passed to the payment action rule, and the requestAmount is used by the payment action rule to determine the actual payment actions (and amount).
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
AtomicPaymentToBackendLinkObject()
This method is the constructor of this class.
|
Modifier and Type | Method and Description |
---|---|
int | compareTo(java.lang.Object arg0)
This method first compares the backendPaymentState, the object whose backendPaymentState is in "Deposited" state will before the one whose backendPaymentState is not in "Deposited" state.
|
boolean | equals(java.lang.Object arg0)
This method returns if the available amount of the AtomicPaymentToBackendLinkObject object in the parameter equals to the available amount of current object
|
java.lang.String[] | getAssociatedItems()
This method returns order items associated with this payment object.
|
com.ibm.commerce.edp.model.AtomicPaymentData | getAtomicPayment()
This method returns the atomic payment.
|
java.math.BigDecimal | getAvailableAmount()
This method returns the available amount of this atomic payment.
|
int | getBackendPaymentState()
This method returns the backend payment state.
|
java.math.BigDecimal | getBackendTotalPaymentAmount()
This method returns the backend total payment amount.
|
java.math.BigDecimal | getDepositedAmount()
This method returns the deposited amount of the backend payment.
|
java.math.BigDecimal | getRequestAmount()
This method returns the request amount of the atomic payment.
|
int | hashCode()
This method returns the hashcode of the available amount.
|
boolean | isAtomicPaymentPresent()
This method returns if the atomic payment is present.
|
void | setAssociatedItems(java.lang.String[] associatedOrderItems)
This method sets the order items associated with this payment object.
|
void | setAtomicPayment(com.ibm.commerce.edp.model.AtomicPaymentData localAtomicPayment)
This method sets the atomic payment.
|
void | setAvailableAmount(java.math.BigDecimal localAvailableAmount)
This method sets the available amount of this atomic payment.
|
void | setBackendPaymentState(int localMpfPaymentState)
This method sets the backend payment state.
|
void | setBackendTotalPaymentAmount(java.math.BigDecimal localMpfPaymentAmount)
This method sets the backend total payment amount.
|
void | setDepositedAmount(java.math.BigDecimal decimal)
This method sets the deposited amount of the backend payment.
|
void | setIsAtomicPaymentPresent(boolean localIsAtomicPaymentPresent)
This method sets if the atomic payment present.
|
void | setRequestAmount(java.math.BigDecimal localRequestAmount)
This method sets the request amount of the atomic payment.
|
java.lang.String | toString()
This method dumps this object as non-globalized human-readable string.
|
public static final java.lang.String COPYRIGHT
public AtomicPaymentToBackendLinkObject()
public void setAtomicPayment(com.ibm.commerce.edp.model.AtomicPaymentData localAtomicPayment)
public com.ibm.commerce.edp.model.AtomicPaymentData getAtomicPayment()
public boolean isAtomicPaymentPresent()
public void setAvailableAmount(java.math.BigDecimal localAvailableAmount)
public java.math.BigDecimal getAvailableAmount()
public void setBackendPaymentState(int localMpfPaymentState)
public int getBackendPaymentState()
public void setBackendTotalPaymentAmount(java.math.BigDecimal localMpfPaymentAmount)
public java.math.BigDecimal getBackendTotalPaymentAmount()
public void setDepositedAmount(java.math.BigDecimal decimal)
public java.math.BigDecimal getDepositedAmount()
public void setIsAtomicPaymentPresent(boolean localIsAtomicPaymentPresent)
public void setRequestAmount(java.math.BigDecimal localRequestAmount)
public java.math.BigDecimal getRequestAmount()
public java.lang.String[] getAssociatedItems()
public void setAssociatedItems(java.lang.String[] associatedOrderItems)
public int compareTo(java.lang.Object arg0)
This method first compares the backendPaymentState, the object whose backendPaymentState is in "Deposited" state will before the one whose backendPaymentState is not in "Deposited" state. If the two objects' backendPaymentState are both or neither in "Deposited" state, this method compares the available amount fields, and in the reverse order from the caller's comparison. If the available amount is same and the atomic payment is not null, this method compares the identifiers of the atomic payment. The object with smaller atomic payment identifier will be before the one with larger atomic payment
That is, this call would be invoked when the caller says, say,:
this.compareTo(parmOfSameType ) > 0
public boolean equals(java.lang.Object arg0)
public int hashCode()
public java.lang.String toString()