© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.payment
Interface PaymentTransaction


public interface PaymentTransaction
extends Entity

A PaymentTransaction is an Entity EJB that maintains the state of an individual Credit Card transaction. This includes the credit card, amount, status, and date of last modification. It also maintains a journal of the actions in the form of TransactionEntry objects taken as the transaction is moved through authorization, capture, and settlement.

The transaction workflow is dictated by the PaymentWorkflow state machine.

See Also:
PaymentTransactionPk, PaymentTransactionHome, PaymentTransactionValue, TransactionEntry, PaymentWorkflow

Method Summary
 boolean addTransactionEntry(TransactionEntry element)
          Adds a new TransactionEntry to the journal.
 boolean addTransactionEntryCollection(java.util.Collection collection)
          Adds all of the TransactionEntries to the journal.
 void authorize()
          Change the state of the payment transaction by applying the authorize event.
 void clearTransactionEntryCollection()
          Removes all of the transaction entries from the journal.
 boolean containsTransactionEntry(TransactionEntry element)
          Returns true if this collection contains the specified element.
 boolean containsTransactionEntryCollection(java.util.Collection c)
          Returns true if this collection contains all of the elements in the specified collection.
 boolean equalsTransactionEntryCollection(java.lang.Object object)
          Compares the specified object with this collection for equality.
 void failRetry()
          Change the state of the payment transaction by applying the failRetry event.
 void failSettle()
          Change the state of the payment transaction by applying the failSettle event.
 java.lang.String getBatchId()
          Get the value of the identifier for the batch in which this Payment was settled.
 com.beasys.commerce.axiom.contact.CreditCard getCreditCard()
          Get the credit card information associated with the transaction.
 PaymentTransactionValue getPaymentTransactionByValue()
          Retrieve a local copy of all of the public attributes in the form of a PaymentTransactionValue object.
 java.lang.String getStatus()
          Retrieve the status of this payment.
 Price getTransactionAmount()
          Get the amount of the transaction.
 java.sql.Date getTransactionDate()
          Get the date that the transaction was last updated.
 java.util.Collection getTransactionEntryCollection()
          Returns a history of the modifications to this transaction.
 java.lang.String getTransactionId()
          Get the transaction's identifier.
 boolean isTransactionEntryCollectionEmpty()
          Returns true if this collection contains no elements.
 void markForSettle()
          Change the state of the payment transaction by applying the markForSettle event.
 void pendingSettle()
          Change the state of the payment transaction by applying the pendingSettle event.
 void queryFail()
          Change the state of the payment transaction by applying the queryFail event.
 void querySuccess()
          Change the state of the payment transaction by applying the querySuccess event.
 void reject()
          Change the state of the payment transaction by applying the reject event.
 boolean removeTransactionEntry(TransactionEntry element)
          Removes a single instance of the specified element from this collection, if it is present (optional operation).
 boolean removeTransactionEntryCollection(java.util.Collection collection)
          Removes all this collection's elements that are also contained in the specified collection (optional operation).
 boolean retainTransactionEntryCollection(java.util.Collection collection)
          Retains only the elements in this collection that are contained in the specified collection (optional operation).
 void setBatchId(java.lang.String batchId)
          Set the value of the identifier for the batch in which this Payment was settled.
 void setCreditCard(com.beasys.commerce.axiom.contact.CreditCard creditCard)
          Set the credit card information associated with the transaction
 void setPaymentTransactionByValue(PaymentTransactionValue value)
          Update all of the public attributes of a PaymentTransaction with a single method invocation.
 void settle()
          Change the state of the payment transaction by applying the settle event.
 void setTransactionAmount(Price transactionAmount)
          Set the amount of the transaction.
 void setTransactionDate(java.sql.Date transactionDate)
          Set the modification date for the PaymentTransaction
 void setTransactionEntryCollection(java.util.Collection collection)
          Update the journal of the modifications for this transaction.
 void systemFailure()
          Change the state of the payment transaction by applying the systemFailure event.
 int transactionEntryCollectionHashCode()
          Returns the hash code value for this collection.
 int transactionEntryCollectionSize()
          Returns the number of elements in this collection.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 
Methods inherited from interface com.beasys.commerce.foundation.RemoteRelationalReference
get__classIdentifier, get__containingBelonging, get__containingEntity, get__mapKey, get__sequenceNumber, set__containingBelonging, set__containingEntity, set__mapKey
 

