All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.PaymentTransactionState

java.lang.Object
   |
   +----semper.payment.PaymentTransactionState

public class PaymentTransactionState
extends Object
implements Serializable
Description of service types. Objects of this class are used to identify a specific state of a payment transaction. Typically, adapters are expected to instantiate state objects as objects of a subclass of this class. This class provides various standard state values as constants (e.g. TS_INITIATED). The intent is that once a state object has been created, the setState method will be used to set the state based on one of these pre-defined constants.

Version:
$Revision: 1.5 $ $Date: 1997/06/16 12:56:01 $
Author:
N. Asokan ([email protected])
See Also:
PurseServices, AccountBasedTransactionState, CashLikeTransactionState

Variable Index

 o TS_CANCELLED
Top level payment transaction state: cancelled
 o TS_FAILED
Top level payment transaction state: FAILED
 o TS_INITIATED
Top level payment transaction state: initiated
 o TS_SUCCEEDED
Top level payment transaction state: succeeded
 o TS_UNKNOWN
Top level payment transaction state: nknown

Constructor Index

 o PaymentTransactionState()
Constructor without arguments for serializer

Method Index

 o equals(Object)
We override equals to suit our needs: if the input parameter can not be cast into our own class, we return false.
 o hashCode()
We override hashCode
 o setState(PaymentTransactionState)
Set the state of the transaction to be the same as the state specified in the input parameter.
 o toString()
redefine toString

Variables

 o TS_UNKNOWN
 public static final PaymentTransactionState TS_UNKNOWN
Top level payment transaction state: nknown

 o TS_INITIATED
 public static final PaymentTransactionState TS_INITIATED
Top level payment transaction state: initiated

 o TS_SUCCEEDED
 public static final PaymentTransactionState TS_SUCCEEDED
Top level payment transaction state: succeeded

 o TS_FAILED
 public static final PaymentTransactionState TS_FAILED
Top level payment transaction state: FAILED

 o TS_CANCELLED
 public static final PaymentTransactionState TS_CANCELLED
Top level payment transaction state: cancelled

Constructors

 o PaymentTransactionState
 public PaymentTransactionState()
Constructor without arguments for serializer

Methods

 o setState
 public void setState(PaymentTransactionState ts)
Set the state of the transaction to be the same as the state specified in the input parameter. The intention is to use the various pre-defined constants (i.e. the TS_ objects) as the input parameter.

Parameters:
ts - a PaymentTransaction state object
Returns:
nothing
 o toString
 public String toString()
redefine toString

Returns:
a string describing this service
Overrides:
toString in class Object
 o equals
 public boolean equals(Object o)
We override equals to suit our needs: if the input parameter can not be cast into our own class, we return false. Otherwise, if the internal integer codes are not the same, we return false. Otherwise we return true.

Returns:
true if objects are equal; false otherwise
Overrides:
equals in class Object
See Also:
equals
 o hashCode
 public int hashCode()
We override hashCode

Returns:
integer hashcode
Overrides:
hashCode in class Object
See Also:
hashCode

All Packages  Class Hierarchy  This Package  Previous  Next  Index