org.salespointframework.core.data
Class CurrencyItemImpl

java.lang.Object
  extended by org.salespointframework.core.data.AbstractNameable
      extended by org.salespointframework.core.data.CatalogItemImpl
          extended by org.salespointframework.core.data.CurrencyItemImpl
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, Recoverable, CatalogItem, Categorizable, CurrencyItem, DataBasketKeys, Nameable, SpItem

public class CurrencyItemImpl
extends CatalogItemImpl
implements CurrencyItem, Categorizable

Pure Java implementation of the CurrencyItem interface.

Since:
v2.0
Version:
2.0 19/08/1999
Author:
Steffen Zschaler

Field Summary
protected  Category category
          Currency category
 
Fields inherited from class org.salespointframework.core.data.AbstractNameable
m_ncContext, m_pcsPropertyListeners, SOME_PROPERTY
 
Fields inherited from interface org.salespointframework.core.data.interfaces.CatalogItem
VALUE_PROPERTY
 
Fields inherited from interface org.salespointframework.core.data.interfaces.Nameable
NAME_PROPERTY
 
Fields inherited from interface org.salespointframework.core.data.interfaces.DataBasketKeys
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY
 
Constructor Summary
CurrencyItemImpl(java.lang.String sName, int nValue)
          Create a new CurrencyItemImpl.
CurrencyItemImpl(java.lang.String sName, IntegerValue vValue)
          Create a new CurrencyItemImpl
CurrencyItemImpl(java.lang.String sName, int nValue, java.net.URI imagefile, Category category)
          Create a new CurrencyItemImpl
 
Method Summary
 Category getCategory()
          retrieve items category
 CatalogItemImpl getShallowClone()
          Get a shallow clone of the CatalogItem.
 void setCategory(Category category)
          set items category
 java.lang.String toString()
          Return a String representation of the item.
 
Methods inherited from class org.salespointframework.core.data.CatalogItemImpl
addValueListener, compareTo, equals, firePropertyChanged, getCatalog, getImage, getImageBytes, getInternalShallowClone, getValue, isEditable, recover, removeValueListener, setCatalog, setImage, setImageBytes, setValue
 
Methods inherited from class org.salespointframework.core.data.AbstractNameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.salespointframework.core.data.interfaces.CurrencyItem
getValue
 
Methods inherited from interface org.salespointframework.core.data.interfaces.CatalogItem
addValueListener, firePropertyChanged, getCatalog, getImage, removeValueListener, setImage
 
Methods inherited from interface org.salespointframework.core.data.interfaces.Nameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.salespointframework.core.data.interfaces.SpItem
getName
 

Field Detail

category

protected Category category
Currency category

Constructor Detail

CurrencyItemImpl

public CurrencyItemImpl(java.lang.String sName,
                        int nValue,
                        java.net.URI imagefile,
                        Category category)
Create a new CurrencyItemImpl

Parameters:
sName - the name of the currency item.
nValue - the value of the item, expressed in the smallest unit of the associated currency.
imagefile - of currency item

CurrencyItemImpl

public CurrencyItemImpl(java.lang.String sName,
                        IntegerValue vValue)
Create a new CurrencyItemImpl

Parameters:
sName - the name of the currency item.
nValue - the value of the item, expressed in the smallest unit of the associated currency.

CurrencyItemImpl

public CurrencyItemImpl(java.lang.String sName,
                        int nValue)
Create a new CurrencyItemImpl.

Parameters:
sName - the name of the currency item.
nValue - the value of the item, expressed in the smallest unit of the associated currency.
Method Detail

getCategory

public Category getCategory()
retrieve items category

Specified by:
getCategory in interface Categorizable
Returns:
category

setCategory

public void setCategory(Category category)
set items category

Parameters:
category -

getShallowClone

public CatalogItemImpl getShallowClone()
Description copied from class: CatalogItemImpl
Get a shallow clone of the CatalogItem. For normal CatalogItems there is no difference between a shallow and a deep clone.

Specified by:
getShallowClone in class CatalogItemImpl

toString

public java.lang.String toString()
Description copied from class: CatalogItemImpl
Return a String representation of the item.

Overrides:
toString in class CatalogItemImpl