Method Detail

getPaymentTransactionByValue

public PaymentTransactionValue getPaymentTransactionByValue()
                                                     throws java.rmi.RemoteException
Retrieve a local copy of all of the public attributes in the form of a PaymentTransactionValue object. This reduces the number of remote method invocations needed to retrieve all of the information associated with this Entity.

Returns:
PaymentTransactionValue The PaymentTransaction value object
Throws:
java.rmi.RemoteException - On remote error.

setPaymentTransactionByValue

public void setPaymentTransactionByValue(PaymentTransactionValue value)
                                  throws java.rmi.RemoteException
Update all of the public attributes of a PaymentTransaction with a single method invocation. Note: Primary key attributes are not set.

Parameters:
PaymentTransactionValue - the PaymentTransaction value object
Throws:
java.rmi.RemoteException - On remote error.

getTransactionId

public java.lang.String getTransactionId()
                                  throws java.rmi.RemoteException
Get the transaction's identifier. This is the primary key for the Entity.

Parameters:
PaymentTransactionValue - the PaymentTransaction value object
Throws:
java.rmi.RemoteException - On remote error.

getCreditCard

public com.beasys.commerce.axiom.contact.CreditCard getCreditCard()
                                                           throws java.rmi.RemoteException
Get the credit card information associated with the transaction.

Returns:
creditCard the credit card associated with the transaction.
Throws:
java.rmi.RemoteException - On remote error.

setCreditCard

public void setCreditCard(com.beasys.commerce.axiom.contact.CreditCard creditCard)
                   throws java.rmi.RemoteException
Set the credit card information associated with the transaction

Parameters:
creditCard - the new credit card information
Throws:
java.rmi.RemoteException - On remote error.

getTransactionDate

public java.sql.Date getTransactionDate()
                                 throws java.rmi.RemoteException
Get the date that the transaction was last updated.

Returns:
transactionDate the transaction date.
Throws:
java.rmi.RemoteException - On remote error.

setTransactionDate

public void setTransactionDate(java.sql.Date transactionDate)
                        throws java.rmi.RemoteException
Set the modification date for the PaymentTransaction

Parameters:
transactionDate - the transaction date to be set.
Throws:
java.rmi.RemoteException - On remote error.

getTransactionEntryCollection

public java.util.Collection getTransactionEntryCollection()
                                                   throws java.rmi.RemoteException
Returns a history of the modifications to this transaction.

Returns:
a collection of TransactionEntry objects.
Throws:
java.rmi.RemoteException - On remote error.

setTransactionEntryCollection

public void setTransactionEntryCollection(java.util.Collection collection)
                                   throws java.rmi.RemoteException
Update the journal of the modifications for this transaction.

Parameters:
collection - a collection of TransactionEntry objects.
Throws:
java.rmi.RemoteException - On remote error.

addTransactionEntry

public boolean addTransactionEntry(TransactionEntry element)
                            throws java.rmi.RemoteException
Adds a new TransactionEntry to the journal.

Parameters:
element - The Transaction entry to add.
Returns:
true if the collection was modified as a result of the operation.
Throws:
java.rmi.RemoteException - On remote error.

addTransactionEntryCollection

public boolean addTransactionEntryCollection(java.util.Collection collection)
                                      throws java.rmi.RemoteException
Adds all of the TransactionEntries to the journal.

Parameters:
collection - a collection of TransactionEntry objects.
Returns:
true if the collection was modified as a result of the operation.
Throws:
java.rmi.RemoteException - On remote error.

clearTransactionEntryCollection

public void clearTransactionEntryCollection()
                                     throws java.rmi.RemoteException
Removes all of the transaction entries from the journal.

Throws:
java.rmi.RemoteException - On remote error.

containsTransactionEntry

public boolean containsTransactionEntry(TransactionEntry element)
                                 throws java.rmi.RemoteException
Returns true if this collection contains the specified element.


containsTransactionEntryCollection

public boolean containsTransactionEntryCollection(java.util.Collection c)
                                           throws java.rmi.RemoteException
Returns true if this collection contains all of the elements in the specified collection.


equalsTransactionEntryCollection

public boolean equalsTransactionEntryCollection(java.lang.Object object)
                                         throws java.rmi.RemoteException
