|
|||||||||
| 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,
CatalogHome,
Serialized Form| Constructor Summary | |
|---|---|
CatalogBean()
|
|
| Method Summary | |
|---|---|
boolean |
addItem(StoreItem item)
Add an inventory item. |
boolean |
deleteItem(java.lang.String inventoryID)
Delete an inventory item. |
void |
ejbActivate()
ejbActivate Session EJB lifecycle callback method. |
void |
ejbCreate()
ejbCreate Session EJB lifecycle callback method. |
void |
ejbPassivate()
ejbPassivate Session EJB lifecycle callback method. |
void |
ejbRemove()
ejbRemove Session EJB lifecycle callback method. |
StoreItem |
getItem(java.lang.String inventoryID)
Get the Inventory item for the given ID. |
byte[] |
getItemImageBytes(java.lang.String inventoryID)
Get the image for the inventory item. |
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. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext Session EJB lifecycle callback method to set the EJB sessionContext for this EJB. |
| 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()
public java.util.Vector getItemsByCategory(int category)
category - of items desired.
public java.util.Vector getItemsLikeName(java.lang.String name)
name - String to search names for.
public StoreItem getItem(java.lang.String inventoryID)
inventoryID - - ID of the Inventory item desired.
public boolean addItem(StoreItem item)
item - The StoreItem to add.
public boolean deleteItem(java.lang.String inventoryID)
inventoryID - The ID of the inventory item to delete.
public void setItemName(java.lang.String inventoryID,
java.lang.String name)
inventoryID - The inventory item's ID.name - The inventory item's new name.
public void setItemHeading(java.lang.String inventoryID,
java.lang.String heading)
inventoryID - The inventory item's ID.heading - The inventory item's new heading.
public void setItemDescription(java.lang.String inventoryID,
java.lang.String desc)
inventoryID - The inventory item's ID.desc - The inventory item's new description.
public void setItemPkginfo(java.lang.String inventoryID,
java.lang.String pkginfo)
inventoryID - The inventory item's ID.pkginfo - The inventory item's new package information.
public void setItemCategory(java.lang.String inventoryID,
int category)
inventoryID - The inventory item's ID.category - The inventory item's new category.
public void setItemImageFileName(java.lang.String inventoryID,
java.lang.String imageName)
inventoryID - The inventory item's ID.imageName - The inventory item's new image file name.public byte[] getItemImageBytes(java.lang.String inventoryID)
inventoryID - The id of the inventory item wanted.
public void setItemImageBytes(java.lang.String inventoryID,
byte[] imgbytes)
inventoryID - The id of the inventory item wanted.imgbytes - Buffer containing the image.
public void setItemPrice(java.lang.String inventoryID,
float price)
inventoryID - The inventory item's ID.price - The inventory item's new price.
public void setItemCost(java.lang.String inventoryID,
float cost)
inventoryID - The inventory item's ID.cost - The inventory item's new cost.
public void setItemQuantity(java.lang.String inventoryID,
int quantity)
inventoryID - The inventory item's ID.quantity - The inventory item's new quantity.
public void setItemNotes(java.lang.String inventoryID,
java.lang.String notes)
inventoryID - The inventory item's ID.notes - The inventory item's new notes.
public void setItemPrivacy(java.lang.String inventoryID,
boolean isPublic)
inventoryID - The inventory item's ID.isPublic - True, if this item can be viewed by the public.
public void ejbCreate()
throws javax.ejb.CreateException
javax.ejb.CreateExceptionpublic void ejbRemove()
ejbRemove in interface javax.ejb.SessionBeanpublic void ejbActivate()
ejbActivate in interface javax.ejb.SessionBeanpublic void ejbPassivate()
ejbPassivate in interface javax.ejb.SessionBeanpublic void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext in interface javax.ejb.SessionBeanctx - javax.ejb.SessionContext The context for this session EJB.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||