BEA Systems, Inc.

com.beasys.commerce.axiom.contact
Class CreditCardImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.BelongingImpl
        |
        +--com.beasys.commerce.axiom.contact.CreditCardImpl

public class CreditCardImpl
extends BelongingImpl
implements CreditCard

Information needed to submit a transaction to a credit card company on behalf of a customer.

See Also:
CreditCard, CreditCardHome, Serialized Form

Field Summary
 Address billingAddress
           Containment: By Value Multiplicity: 1:1
 java.lang.String company
          The name of the company if this is a corporate card.
 java.lang.String displayNumber
          Display number in the form XXXX XXXX XXXX 1234.
 java.sql.Date expirationDate
          The date on which the card expires.
 java.lang.String name
          The name printed on the card.
 java.lang.String number
          The account number for the card.
 java.lang.String type
          The issuing authority for the account number (e.g.
 
Fields inherited from class com.beasys.commerce.foundation.BelongingImpl
__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty
 
Constructor Summary
CreditCardImpl()
           
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare this belonging to another
 java.lang.String findCreditCardTypeFromNumber(java.lang.String creditCardNumber)
           
 Address getBillingAddress()
          Get the value of billingAddress
 java.lang.String getCompany()
          Get the value of company
 java.lang.String getDisplayNumber()
          Get the value of displayNumber
 java.sql.Date getExpirationDate()
          Get the value of expirationDate
 java.lang.String getName()
          Get the value of name
 java.lang.String getNumber()
          Get the value of number
 java.lang.String getType()
          Get the value of type
 java.lang.String interfaceName()
          interfaceName() returns the unqualified name of the interface from the UML model
 void setBillingAddress(Address billingAddress)
          Set the value of billingAddress
 void setByValue(Belonging value)
          It is possible to call set-by-value with a superclass.
 void setCompany(java.lang.String company)
          Set the value of company
 void setDisplayNumber(java.lang.String displayNumber)
          Set the value of displayNumber
 void setExpirationDate(java.sql.Date expirationDate)
          Set the value of expirationDate
 void setName(java.lang.String name)
          Set the value of name
 void setNumber(java.lang.String number)
          Set the value of number
 void setType(java.lang.String type)
          Set the value of type
 boolean validate()
           
 Belonging value()
          value() is a more typesafe implementation of clone()
 
Methods inherited from class com.beasys.commerce.foundation.BelongingImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clone, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, equals, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getPersistenceHelperPlugin, hashCode, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

number

public java.lang.String number
The account number for the card.

billingAddress

public Address billingAddress

company

public java.lang.String company
The name of the company if this is a corporate card.

type

public java.lang.String type
The issuing authority for the account number (e.g. Visa, MasterCard, American Express ).

expirationDate

public java.sql.Date expirationDate
The date on which the card expires. The day will be set to the last day of the month on which the card expires.

name

public java.lang.String name
The name printed on the card.

displayNumber

public java.lang.String displayNumber
Display number in the form XXXX XXXX XXXX 1234. Obviates the need to decrypt when only display is required.
Constructor Detail

CreditCardImpl

public CreditCardImpl()
Method Detail

getNumber

public java.lang.String getNumber()
Get the value of number
Specified by:
getNumber in interface CreditCard
Returns:
number.

setNumber

public void setNumber(java.lang.String number)
Set the value of number
Specified by:
setNumber in interface CreditCard
Parameters:
number - number to be added

getBillingAddress

public Address getBillingAddress()
Get the value of billingAddress
Specified by:
getBillingAddress in interface CreditCard
Returns:
billingAddress.

setBillingAddress

public void setBillingAddress(Address billingAddress)
Set the value of billingAddress
Specified by:
setBillingAddress in interface CreditCard
Parameters:
billingAddress - billingAddress to be added

getCompany

public java.lang.String getCompany()
Get the value of company
Specified by:
getCompany in interface CreditCard
Returns:
company.

setCompany

public void setCompany(java.lang.String company)
Set the value of company
Specified by:
setCompany in interface CreditCard
Parameters:
company - company to be added

getType

public java.lang.String getType()
Get the value of type
Specified by:
getType in interface CreditCard
Returns:
type.

setType

public void setType(java.lang.String type)
Set the value of type
Specified by:
setType in interface CreditCard
Parameters:
type - type to be added

getExpirationDate

public java.sql.Date getExpirationDate()
Get the value of expirationDate
Specified by:
getExpirationDate in interface CreditCard
Returns:
expirationDate.

setExpirationDate

public void setExpirationDate(java.sql.Date expirationDate)
Set the value of expirationDate
Specified by:
setExpirationDate in interface CreditCard
Parameters:
expirationDate - expirationDate to be added

getName

public java.lang.String getName()
Get the value of name
Specified by:
getName in interface CreditCard
Returns:
name.

setName

public void setName(java.lang.String name)
Set the value of name
Specified by:
setName in interface CreditCard
Parameters:
name - name to be added

getDisplayNumber

public java.lang.String getDisplayNumber()
Get the value of displayNumber
Specified by:
getDisplayNumber in interface CreditCard
Returns:
displayNumber.

setDisplayNumber

public void setDisplayNumber(java.lang.String displayNumber)
Set the value of displayNumber
Specified by:
setDisplayNumber in interface CreditCard
Parameters:
displayNumber - displayNumber to be added

value

public Belonging value()
value() is a more typesafe implementation of clone()
Returns:
a clone of this instance

interfaceName

public java.lang.String interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model
Returns:
the unqualified name of the belonging interface from the UML model

setByValue

public void setByValue(Belonging value)
It is possible to call set-by-value with a superclass. If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values.

It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.

Overrides:
setByValue in class BelongingImpl
Tags copied from interface: Belonging
Parameters:
belonging - The Belonging to use for initialization.

compareTo

public int compareTo(java.lang.Object o)
Compare this belonging to another
Overrides:
compareTo in class BelongingImpl
Parameters:
o - target object for comparision
Returns:
0 objects are equal

validate

public boolean validate()
Specified by:
validate in interface CreditCard

findCreditCardTypeFromNumber

public java.lang.String findCreditCardTypeFromNumber(java.lang.String creditCardNumber)
                                              throws InvalidArgumentException
Specified by:
findCreditCardTypeFromNumber in interface CreditCard
Throws:
InvalidArgumentException -  

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved