org.paneris.jammyjoes.shopping
Class ShoppingTrolleyItem

java.lang.Object
  extended by org.paneris.jammyjoes.shopping.ShoppingTrolleyItem
Direct Known Subclasses:
JammyJoesShoppingTrolleyItem

public abstract class ShoppingTrolleyItem
extends java.lang.Object


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  java.lang.Integer quantity
           
protected  ShoppingTrolley trolley
           
 
Constructor Summary
ShoppingTrolleyItem()
           
 
Method Summary
 java.lang.String displayCurrency(double value)
           
 java.lang.String getDeliveryDisplay()
           
abstract  double getDeliveryValue()
           
 java.lang.String getDescription()
           
 java.lang.Integer getId()
           
 double getPrice()
           
 java.lang.String getPriceDisplay()
           
 java.lang.Integer getQuantity()
           
 java.lang.String getQuantityDisplay()
           
 double getTotalValue()
           
 java.lang.String getTotalValueDisplay()
           
 double getValue()
           
 java.lang.String getValueDisplay()
           
 void initialise(ShoppingTrolley trolley, org.melati.Melati melati, java.lang.Integer id, java.lang.String description, java.lang.Double price)
          public Constructor to build a trolley item from some id
protected abstract  void load(java.lang.Integer id)
           
static ShoppingTrolleyItem newTrolleyItem(MelatiShoppingConfig config)
           
 void setPrice(double p)
           
 void setQuantity(java.lang.Integer q)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.Integer id

quantity

protected java.lang.Integer quantity

price

protected double price

locale

protected java.util.Locale locale

description

protected java.lang.String description

trolley

protected ShoppingTrolley trolley

melati

public org.melati.Melati melati
Constructor Detail

ShoppingTrolleyItem

public ShoppingTrolleyItem()
Method Detail

newTrolleyItem

public static ShoppingTrolleyItem newTrolleyItem(MelatiShoppingConfig config)
                                          throws org.melati.util.InstantiationPropertyException
Throws:
org.melati.util.InstantiationPropertyException

initialise

public void initialise(ShoppingTrolley trolley,
                       org.melati.Melati melati,
                       java.lang.Integer id,
                       java.lang.String description,
                       java.lang.Double price)
public Constructor to build a trolley item from some id


load

protected abstract void load(java.lang.Integer id)

getId

public java.lang.Integer getId()

getDescription

public java.lang.String getDescription()

getQuantity

public java.lang.Integer getQuantity()

setQuantity

public void setQuantity(java.lang.Integer q)

getQuantityDisplay

public java.lang.String getQuantityDisplay()

getPrice

public double getPrice()

setPrice

public void setPrice(double p)

getPriceDisplay

public java.lang.String getPriceDisplay()

getDeliveryValue

public abstract double getDeliveryValue()

getDeliveryDisplay

public java.lang.String getDeliveryDisplay()

getValue

public double getValue()

getValueDisplay

public java.lang.String getValueDisplay()

getTotalValue

public double getTotalValue()

getTotalValueDisplay

public java.lang.String getTotalValueDisplay()

displayCurrency

public java.lang.String displayCurrency(double value)


Copyright © 2001-2008 PanEris. All Rights Reserved.