com.ibm.websphere.samples.plantsbywebsphereejb
Class StoreItem

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

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

A class to hold a store item's data.

See Also:
Serialized Form

Constructor Summary
StoreItem()
          Default constructor.
StoreItem(Inventory inv)
          Constructor to convert an Inventory object to StoreItem.
StoreItem(java.lang.String id, java.lang.String name, java.lang.String pkginfo, float price, float cost, int category, int quantity)
          Constructor of store item
StoreItem(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(StoreItem 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

StoreItem

public StoreItem()
Default constructor.


StoreItem

public StoreItem(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.

StoreItem

public StoreItem(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.

StoreItem

public StoreItem(Inventory inv)
Constructor to convert an Inventory object to StoreItem.

Parameters:
inv - - Inventory item
Method Detail

equals

public boolean equals(StoreItem 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.