com.ibm.websphere.samples.plantsbywebsphereejb
Class ShoppingCartItem

java.lang.Object
  extended by com.ibm.websphere.samples.plantsbywebsphereejb.ShoppingCartItem
All Implemented Interfaces:
java.io.Serializable

public class ShoppingCartItem
extends java.lang.Object
implements java.io.Serializable

Orderable item of inventory

See Also:
Serialized Form

Constructor Summary
ShoppingCartItem()
          Default constructor.
ShoppingCartItem(Inventory inv)
          Copies orderable data from inventory data.
ShoppingCartItem(java.lang.String id, java.lang.String name, java.lang.String pkginfo, float price, float cost, int category, int quantity)
          Constructor of store item
ShoppingCartItem(java.lang.String id, java.lang.String name, java.lang.String heading, java.lang.String desc, java.lang.String pkginfo, java.lang.String image, float price, float cost, int quantity, int category, java.lang.String notes, boolean isPublic)
          Constructor of store item
 
Method Summary
 boolean equals(ShoppingCartItem si)
          Compares equality of store items.
 int getCategory()
          Get the category of this store item.
 float getCost()
          Get the cost of this store item.
 java.lang.String getDescription()
          Get the description of this store item.
 java.lang.String getHeading()
          Get the description heading of this store item.
 java.lang.String getID()
          Get the ID of this store item.
 java.lang.String getImage()
          Get the image file of this store item.
 java.lang.String getName()
          Get the name of this store item.
 java.lang.String getNotes()
          Get the notes of this store item.
 java.lang.String getPkginfo()
          Get the package info of this store item.
 float getPrice()
          Get the price of this store item.
 int getQuantity()
          Get the quantity of this store item.
 boolean isPublic()
          Is this store item viewable by the public?
 void setQuantity(int quantity)
          Set the quantity of this store item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingCartItem

public ShoppingCartItem()
Default constructor.


ShoppingCartItem

public ShoppingCartItem(java.lang.String id,
                        java.lang.String name,
                        java.lang.String pkginfo,
                        float price,
                        float cost,
                        int category,
                        int quantity)
Constructor of store item

Parameters:
id - - id of this store item.
name - - name of this store item.
pkginfo - - package info of this store item.
price - - price of this store item.
cost - - cost of this store item.
category - - category of this store item.
quantity - - quantity of this store item.

ShoppingCartItem

public ShoppingCartItem(java.lang.String id,
                        java.lang.String name,
                        java.lang.String heading,
                        java.lang.String desc,
                        java.lang.String pkginfo,
                        java.lang.String image,
                        float price,
                        float cost,
                        int quantity,
                        int category,
                        java.lang.String notes,
                        boolean isPublic)
Constructor of store item

Parameters:
id - - id of this store item.
name - - name of this store item.
heading - - description heading of this store item.
desc - - description of this store item.
pkginfo - - package info of this store item.
image - - image of this store item.
price - - price of this store item.
cost - - cost of this store item.
quantity - - quantity of this store item.
category - - category of this store item.
notes - - notes of this store item.
isPublic - - isPublic flag of this store item.

ShoppingCartItem

public ShoppingCartItem(Inventory inv)
Copies orderable data from inventory data.

Parameters:
inv - - Inventory item
Method Detail

equals

public boolean equals(ShoppingCartItem si)
Compares equality of store items.


getID

public java.lang.String getID()
Get the ID of this store item.


getName

public java.lang.String getName()
Get the name of this store item.


getHeading

public java.lang.String getHeading()
Get the description heading of this store item.


getDescription

public java.lang.String getDescription()
Get the description of this store item.


getPkginfo

public java.lang.String getPkginfo()
Get the package info of this store item.


getImage

public java.lang.String getImage()
Get the image file of this store item.


getPrice

public float getPrice()
Get the price of this store item.


getCost

public float getCost()
Get the cost of this store item.


getQuantity

public int getQuantity()
Get the quantity of this store item.


getCategory

public int getCategory()
Get the category of this store item.


getNotes

public java.lang.String getNotes()
Get the notes of this store item.


isPublic

public boolean isPublic()
Is this store item viewable by the public?


setQuantity

public void setQuantity(int quantity)
Set the quantity of this store item.