|
SalesPoint Framework v3.0 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--data.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.
| Fields inherited from class data.AbstractNameable |
m_ncContext,
m_pcsPropertyListeners |
| 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 |
| Constructor Detail |
public StockItemImpl(String sName)
sName - the name of the new item.| Method Detail |
public Stock getStock()
public 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.
db - the DataBasket used to determine visibility.protected void setStock(StockImpl sti)
public Object clone()
public 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)
o to be a StockItem and will
compare the names. Stocks, however, will always be greater than StockItems.StockItem.public String toString()
|
SalesPoint Framework v3.0 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||