|
SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.AbstractNameable
data.ooimpl.StockItemImpl
Pure Java implementation of the StockItem interface. See the documentation for
StockItem for a description of the semantics of this class.
| Field Summary |
| Fields inherited from class data.AbstractNameable |
m_ncContext, m_pcsPropertyListeners |
| Fields inherited from interface data.Nameable |
NAME_PROPERTY |
| Fields inherited from interface data.DataBasketKeys |
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY |
| Constructor Summary | |
StockItemImpl(String sName)
Create a new StockItemImpl. |
|
| Method Summary | |
Object |
clone()
Clone this StockItem. |
int |
compareTo(Object o)
Compare this StockItem to the given object. |
boolean |
equals(Object o)
Check whether this StockItem equals the given object. |
CatalogItem |
getAssociatedItem(DataBasket db)
Get the CatalogItem that is associated with this StockItem. |
StockItemImpl |
getShallowClone()
Get a shallow clone of this item. |
Stock |
getStock()
Get the Stock that contains this StockItem. |
protected void |
setStock(StockImpl sti)
Set the Stock that contains this StockItem. |
String |
toString()
Return a String representation of the item. |
| Methods inherited from class data.AbstractNameable |
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface data.Nameable |
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName |
| Constructor Detail |
public StockItemImpl(String sName)
sName - the name of the new item.| Method Detail |
public Stock getStock()
getStock in interface StockItempublic CatalogItem getAssociatedItem(DataBasket db)
If the StockItem has a Stock, the associated CatalogItem is the
CatalogItem of the same name that is found in the Stock's associated Catalog.
Otherwise, it is null.
getAssociatedItem in interface StockItemdb - the DataBasket used to determine visibility.protected void setStock(StockImpl sti)
public Object clone()
clone in interface StockItempublic StockItemImpl getShallowClone()
For a normal item, shallow and deep clones are identical, which is why the default implementation
returns ((StockItemImpl) clone()). However, when making a shallow clone of a Stock, the
individual StockItems will not be cloned.
(StockItemImpl) clone().public boolean equals(Object o)
(this == o).public int compareTo(Object o)
compareTo in interface ComparableClassCastException - if the given object cannot be converted into a StockItem.o to be a StockItem and will
compare the names. Stocks, however, will always be greater than StockItems.public String toString()
|
SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||