com.beasys.commerce.ebusiness.payment
Class PaymentTransactionImpl

java.lang.Object
  extended by com.beasys.commerce.foundation.EntityImpl
      extended by com.beasys.commerce.ebusiness.payment.PaymentTransactionImpl
All Implemented Interfaces
RelationalReference

public class PaymentTransactionImpl
extends EntityImpl

This class holds data common to all the transaction types. The PaymentTransactionManager uses this class to pass along to the payment service provider - reqeusts made by the client.

 Primary Key = com.beasys.commerce.ebusiness.payment.PaymentTransactionPk
 

See Also
PaymentTransaction, PaymentTransactionHome, PaymentTransactionValue

Field Summary
 String batchId
          The batchId attribute is populated after a batch-commit request for the transaction has returned successfully.
 com.beasys.commerce.axiom.contact.CreditCard creditCard
           Containment: By Value Multiplicity: 1:1
 WorkflowContext status
           Containment: By Value Multiplicity: 1:1 WORKFLOW
 Workflow statusWorkflow
           
 Price transactionAmount
          In case of partial transcation(ie.
 Date transactionDate
          The date of the transaction.
 SmartCollectionReference transactionEntry
           Containment: By Value Multiplicity: 0:N Interface: java.util.Collection
 String transactionId
          The order of which this transaction is a part.
 
Fields inherited from class com.beasys.commerce.foundation.EntityImpl
__classIdentifier, __containingEntity, __mapKey, __sequenceNumber, _ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty, _smartBMP
 
Constructor Summary
PaymentTransactionImpl()
           
 
Method Summary
 boolean addTransactionEntry(TransactionEntry element)
          Ensures that this collection contains the specified element (optional operation).
 boolean addTransactionEntryCollection(Collection collection)
          Adds all of the elements in the specified collection to this collection (optional operation).
 void authorize()
           
protected  void bscInitializeAttributes(PaymentTransactionPk paymentTransactionPk)
           
 void clearTransactionEntryCollection()
          Removes all of the elements from this collection (optional operation).
 boolean containsTransactionEntry(TransactionEntry element)
          Returns true if this collection contains the specified element.
 boolean containsTransactionEntryCollection(Collection collection)
          Returns true if this collection contains all of the elements in the specified collection.
 void ejbActivate()
          ejbActivate method.
 PaymentTransactionPk ejbCreate(PaymentTransactionPk paymentTransactionPk)
           
 PaymentTransactionPk ejbFindByPrimaryKey(PaymentTransactionPk pk)
           
 Collection ejbFindByStatus(String status)
          Finds transactions by status.
 void ejbLoad()
          ejbLoad method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate(PaymentTransactionPk paymentTransactionPk)
           
 void ejbRemove()
          ejbRemove method.
 void ejbStore()
          ejbStore method.
 boolean equalsTransactionEntryCollection(Object object)
          Compares the specified object with this collection for equality.
 void failRetry()
           
 void failSettle()
           
 String getBatchId()
          Get the value of batchId
 com.beasys.commerce.axiom.contact.CreditCard getCreditCard()
          Get the value of creditCard
 PaymentTransactionValue getPaymentTransactionByValue()
          Get all of PaymentTransaction's attributes.
 String getStatus()
          Returns the current state name of the com.beasys.commerce.ebusiness.payment.PaymentWorkflow workflow
protected  Workflow getStatusWorkflow()
          returns the Workflow status.
 String getStatusWorkflowName()
          Returns the workflow classname that status uses.
 Price getTransactionAmount()
          Get the value of transactionAmount
 Date getTransactionDate()
          Get the value of transactionDate
 Collection getTransactionEntryCollection()
          Returns a deep copy of the entire collection
 SmartCollectionReference getTransactionEntryCollectionReference()
          Get the SmartCollectionReference for transactionEntry
 String getTransactionId()
           
 boolean isTransactionEntryCollectionEmpty()
          Returns true if this collection contains no elements.
 void markForSettle()
           
 void pendingSettle()
           
 void queryFail()
           
 void querySuccess()
           
 void reject()
           
 boolean removeTransactionEntry(TransactionEntry element)
          Removes a single instance of the specified element from this collection, if it is present (optional operation).
 boolean removeTransactionEntryCollection(Collection collection)
          Removes all this collection's elements that are also contained in the specified collection (optional operation).
 boolean retainTransactionEntryCollection(Collection collection)
          Retains only the elements in this collection that are contained in the specified collection (optional operation).
 void setBatchId(String batchId)
          Set the value of batchId
 void setCreditCard(com.beasys.commerce.axiom.contact.CreditCard creditCard)
          Set the value of creditCard
 void setEntityContext(EntityContext ctx)
          setEntityContext method.
 void setPaymentTransactionByValue(PaymentTransactionValue value)
          Set all of PaymentTransaction's attributes to the passed in value.
 void settle()
           
 void setTransactionAmount(Price transactionAmount)
          Set the value of transactionAmount
 void setTransactionDate(Date transactionDate)
          Set the value of transactionDate
 void setTransactionEntryCollection(Collection collection)
          Sets the entire collection
 void setTransactionEntryCollectionReference(SmartCollectionReference smartCollectionReference)
          Set the SmartCollectionReference for transactionEntry
 void setTransactionId(String value)
           
 void systemFailure()
           
 int transactionEntryCollectionHashCode()
          Returns the hash code value for this collection.
 Iterator transactionEntryCollectionIterator()
          Returns an iterator over the elements in this collection.
 int transactionEntryCollectionSize()
          Returns the number of elements in this collection.
 void unsetEntityContext()
          unsetEntityContext method.
 
Methods inherited from class com.beasys.commerce.foundation.EntityImpl
bscInitializeAttributes, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, ejbCreate, ejbFindAll, ejbFindByPrimaryKey, ejbPostCreate, enumerateRelationalBinding, enumerateRelationalBinding, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getEntityContext, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSmartBMP, initSmartBMP, isModified, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionId

public String transactionId
The order of which this transaction is a part.


creditCard

public com.beasys.commerce.axiom.contact.CreditCard creditCard


transactionDate

public Date transactionDate
The date of the transaction.


transactionEntry

public SmartCollectionReference transactionEntry


batchId

public String batchId
The batchId attribute is populated after a batch-commit request for the transaction has returned successfully. It is then used to query the Payment Service for the results of a settled transaction.


status

public WorkflowContext status


statusWorkflow

public transient Workflow statusWorkflow

transactionAmount

public Price transactionAmount
In case of partial transcation(ie. return, cancel or settlement) this represents remainng transacation amount.

Constructor Detail

PaymentTransactionImpl

public PaymentTransactionImpl()
Method Detail

getPaymentTransactionByValue

public PaymentTransactionValue getPaymentTransactionByValue()
Get all of PaymentTransaction's attributes.

Returns
PaymentTransactionValue the PaymentTransaction value object

setPaymentTransactionByValue

public void setPaymentTransactionByValue(PaymentTransactionValue value)
Set all of PaymentTransaction's attributes to the passed in value. Note: Primary key attributes are not set.

Parameters
PaymentTransactionValue - the PaymentTransaction value object

ejbCreate

public PaymentTransactionPk ejbCreate(PaymentTransactionPk paymentTransactionPk)
                               throws CreateException
Throws
CreateException

bscInitializeAttributes

protected void bscInitializeAttributes(PaymentTransactionPk paymentTransactionPk)
                                throws CreateException
Throws
CreateException

ejbPostCreate

public void ejbPostCreate(PaymentTransactionPk paymentTransactionPk)
                   throws CreateException
Throws
CreateException

ejbLoad

public void ejbLoad()
             throws EJBException
Description copied from class: EntityImpl
ejbLoad method.

Overrides:
ejbLoad in class EntityImpl
Throws
EJBException

ejbStore

public void ejbStore()
              throws EJBException
Description copied from class: EntityImpl
ejbStore method.

Overrides:
ejbStore in class EntityImpl
Throws
EJBException

ejbRemove

public void ejbRemove()
               throws RemoveException
Description copied from class: EntityImpl
ejbRemove method.

Overrides:
ejbRemove in class EntityImpl
Throws
RemoveException

ejbActivate

public void ejbActivate()
                 throws EJBException
Description copied from class: EntityImpl
ejbActivate method.

Overrides:
ejbActivate in class EntityImpl
Throws
EJBException

ejbPassivate

public void ejbPassivate()
                  throws EJBException
Description copied from class: EntityImpl
ejbPassivate method.

Overrides:
ejbPassivate in class EntityImpl
Throws
EJBException

setEntityContext

public void setEntityContext(EntityContext ctx)
                      throws EJBException
Description copied from class: EntityImpl
setEntityContext method.

Overrides:
setEntityContext in class EntityImpl
Throws
EJBException

unsetEntityContext

public void unsetEntityContext()
                        throws EJBException
Description copied from class: EntityImpl
unsetEntityContext method.

Overrides:
unsetEntityContext in class EntityImpl
Throws
EJBException

ejbFindByPrimaryKey

public PaymentTransactionPk ejbFindByPrimaryKey(PaymentTransactionPk pk)
                                         throws FinderException
Throws
FinderException

getCreditCard

public com.beasys.commerce.axiom.contact.CreditCard getCreditCard()
Get the value of creditCard

Returns
creditCard.

setCreditCard

public void setCreditCard(com.beasys.commerce.axiom.contact.CreditCard creditCard)
Set the value of creditCard

Parameters
creditCard - creditCard to be added

getTransactionDate

public Date getTransactionDate()
Get the value of transactionDate

Returns
transactionDate.

setTransactionDate

public void setTransactionDate(Date transactionDate)
Set the value of transactionDate

Parameters
transactionDate - transactionDate to be added

getTransactionEntryCollectionReference

public SmartCollectionReference getTransactionEntryCollectionReference()
Get the SmartCollectionReference for transactionEntry


setTransactionEntryCollectionReference

public void setTransactionEntryCollectionReference(SmartCollectionReference smartCollectionReference)
Set the SmartCollectionReference for transactionEntry


getTransactionEntryCollection

public Collection getTransactionEntryCollection()
Returns a deep copy of the entire collection


setTransactionEntryCollection

public void setTransactionEntryCollection(Collection collection)
Sets the entire collection


addTransactionEntry

public boolean addTransactionEntry(TransactionEntry element)
Ensures that this collection contains the specified element (optional operation).


addTransactionEntryCollection

public boolean addTransactionEntryCollection(Collection collection)
Adds all of the elements in the specified collection to this collection (optional operation).


clearTransactionEntryCollection

public void clearTransactionEntryCollection()
Removes all of the elements from this collection (optional operation).


containsTransactionEntry

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


containsTransactionEntryCollection

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


equalsTransactionEntryCollection

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


transactionEntryCollectionHashCode

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


isTransactionEntryCollectionEmpty

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


transactionEntryCollectionIterator

public Iterator transactionEntryCollectionIterator()
Returns an iterator over the elements in this collection.


removeTransactionEntry

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


removeTransactionEntryCollection

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


retainTransactionEntryCollection

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


transactionEntryCollectionSize

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


getBatchId

public String getBatchId()
Get the value of batchId

Returns
batchId.

setBatchId

public void setBatchId(String batchId)
Set the value of batchId

Parameters
batchId - batchId to be added

getStatusWorkflowName

public String getStatusWorkflowName()
Returns the workflow classname that status uses. Currently, this is set to "com.beasys.commerce.ebusiness.payment.PaymentWorkflow". You may override this by extending this class. This method is used internally by the BSCs.


getStatus

public String getStatus()
Returns the current state name of the com.beasys.commerce.ebusiness.payment.PaymentWorkflow workflow


getStatusWorkflow

protected Workflow getStatusWorkflow()
returns the Workflow status. If this is null, creates the workflow and resets it.

Throws
WorkflowInstantiationException - could not instantiate workflow

getTransactionId

public String getTransactionId()

setTransactionId

public void setTransactionId(String value)

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

authorize

public void authorize()
               throws WorkflowInstantiationException,
                      IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

reject

public void reject()
            throws WorkflowInstantiationException,
                   IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

failSettle

public void failSettle()
                throws WorkflowInstantiationException,
                       IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

markForSettle

public void markForSettle()
                   throws WorkflowInstantiationException,
                          IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

settle

public void settle()
            throws WorkflowInstantiationException,
                   IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

pendingSettle

public void pendingSettle()
                   throws WorkflowInstantiationException,
                          IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

querySuccess

public void querySuccess()
                  throws WorkflowInstantiationException,
                         IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

queryFail

public void queryFail()
               throws WorkflowInstantiationException,
                      IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

systemFailure

public void systemFailure()
                   throws WorkflowInstantiationException,
                          IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

failRetry

public void failRetry()
               throws WorkflowInstantiationException,
                      IllegalWorkflowTransitionException
Throws
WorkflowInstantiationException
IllegalWorkflowTransitionException

ejbFindByStatus

public Collection ejbFindByStatus(String status)
                           throws FinderException
Finds transactions by status.

Throws
FinderException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved