|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.samples.plantsbywebsphereejb.CatalogBean
public class CatalogBean
CatalogBean is the implementation class for the Catalog
stateless session
EJB. CatalogBean implements each of the business methods in the Catalog
EJB remote interface and each of the EJB lifecycle methods in the javax.ejb.SessionBean
interface.
Catalog
Constructor Summary | |
---|---|
CatalogBean()
|
Method Summary | |
---|---|
boolean |
addItem(Inventory item)
Add an inventory item. |
boolean |
addItem(StoreItem item)
Add an StoreItem item (same as Inventory item). |
boolean |
deleteItem(java.lang.String inventoryID)
Delete an inventory item. |
StoreItem |
getItem(java.lang.String inventoryID)
Get the StoreItem for the given ID. |
byte[] |
getItemImageBytes(java.lang.String inventoryID)
Get the image for the inventory item. |
Inventory |
getItemInventory(java.lang.String inventoryID)
Get the Inventory item for the given ID. |
java.util.Vector |
getItems()
Get all inventory items. |
java.util.Vector |
getItemsByCategory(int category)
Get all inventory items for the given category. |
java.util.Vector |
getItemsLikeName(java.lang.String name)
Get inventory items that contain a given String within their names. |
void |
setItemCategory(java.lang.String inventoryID,
int category)
Set the inventory item's category. |
void |
setItemCost(java.lang.String inventoryID,
float cost)
Set the inventory item's cost. |
void |
setItemDescription(java.lang.String inventoryID,
java.lang.String desc)
Set the inventory item's description. |
void |
setItemHeading(java.lang.String inventoryID,
java.lang.String heading)
Set the inventory item's heading. |
void |
setItemImageBytes(java.lang.String inventoryID,
byte[] imgbytes)
Set the image for the inventory item. |
void |
setItemImageFileName(java.lang.String inventoryID,
java.lang.String imageName)
Set the inventory item's image file name. |
void |
setItemName(java.lang.String inventoryID,
java.lang.String name)
Set the inventory item's name. |
void |
setItemNotes(java.lang.String inventoryID,
java.lang.String notes)
Set the inventory item's notes. |
void |
setItemPkginfo(java.lang.String inventoryID,
java.lang.String pkginfo)
Set the inventory item's package information. |
void |
setItemPrice(java.lang.String inventoryID,
float price)
Set the inventory item's price. |
void |
setItemPrivacy(java.lang.String inventoryID,
boolean isPublic)
Set the inventory item's access availability. |
void |
setItemQuantity(java.lang.String inventoryID,
int quantity)
Set the inventory item's quantity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CatalogBean()
Method Detail |
---|
public java.util.Vector getItems()
getItems
in interface Catalog
public java.util.Vector getItemsByCategory(int category)
getItemsByCategory
in interface Catalog
category
- of items desired.
public java.util.Vector getItemsLikeName(java.lang.String name)
getItemsLikeName
in interface Catalog
name
- String to search names for.
public StoreItem getItem(java.lang.String inventoryID)
getItem
in interface Catalog
inventoryID
- - ID of the Inventory item desired.
public Inventory getItemInventory(java.lang.String inventoryID)
getItemInventory
in interface Catalog
inventoryID
- - ID of the Inventory item desired.
public boolean addItem(Inventory item)
addItem
in interface Catalog
item
- The Inventory to add.
public boolean addItem(StoreItem item)
addItem
in interface Catalog
item
- The StoreItem to add.
public boolean deleteItem(java.lang.String inventoryID)
deleteItem
in interface Catalog
inventoryID
- The ID of the inventory item to delete.
public void setItemName(java.lang.String inventoryID, java.lang.String name)
setItemName
in interface Catalog
inventoryID
- The inventory item's ID.name
- The inventory item's new name.public void setItemHeading(java.lang.String inventoryID, java.lang.String heading)
setItemHeading
in interface Catalog
inventoryID
- The inventory item's ID.heading
- The inventory item's new heading.public void setItemDescription(java.lang.String inventoryID, java.lang.String desc)
setItemDescription
in interface Catalog
inventoryID
- The inventory item's ID.desc
- The inventory item's new description.public void setItemPkginfo(java.lang.String inventoryID, java.lang.String pkginfo)
setItemPkginfo
in interface Catalog
inventoryID
- The inventory item's ID.pkginfo
- The inventory item's new package information.public void setItemCategory(java.lang.String inventoryID, int category)
setItemCategory
in interface Catalog
inventoryID
- The inventory item's ID.category
- The inventory item's new category.public void setItemImageFileName(java.lang.String inventoryID, java.lang.String imageName)
setItemImageFileName
in interface Catalog
inventoryID
- The inventory item's ID.imageName
- The inventory item's new image file name.public byte[] getItemImageBytes(java.lang.String inventoryID)
getItemImageBytes
in interface Catalog
inventoryID
- The id of the inventory item wanted.
public void setItemImageBytes(java.lang.String inventoryID, byte[] imgbytes)
setItemImageBytes
in interface Catalog
inventoryID
- The id of the inventory item wanted.imgbytes
- Buffer containing the image.public void setItemPrice(java.lang.String inventoryID, float price)
setItemPrice
in interface Catalog
inventoryID
- The inventory item's ID.price
- The inventory item's new price.public void setItemCost(java.lang.String inventoryID, float cost)
setItemCost
in interface Catalog
inventoryID
- The inventory item's ID.cost
- The inventory item's new cost.public void setItemQuantity(java.lang.String inventoryID, int quantity)
setItemQuantity
in interface Catalog
inventoryID
- The inventory item's ID.quantity
- The inventory item's new quantity.public void setItemNotes(java.lang.String inventoryID, java.lang.String notes)
setItemNotes
in interface Catalog
inventoryID
- The inventory item's ID.notes
- The inventory item's new notes.public void setItemPrivacy(java.lang.String inventoryID, boolean isPublic)
setItemPrivacy
in interface Catalog
inventoryID
- The inventory item's ID.isPublic
- True, if this item can be viewed by the public.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |