|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.paneris.melati.shopping.ShoppingTrolleyItem
public abstract class ShoppingTrolleyItem
Extend this to create your own ShoppingTrolleyItem.
Field Summary | |
---|---|
protected java.lang.String |
description
|
protected java.lang.Integer |
id
|
protected java.util.Locale |
locale
|
org.melati.Melati |
melati
|
protected double |
price
|
protected double |
quantity
|
protected ShoppingTrolley |
trolley
|
Constructor Summary | |
---|---|
ShoppingTrolleyItem()
|
Method Summary | |
---|---|
java.lang.String |
displayCurrency(double value)
format a number in the locale currency. |
java.lang.String |
getDeliveryDisplay()
Display the cost of delivery. |
abstract double |
getDeliveryValue()
Work out the cost of delivery. |
java.lang.String |
getDescription()
The description. |
java.lang.Integer |
getId()
The id. |
double |
getPrice()
The price of this item. |
java.lang.String |
getPriceDisplay()
Display the price of this item. |
double |
getQuantity()
The quantity on the trolley. |
java.lang.String |
getQuantityDisplay()
Get the quantity on the trolley formatted for display. |
double |
getTotalValue()
Calculate the value (without delivery). |
java.lang.String |
getTotalValueDisplay()
Display the item value. |
double |
getValue()
Calculate the value (without delivery). |
java.lang.String |
getValueDisplay()
Display the item value. |
void |
initialise(ShoppingTrolley trolleyIn,
org.melati.Melati melatiIn,
java.lang.Integer idIn,
java.lang.String descriptionIn,
java.lang.Double priceIn)
Public Constructor to build a trolley item from some id. |
protected abstract void |
load(java.lang.Integer idIn)
Load in information about this product given an id. |
static ShoppingTrolleyItem |
newTrolleyItem(MelatiShoppingConfig config)
|
void |
setPrice(double p)
Set the price of this item. |
void |
setQuantity(double q)
Set the quantity on the trolley. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Integer id
protected double quantity
protected double price
protected java.util.Locale locale
protected java.lang.String description
protected ShoppingTrolley trolley
public org.melati.Melati melati
Constructor Detail |
---|
public ShoppingTrolleyItem()
Method Detail |
---|
public static ShoppingTrolleyItem newTrolleyItem(MelatiShoppingConfig config) throws org.melati.util.InstantiationPropertyException
org.melati.util.InstantiationPropertyException
public void initialise(ShoppingTrolley trolleyIn, org.melati.Melati melatiIn, java.lang.Integer idIn, java.lang.String descriptionIn, java.lang.Double priceIn)
protected abstract void load(java.lang.Integer idIn)
public java.lang.Integer getId()
public java.lang.String getDescription()
public double getQuantity()
public void setQuantity(double q)
public java.lang.String getQuantityDisplay()
public double getPrice()
public void setPrice(double p)
public java.lang.String getPriceDisplay()
public abstract double getDeliveryValue()
public java.lang.String getDeliveryDisplay()
public double getValue()
public java.lang.String getValueDisplay()
public double getTotalValue()
public java.lang.String getTotalValueDisplay()
public java.lang.String displayCurrency(double value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |