© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.payment
Class TransactionResponse

java.lang.Object
  |
  +--com.beasys.commerce.ebusiness.payment.TransactionResponse

public class TransactionResponse
extends java.lang.Object
implements TransactionResponseConstants, java.io.Serializable

A TransactionResponse is returned by the business methods of the CreditCardService. It provides convenient access to the date, identifier, and status of the payment as well as a handle to the persistent PaymentTransaction associated with the transaction identifier. Additionally, it contains all service provider results in the form of a hash table of name value pairs.

See Also:
PaymentTransaction, com.beasys.commerce.ebusiness.payment.CreditCardService, Serialized Form

Field Summary
 javax.ejb.Handle paymentTransactionHandle
          Handle to the PaymentTransaction for which this response was generated.
 Price transactionAmount
          The amount of the transaction associated with this response.
 java.sql.Date transactionDate
          The date of the transaction associated with this response.
 java.lang.String transactionId
          The unique identifier for the transaction associated with this response.
 int transactionStatus
          The state of the transaction associated with this response.
 
Constructor Summary
TransactionResponse()
          Default constructor.
 
Method Summary
 java.util.Hashtable getAllResults()
          Returns a hash table containing all service provider-specific results.
 javax.ejb.Handle getPaymentTransactionHandle()
          Get the value of paymentTransactionHandle
 java.lang.String getStatusString(int i)
          Converts a status code into a String representation.
 Price getTransactionAmount()
          Get the value of transactionAmount
 java.sql.Date getTransactionDate()
          Get the value of transactionDate
 java.lang.String getTransactionId()
          Get the value of transactionId
 java.lang.String getTransactionResult(java.lang.String hashKey)
          Get a value from results given the key
 int getTransactionStatus()
          Get the value of transactionStatus
 void putTransactionResult(java.lang.String hashKey, java.lang.String value)
          Set a value on results
 void setAllResults(java.util.Hashtable newResults)
           
 void setPaymentTransactionHandle(javax.ejb.Handle paymentTransactionHandle)
          Set the value of paymentTransactionHandle
 void setTransactionAmount(Price transactionAmount)
          Set the value of transactionAmount
 void setTransactionDate(java.sql.Date transactionDate)
          Set the value of transactionDate
 void setTransactionId(java.lang.String transactionId)
          Set the value of transactionId
 void setTransactionStatus(int transactionStatus)
          Set the value of transactionStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionDate

public java.sql.Date transactionDate
The date of the transaction associated with this response.

transactionId

public java.lang.String transactionId
The unique identifier for the transaction associated with this response.

transactionStatus

public int transactionStatus
The state of the transaction associated with this response.

transactionAmount

public Price transactionAmount
The amount of the transaction associated with this response.

paymentTransactionHandle

public javax.ejb.Handle paymentTransactionHandle
Handle to the PaymentTransaction for which this response was generated.
Constructor Detail

TransactionResponse

public TransactionResponse()
Default constructor.
Method Detail

getTransactionDate

public java.sql.Date getTransactionDate()
Get the value of transactionDate

Returns:
transactionDate.

setTransactionDate

public void setTransactionDate(java.sql.Date transactionDate)
Set the value of transactionDate

Parameters:
transactionDate - transactionDate to be added

getTransactionId

public java.lang.String getTransactionId()
Get the value of transactionId

Returns:
transactionId.

setTransactionId

public void setTransactionId(java.lang.String transactionId)
Set the value of transactionId

Parameters:
transactionId - transactionId to be added

getTransactionStatus

public int getTransactionStatus()
Get the value of transactionStatus

Returns:
transactionStatus.

setTransactionStatus

public void setTransactionStatus(int transactionStatus)
Set the value of transactionStatus

Parameters:
transactionStatus - transactionStatus to be added

getTransactionAmount

public Price getTransactionAmount()
Get the value of transactionAmount

Returns:
transactionAmount.

setTransactionAmount

public void setTransactionAmount(Price transactionAmount)
Set the value of transactionAmount

Parameters:
transactionAmount - transactionAmount to be added

getPaymentTransactionHandle

public javax.ejb.Handle getPaymentTransactionHandle()
Get the value of paymentTransactionHandle

Returns:
paymentTransactionHandle.

setPaymentTransactionHandle

public void setPaymentTransactionHandle(javax.ejb.Handle paymentTransactionHandle)
Set the value of paymentTransactionHandle

Parameters:
paymentTransactionHandle - paymentTransactionHandle to be added

getTransactionResult

public java.lang.String getTransactionResult(java.lang.String hashKey)
Get a value from results given the key

Returns:
String

putTransactionResult

public void putTransactionResult(java.lang.String hashKey,
                                 java.lang.String value)
Set a value on results

Parameters:
hashKey - hashKey to be added to results
value - value to be added to results

getAllResults

public java.util.Hashtable getAllResults()
Returns a hash table containing all service provider-specific results. This is used as a pass through so that clients can build neccessary provider specific logic.

Returns:
All service-specific results.

setAllResults

public void setAllResults(java.util.Hashtable newResults)


getStatusString

public java.lang.String getStatusString(int i)
Converts a status code into a String representation.

Parameters:
i - The status code.
Returns:
A String representation of the status code.

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved