If you need to track quantity and aren't selling specific "thing"-like products (that is, ones that are serialized), then add a quantityOnHand attribute to this class.
Stereotype: |
description |
|
Author: |
TogetherSoft |
|
persistent |
||
Version: |
1.0 |
Field Summary |
||
private Product |
||
private BigDecimal |
defaultPrice Default price. |
|
private String |
description Some prose describing the product in all its glory. |
|
private String |
itemNumber This is the unique identifying number. |
|
private String |
name Product name. |
|
private Vector |
priceObjects List of prices. |
|
private int |
type Use it if you need to identify Products as specific types. |
Constructor Summary |
||
Method Summary |
||
void |
addPriceObject(ProductPrice priceObj) |
|
BigDecimal |
calcPriceForQty(int qty) By passing in the qty, we can efficiently do quantity discounts at this level in the object model. |
|
int |
||
BigDecimal |
||
BigDecimal |
||
String |
||
String |
||
String |
getName() |
|
BigDecimal |
getPrice() This will check if there are any Price objects, returning that price, else the default price. |
|
Enumeration |
||
static Vector |
listProductDescs() This is a class-level method used to return a list of all available product descriptions currently in
the persistent store. |
|
void |
removePriceObject(ProductPrice priceObj) |
|
void |
setDefaultPrice(BigDecimal aDefaultPrice) |
|
void |
setDescription(String aDescription) |
|
void |
setItemNumber(String anItemNumber) |
|
void |
setName(String aName) |
rdbLogicalType: |
INTEGER |
rdbLogicalType: |
VARCHAR |
rdbLogicalType: |
VARCHAR |
rdbLogicalType: |
NUMERIC |
rdbLogicalType: |
VARCHAR |
supplierCardinality: |
1..* |
associates: |
ProductPrice |