PaymentTransaction Interface

com.beasys.commerce.ebusiness.payment
PaymentTransaction Interface

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.

Related Topics

PaymentTransactionPk
PaymentTransactionHome
PaymentTransactionValue
TransactionEntry
PaymentWorkflow


All Superinterfaces
BusinessSmartComponent, EJBObject, Entity, Remote, RemoteRelationalReference, Serializable

Method Summary

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

addTransactionEntry(TransactionEntry) Method

public boolean addTransactionEntry(TransactionEntry element)
throws 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.

Exceptions

RemoteException
On remote error.

addTransactionEntryCollection(Collection) Method

public boolean addTransactionEntryCollection(Collection collection)
throws 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.

Exceptions

RemoteException
On remote error.

authorize() Method

public void authorize()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

clearTransactionEntryCollection() Method

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

Exceptions

RemoteException
On remote error.

containsTransactionEntry(TransactionEntry) Method

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

Exceptions

RemoteException

containsTransactionEntryCollection(Collection) Method

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

Exceptions

RemoteException

equalsTransactionEntryCollection(Object) Method

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

Exceptions

RemoteException

failRetry() Method

public void failRetry()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

failSettle() Method

public void failSettle()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

getBatchId() Method

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

Returns

batchId

Exceptions

RemoteException

getCreditCard() Method

public CreditCard getCreditCard()
throws RemoteException
Get the credit card information associated with the transaction.

Returns

creditCard the credit card associated with the transaction.

Exceptions

RemoteException
On remote error.

getPaymentTransactionByValue() Method

public PaymentTransactionValue getPaymentTransactionByValue()
throws 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

Exceptions

RemoteException
On remote error.

getStatus() Method

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

Exceptions

RemoteException

getTransactionAmount() Method

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

Returns

transactionAmount.

Exceptions

RemoteException

getTransactionDate() Method

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

Returns

transactionDate the transaction date.

Exceptions

RemoteException
On remote error.

getTransactionEntryCollection() Method

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

Returns

a collection of TransactionEntry objects.

Exceptions

RemoteException
On remote error.

getTransactionId() Method

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

Exceptions

RemoteException
On remote error.

isTransactionEntryCollectionEmpty() Method

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

Exceptions

RemoteException

markForSettle() Method

public void markForSettle()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

pendingSettle() Method

public void pendingSettle()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

queryFail() Method

public void queryFail()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

querySuccess() Method

public void querySuccess()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

reject() Method

public void reject()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

removeTransactionEntry(TransactionEntry) Method

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

Exceptions

RemoteException

removeTransactionEntryCollection(Collection) Method

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

Exceptions

RemoteException

retainTransactionEntryCollection(Collection) Method

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

Exceptions

RemoteException

setBatchId(String) Method

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

Parameters

batchId
batchId to be added

Exceptions

RemoteException

setCreditCard(CreditCard) Method

public void setCreditCard(CreditCard creditCard)
throws RemoteException
Set the credit card information associated with the transaction

Parameters

creditCard
the new credit card information

Exceptions

RemoteException
On remote error.

setPaymentTransactionByValue(PaymentTransactionValue) Method

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

Parameters

value
the PaymentTransaction value object

Exceptions

RemoteException
On remote error.

settle() Method

public void settle()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

setTransactionAmount(Price) Method

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

Parameters

transactionAmount
the amount of the transaction.

Exceptions

RemoteException

setTransactionDate(Date) Method

public void setTransactionDate(Date transactionDate)
throws RemoteException
Set the modification date for the PaymentTransaction

Parameters

transactionDate
the transaction date to be set.

Exceptions

RemoteException
On remote error.

setTransactionEntryCollection(Collection) Method

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

Parameters

collection
a collection of TransactionEntry objects.

Exceptions

RemoteException
On remote error.

systemFailure() Method

public void systemFailure()
throws 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.

Exceptions

RemoteException
WorkflowInstantiationException
IllegalWorkflowTransitionException

transactionEntryCollectionHashCode() Method

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

Exceptions

RemoteException

transactionEntryCollectionSize() Method

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

Exceptions

RemoteException