|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.core.CreditCard
This CreditCard bean represents the information we know about a
User's credit card.
| Field Summary | |
protected String |
theCardNumber
the card's number as a string |
protected Integer |
theExpiryMonth
the card's expiry month, a two digit value between 01 and 12 used to verify the card |
protected Integer |
theExpiryYear
the card's expiry year, a two digit value used to verify the card |
protected Long |
theId
card's id used as a key by hibernate |
protected String |
theNameOnCard
the name on the card |
protected BigInteger |
theNumber
the card's number |
protected Integer |
theSecurityCode
the 3 digit security code on the back of some cards |
protected String |
theType
the card's type |
| Constructor Summary | |
CreditCard()
null constructor required by hibernate. |
|
CreditCard(BigInteger num,
int expmth,
int expyr,
String noc)
constructor takes card number, type, expiry date and name on card. |
|
| Method Summary | |
String |
getCardNumber()
Get the string varsion of the card number directly. |
Integer |
getExpiryMonth()
get the expiry month. |
Integer |
getExpiryYear()
get the expiry year. |
Long |
getId()
Get the CreditCard's ID number. |
String |
getNameOnCard()
get the name on the card. |
Integer |
getSecurityCode()
get the security code. |
String |
getType()
get the type. |
protected void |
setCardNumber(String num)
Way for Hibernate to set the string varsion of the card number directly. |
void |
setExpiryMonth(int mth)
Sets the expiry month as an int. |
protected void |
setExpiryMonth(Integer mth)
Sets the expiry month of the card. |
void |
setExpiryYear(int yr)
set the expiry year of the card as an int. |
protected void |
setExpiryYear(Integer yr)
set the expiry year of the card. |
protected void |
setId(Long id)
Sets the The CreditCard's ID number. |
void |
setNameOnCard(String name)
set the name on the card. |
void |
setNumber(BigInteger num)
set the card number. |
protected void |
setSecurityCode(Integer securitycode)
set the security code of card. |
void |
setTemplateId(Long id)
Sets the The CreditCard's ID number directly. |
protected void |
setType(String type)
set the type of card. |
String |
toString()
a simple string representation of this credit card. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Long theId
protected BigInteger theNumber
protected String theCardNumber
protected String theType
protected Integer theExpiryMonth
protected Integer theExpiryYear
protected String theNameOnCard
protected Integer theSecurityCode
| Constructor Detail |
public CreditCard()
public CreditCard(BigInteger num,
int expmth,
int expyr,
String noc)
num - The card number.expmth - The two digit expiry month. 01 = jan.expyr - The two digit expiry year.noc - The Name on the Card.| Method Detail |
public Long getId()
CreditCard's ID number.
getId in interface PersistableCreditCard's ID number.protected void setId(Long id)
CreditCard's ID number.
id - The ID number to set.public void setTemplateId(Long id)
CreditCard's ID number directly. This is only
to be used when creating a template object, and is not to be used when
creating actual objects that will be persisted.
setTemplateId in interface Persistableid - The ID number to set.
public void setNumber(BigInteger num)
throws IllegalArgumentException
num - the card number.
IllegalArgumentException - if the card number was invalid.protected void setCardNumber(String num)
num - The string version of the card number.public String getCardNumber()
public Integer getSecurityCode()
protected void setSecurityCode(Integer securitycode)
securitycode - The security code of the card.public String getType()
protected void setType(String type)
type - The type of card.public Integer getExpiryMonth()
public void setExpiryMonth(int mth)
throws IllegalArgumentException
mth - The month number. January is 1.
IllegalArgumentException - if the month provided was less than 1
or greater than 12.protected void setExpiryMonth(Integer mth)
mth - The two digit expiry month.public Integer getExpiryYear()
public void setExpiryYear(int yr)
yr - The two digit expiry year.protected void setExpiryYear(Integer yr)
yr - The two digit expiry year.public String getNameOnCard()
public void setNameOnCard(String name)
name - The name on the card.public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||