|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.core.ShoppingItem
This ShoppingItem bean represents the information we know about an item that can be bought by a user.
| Field Summary | |
protected String |
theDescription
a description of the item |
protected Money |
theDiscount
The discount of the item. |
protected Long |
theId
items's id used as a key by hibernate |
protected Money |
thePrice
The total price of the item. |
protected Long |
theQuantity
the number of these items |
protected Money |
theTax
The total tax of the item. |
protected String |
theTaxNote
note about the tax |
protected Money |
theUnitPrice
The individual price of an item. |
| Constructor Summary | |
ShoppingItem()
null constructor required by hibernate. |
|
ShoppingItem(String description,
Money unitprice,
Money discount,
Money tax,
String taxnote)
constructor with default quantity of 1. |
|
| Method Summary | |
boolean |
equals(Object o)
Tests if the supplied object is equal to this ShoppingItem. |
String |
getDescription()
Returns a short description. |
Money |
getDiscount()
Returns the discount. |
Integer |
getDiscountAmount()
Returns the total discount. |
Long |
getId()
Get the ShoppingItem's ID number. |
Money |
getPrice()
Returns the unit price times the quanitity. |
Long |
getQuantity()
Returns the number of these shopping items. |
Money |
getTax()
Returns the total tax. |
Integer |
getTaxAmount()
Returns the total tax. |
String |
getTaxNote()
Returns the total taxNote. |
Money |
getUnitPrice()
Returns the unit price. |
int |
hashcode()
the hashcode. |
void |
setDescription(String desc)
Set a short description of this ShoppingItem. |
void |
setDiscount(Money price)
Set the discount of this ShoppingItem. |
void |
setDiscountAmount(Integer discount)
Set the discount of this ShoppingItem. |
protected void |
setId(Long id)
Sets the The ShoppingItem's ID number. |
void |
setQuantity(Long quantity)
Set the number of these ShoppingItems. |
void |
setTax(Money tax)
Set the tax of this ShoppingItem. |
void |
setTaxAmount(Integer tax)
Set the tax of this ShoppingItem. |
void |
setTaxNote(String note)
Set the taxNote of this ShoppingItem. |
void |
setTemplateId(Long id)
Sets the The ShoppingItem's ID number directly. |
void |
setUnitPrice(Money price)
Set the unit price of this ShoppingItem. |
String |
toString()
a string of the shopping item. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Long theId
protected Long theQuantity
protected String theDescription
protected Money theDiscount
protected Money thePrice
protected Money theUnitPrice
protected Money theTax
protected String theTaxNote
| Constructor Detail |
public ShoppingItem()
public ShoppingItem(String description,
Money unitprice,
Money discount,
Money tax,
String taxnote)
description - A description of the item.discount - The discount on the item.tax - The tax charged on the item.taxnote - A not about the tax.| Method Detail |
public Long getId()
ShoppingItem's ID number.
getId in interface PersistableShoppingItem's ID number.protected void setId(Long id)
ShoppingItem's ID number.
id - The ID number to set.public void setTemplateId(Long id)
ShoppingItem'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 getDescription()
public void setDescription(String desc)
desc - A description of this ShoppingItem.public Long getQuantity()
public void setQuantity(Long quantity)
quantity - The number of these ShoppingItems.public Money getPrice()
public Money getUnitPrice()
public void setUnitPrice(Money price)
price - The price of this ShoppingItem.public Money getDiscount()
public void setDiscount(Money price)
price - The discount of this ShoppingItem.public Money getTax()
public void setTax(Money tax)
tax - The tax of this ShoppingItem.public Integer getTaxAmount()
public void setTaxAmount(Integer tax)
tax - The tax of this ShoppingItem.public Integer getDiscountAmount()
public void setDiscountAmount(Integer discount)
discount - The discount on this ShoppingItem.public String getTaxNote()
public void setTaxNote(String note)
note - The taxNote of this ShoppingItem.public boolean equals(Object o)
o - The object to test against this ShoppingItem. Must also be a
ShoppingItem to make sense.
public String toString()
public int hashcode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||