|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.core.Merchant
A Merchant will be a real world corporate entity and
in order to handle payment processing will have a contract with a
CreditCardAuthoriser, and a range of ShoppingItems in
the shop. You may need to write your own implementation of the
CreditCardAuthoriser and if so you should extend
AbstractCreditCardAuthoriser.
| Field Summary | |
protected List |
theBanks
The list names of banks that the Merchant uses. |
protected String |
theCompanyCode
The unique company number, eg in australia ABN 12345677, or in Holland BVi 20031117109. |
protected String |
theEmail
The email address the Merchant uses. |
protected Long |
theId
The merchant's id used as a key by hibernate |
protected Long |
theMerchantId
The MerchantId of this Merchant provided by the
CreditCardAuthoriser. |
protected Map |
theMetaData
a map of application definable meta-data |
protected String |
theName
The Merchant's name |
| Constructor Summary | |
Merchant()
null constructor required by hibernate. |
|
Merchant(String name,
Long id,
String code,
String email)
constructor takes a name, id, code and email address. |
|
| Method Summary | |
void |
addBank(String bankname)
Add a bank to the Merchant's bank list. |
void |
addMetaData(String key,
String metadata)
Add a piece of MetaData to this Merchant. |
boolean |
equals(Object o)
Tests if the supplied object is equal to this Merchant, ie do they have the same Id? |
List |
getBanks()
get the List of bank names this Merchant uses. |
String |
getCompanyCode()
Get the country specific, government assigned company code for this Merchant. |
String |
getEmail()
Get the Merchant's administrative email address. |
Long |
getId()
the merchant id |
Long |
getMerchantId()
Get the merchant-id of this Merchant. |
Map |
getMetaData()
Get the Map of MetaData about this Merchant. |
Object |
getMetaData(Object key)
returns the metadata for the particular key. |
String |
getName()
Get the name of this Merchant. |
int |
hashcode()
Objects must override the hashcode if they override the equals method. |
void |
removeBank(String bankname)
Remove a bank from the Merchant's bank list. |
void |
removeMetaData(String key)
Remove a piece of MetaData from this Merchant. |
void |
setBanks(List banks)
Set the list of bank names used by this Merchant. |
void |
setCompanyCode(String code)
Set the country specifi, government assugned company code of this
Merchant. |
void |
setEmail(String email)
Set the Merchant's administrative email address. |
protected void |
setId(Long id)
Sets the The Merchant's Id number. |
void |
setMerchantId(Long id)
Set the Merchant's merchant-id. |
void |
setMetaData(Map metadata)
Set this Merchant's MetaData Map. |
void |
setName(String name)
Set the Merchant's name. |
void |
setTemplateId(Long id)
Sets the The Merchant's ID number directly. |
String |
toString()
displays the merchant's name. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Long theId
protected String theName
Merchant's name
protected Long theMerchantId
Merchant provided by the
CreditCardAuthoriser.
protected String theCompanyCode
protected String theEmail
Merchant uses.
protected List theBanks
Merchant uses.
protected Map theMetaData
| Constructor Detail |
public Merchant()
public Merchant(String name,
Long id,
String code,
String email)
name - The name of the Merchant.id - The MecrhantId provided to the Merchant by
the CreditCardAuthoriser in the real world.code - The country specific government assignd company code for
this Merchant.email - the contact email address of the Merchant.| Method Detail |
public Long getId()
getId in interface PersistableMerchant's Id number.protected void setId(Long id)
Merchant's Id number.
id - The Id number to set.public void setTemplateId(Long id)
Merchant'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 String getName()
Merchant.
Merchant.public void setName(String name)
Merchant's name.
name - The User who wrote this this Merchant.public Long getMerchantId()
Merchant.
Merchant.public void setMerchantId(Long id)
Merchant's merchant-id.
id - The merchant id of this Merchant.public String getCompanyCode()
Merchant.
Merchant. May be null.public void setCompanyCode(String code)
Merchant.
code - The code of this Merchant.public String getEmail()
Merchant's administrative email address.
Merchant's admin email address.public void setEmail(String email)
Merchant's administrative email address.
email - The Merchant's admin email address.public List getBanks()
Merchant uses.
Merchant.public void setBanks(List banks)
Merchant.
banks - The List of bank names used by this Merchant.public void addBank(String bankname)
Merchant's bank list.
bankname - The name of the bank to add.public void removeBank(String bankname)
Merchant's bank list.
bankname - The name of the bank to remove.public Map getMetaData()
Merchant.
getMetaData in interface ExtensibleMerchant.public Object getMetaData(Object key)
getMetaData in interface Extensiblekey - The key to the bit of meta data you want.
public void setMetaData(Map metadata)
Merchant's MetaData Map.
setMetaData in interface Extensiblemetadata - The Map of meta data for this Merchant.
public void addMetaData(String key,
String metadata)
Merchant.
addMetaData in interface Extensiblekey - The key under which to file the meta data.metadata - The meta data to add.public void removeMetaData(String key)
Merchant.
removeMetaData in interface Extensiblekey - The MetaData key to remove.public String toString()
Merchant's name. useful for debugging.public boolean equals(Object o)
o - The object to test against this Merchant. Must also be a
Merchant to make sense.
public int hashcode()
Merchant.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||