Compares the specified object with this collection for equality.


transactionEntryCollectionHashCode

public int transactionEntryCollectionHashCode()
                                       throws java.rmi.RemoteException
Returns the hash code value for this collection.


isTransactionEntryCollectionEmpty

public boolean isTransactionEntryCollectionEmpty()
                                          throws java.rmi.RemoteException
Returns true if this collection contains no elements.


removeTransactionEntry

public boolean removeTransactionEntry(TransactionEntry element)
                               throws java.rmi.RemoteException
Removes a single instance of the specified element from this collection, if it is present (optional operation).


removeTransactionEntryCollection

public boolean removeTransactionEntryCollection(java.util.Collection collection)
                                         throws java.rmi.RemoteException
Removes all this collection's elements that are also contained in the specified collection (optional operation).


retainTransactionEntryCollection

public boolean retainTransactionEntryCollection(java.util.Collection collection)
                                         throws java.rmi.RemoteException
Retains only the elements in this collection that are contained in the specified collection (optional operation).


transactionEntryCollectionSize

public int transactionEntryCollectionSize()
                                   throws java.rmi.RemoteException
Returns the number of elements in this collection.


getBatchId

public java.lang.String getBatchId()
                            throws java.rmi.RemoteException
Get the value of the identifier for the batch in which this Payment was settled.

Returns:
batchId

setBatchId

public void setBatchId(java.lang.String batchId)
                throws java.rmi.RemoteException
Set the value of the identifier for the batch in which this Payment was settled.

Parameters:
batchId - batchId to be added

getStatus

public java.lang.String getStatus()
                           throws java.rmi.RemoteException
Retrieve the status of this payment. The series of states will be as governed by the PaymentWorkflow


getTransactionAmount

public Price getTransactionAmount()
                           throws java.rmi.RemoteException
Get the amount of the transaction.

Returns:
transactionAmount.

setTransactionAmount

public void setTransactionAmount(Price transactionAmount)
                          throws java.rmi.RemoteException
Set the amount of the transaction.

Parameters:
transactionAmount - the amount of the transaction.

authorize

public void authorize()
               throws java.rmi.RemoteException,
                      WorkflowInstantiationException,
                      IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the authorize event. This method is invoked prior to atempting the authorize operation and will throw an exception if the operation is being executed out of sequence.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

reject

public void reject()
            throws java.rmi.RemoteException,
                   WorkflowInstantiationException,
                   IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the reject event. This method is invoked when an authorization atempt is rejected.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

failSettle

public void failSettle()
                throws java.rmi.RemoteException,
                       WorkflowInstantiationException,
                       IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the failSettle event. This method is invoked prior when an settle operation fails.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

markForSettle

public void markForSettle()
                   throws java.rmi.RemoteException,
                          WorkflowInstantiationException,
                          IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the markForSettle event. This method is invoked prior to atempting the capture operation and will throw an exception if the operation is being executed out of sequence.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

settle

public void settle()
            throws java.rmi.RemoteException,
                   WorkflowInstantiationException,
                   IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the settle event. This method is invoked prior to atempting the settle operation and will throw an exception if the operation is being executed out of sequence.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

pendingSettle

public void pendingSettle()
                   throws java.rmi.RemoteException,
                          WorkflowInstantiationException,
                          IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the pendingSettle event. This method is invoked when a transaction is successfully moved to the pending settle state.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

querySuccess

public void querySuccess()
                  throws java.rmi.RemoteException,
                         WorkflowInstantiationException,
                         IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the querySuccess event. This method is invoked when the status of a batch transaction is successfully verified.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

queryFail

public void queryFail()
               throws java.rmi.RemoteException,
                      WorkflowInstantiationException,
                      IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the queryFail event. This method is invoked when the status of a batch transaction faile to be verified.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

systemFailure

public void systemFailure()
                   throws java.rmi.RemoteException,
                          WorkflowInstantiationException,
                          IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the systemFailure event. This method is invoked when an operation fails due to a problem with the credit card service.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

failRetry

public void failRetry()
               throws java.rmi.RemoteException,
                      WorkflowInstantiationException,
                      IllegalWorkflowTransitionException
Change the state of the payment transaction by applying the failRetry event. This method is invoked when a retry of an authorization fails.

Throws:
WorkflowInstantiationException -  
IllegalWorkflowTransitionException -  

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved