com.ibm.websphere.samples.pbw.jpa
Class Inventory

java.lang.Object
  extended by com.ibm.websphere.samples.pbw.jpa.Inventory
All Implemented Interfaces:
Serializable, Cloneable

@Entity(name="Inventory")
public class Inventory
extends Object
implements Cloneable, Serializable

Inventory is the bean mapping for the INVENTORY table. It provides information about products the store has for sale.

See Also:
Inventory, Serialized Form

Constructor Summary
Inventory()
           
Inventory(Inventory item)
          Create a new Inventory.
Inventory(String key, String name, String heading, String desc, String pkginfo, String image, float price, float cost, int quantity, int category, String notes, boolean isPublic)
          Create a new Inventory.
 
Method Summary
 BackOrder getBackOrder()
           
 int getCategory()
           
 float getCost()
           
 String getDescription()
           
 String getHeading()
           
 String getID()
          Same as getInventoryId.
 String getImage()
           
 byte[] getImgbytes()
           
 String getInventoryId()
           
 int getMaxThreshold()
           
 int getMinThreshold()
           
 String getName()
           
 String getNotes()
           
 String getPkginfo()
           
 float getPrice()
           
 int getQuantity()
           
 void increaseInventory(int quantity)
          Increase the quantity of this inventory item.
 boolean isPublic()
           
 void setBackOrder(BackOrder backOrder)
           
 void setCategory(int category)
           
 void setCost(float cost)
           
 void setDescription(String description)
           
 void setHeading(String heading)
           
 void setID(String id)
          Same as setInventoryId.
 void setImage(String image)
           
 void setImgbytes(byte[] imgbytes)
           
 void setInventoryId(String id)
           
 void setIsPublic(boolean isPublic)
           
 void setMaxThreshold(int maxThreshold)
           
 void setMinThreshold(int minThreshold)
           
 void setName(String name)
           
 void setNotes(String notes)
           
 void setPkginfo(String pkginfo)
           
 void setPrice(float price)
           
 void setPrivacy(boolean isPublic)
          Set the inventory item's public availability.
 void setQuantity(int quantity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inventory

public Inventory()

Inventory

public Inventory(String key,
                 String name,
                 String heading,
                 String desc,
                 String pkginfo,
                 String image,
                 float price,
                 float cost,
                 int quantity,
                 int category,
                 String notes,
                 boolean isPublic)
Create a new Inventory.

Parameters:
key - Inventory Key
name - Name of inventory item.
heading - Description heading of inventory item.
desc - Description of inventory item.
pkginfo - Package info of inventory item.
image - Image of inventory item.
price - Price of inventory item.
cost - Cost of inventory item.
quantity - Quantity of inventory items in stock.
category - Category of inventory item.
notes - Notes of inventory item.
isPublic - Access permission of inventory item.

Inventory

public Inventory(Inventory item)
Create a new Inventory.

Parameters:
item - Inventory to use to make a new inventory item.
Method Detail

increaseInventory

public void increaseInventory(int quantity)
Increase the quantity of this inventory item.

Parameters:
quantity - The number to increase the inventory by.

getCategory

public int getCategory()

setCategory

public void setCategory(int category)

getCost

public float getCost()

setCost

public void setCost(float cost)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getHeading

public String getHeading()

setHeading

public void setHeading(String heading)

getImage

public String getImage()

setImage

public void setImage(String image)

getName

public String getName()

setName

public void setName(String name)

getNotes

public String getNotes()

setNotes

public void setNotes(String notes)

getPkginfo

public String getPkginfo()

setPkginfo

public void setPkginfo(String pkginfo)

getPrice

public float getPrice()

setPrice

public void setPrice(float price)

getQuantity

public int getQuantity()

setQuantity

public void setQuantity(int quantity)

getMaxThreshold

public int getMaxThreshold()

setMaxThreshold

public void setMaxThreshold(int maxThreshold)

getMinThreshold

public int getMinThreshold()

setMinThreshold

public void setMinThreshold(int minThreshold)

getInventoryId

public String getInventoryId()

setInventoryId

public void setInventoryId(String id)

getID

public String getID()
Same as getInventoryId. Added for compatability with ShoppingCartItem when used by the Client XJB sample

Returns:
String ID of the inventory item

setID

public void setID(String id)
Same as setInventoryId. Added for compatability with ShoppingCartItem when used by the Client XJB sample


isPublic

public boolean isPublic()

setIsPublic

public void setIsPublic(boolean isPublic)

setPrivacy

public void setPrivacy(boolean isPublic)
Set the inventory item's public availability.


getImgbytes

public byte[] getImgbytes()

setImgbytes

public void setImgbytes(byte[] imgbytes)

getBackOrder

public BackOrder getBackOrder()

setBackOrder

public void setBackOrder(BackOrder backOrder)


Copyright © 2011. All Rights Reserved.