public class InventoryBean extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_AVAILABLE
Indicates that the item is available.
|
static int |
STATUS_NEW
Indicates that the item is is "new".
|
static int |
STATUS_NO_LONGER_AVAILABLE
Indicates that the item is no longer available.
|
static int |
STATUS_SPECIAL
Indicates that the item is is "new".
|
| Constructor and Description |
|---|
InventoryBean()
Creates an InventoryBean.
|
InventoryBean(int productId,
int status,
int count,
int unitCost)
Creates an InventoryBean with the specified data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Indicates whether this InventoryBean is equal to the given object.
|
int |
getCount() |
ProductBean |
getProduct()
Added as a convenience method, so that the bean examples are a bit better.
|
int |
getProductId() |
int |
getStatus() |
int |
getUnitCost() |
int |
hashCode() |
void |
setCount(int count) |
void |
setProductId(int productId) |
void |
setStatus(int status) |
void |
setUnitCost(int unitCost) |
public static final int STATUS_NO_LONGER_AVAILABLE
public static final int STATUS_AVAILABLE
public static final int STATUS_NEW
public static final int STATUS_SPECIAL
public InventoryBean()
public InventoryBean(int productId,
int status,
int count,
int unitCost)
productId - the id of the item.status - the stock status.count - the number of items in stock.unitCost - the item unit cost, in cents.public int getCount()
public void setCount(int count)
count - The count to set.public int getProductId()
public void setProductId(int productId)
productId - The productId to set.public int getStatus()
public void setStatus(int status)
status - The status to set.public ProductBean getProduct()
public int getUnitCost()
public void setUnitCost(int unitCost)
unitCost - The unit cost to set.public int hashCode()
Copyright © 2017. All rights reserved.