org.salespointframework.core.data
Class CurrencyImpl

java.lang.Object
  extended by org.salespointframework.core.data.AbstractNameable
      extended by org.salespointframework.core.data.CatalogItemImpl
          extended by org.salespointframework.core.data.CatalogImpl<CurrencyItemImpl>
              extended by org.salespointframework.core.data.CurrencyImpl
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, java.lang.Iterable<CurrencyItemImpl>, Recoverable, DatasourceChangeListener, ExternalModificationListener, Catalog<CurrencyItemImpl>, CatalogItem, Currency<CurrencyItemImpl>, DataBasketEntryDestination, DataBasketEntrySource, DataBasketKeys, ListenableCatalog<CurrencyItemImpl>, Nameable, NameContext, SpAggregate, SpItem, SelfManagingDBEDestination<CurrencyItemImpl>, SelfManagingDBESource<CurrencyItemImpl>

Deprecated. user EUROCurrencyImpl

@Deprecated
public class CurrencyImpl
extends CatalogImpl<CurrencyItemImpl>
implements Currency<CurrencyItemImpl>

Pure Java implementation of the Currency interface.

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

Field Summary
static java.lang.String DM_SCHEIN_10
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_100
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_1000
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_20
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_200
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_5
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_50
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_SCHEIN_500
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_STCK_1
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_STCK_10
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_STCK_2
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String DM_STCK_5
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
private  int[] m_anDenominations
          Deprecated.  
private  java.text.NumberFormat m_nfFormatter
          Deprecated. Tool used to format and parse currency values.
static java.lang.String PFENNIG_STCK_1
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String PFENNIG_STCK_10
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String PFENNIG_STCK_2
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String PFENNIG_STCK_5
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
static java.lang.String PFENNIG_STCK_50
          Deprecated. Field string represents the mainkey for an added CurrencyItemImpl.
 
Fields inherited from class org.salespointframework.core.data.CatalogImpl
m_lhListeners, m_nModCount
 
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
CurrencyImpl(java.lang.String sName)
          Deprecated. Create a new CurrencyImpl with a default locale of Locale.GERMANY and fill it.
CurrencyImpl(java.lang.String sName, java.util.Locale l)
          Deprecated. Create a new, initially empty CurrencyImpl for the given locale.
 
Method Summary
 NumberValue parse(java.lang.String s)
          Deprecated. Try to parse the given String as a currency value in the currency's associated format.
 java.lang.String toString(NumberValue nv)
          Deprecated. Return a String representation of the given NumberValue assuming it is a value given in the smallest unit of this currency.
 
Methods inherited from class org.salespointframework.core.data.CatalogImpl
add, addCatalogChangeListener, checkNameChange, commitAdd, commitRemove, contains, createPeer, DatasourceChanged, externalModificationOccurred, fireCanEditCatalogItem, fireCanRemoveCatalogItem, fireCatalogItemAddCommit, fireCatalogItemAdded, fireCatalogItemAddRollback, fireCatalogItemDataChanged, fireCatalogItemRemoveCommit, fireCatalogItemRemoved, fireCatalogItemRemoveRollback, fireCommitEditCatalogItem, fireEditingCatalogItem, fireRollbackEditCatalogItem, get, getEditableCopy, getEditingItemsContainer, getItemsContainer, getItemsLock, getNCMonitor, getShallowClone, getTemporaryAddedItemsContainer, getTemporaryRemovedItemsContainer, isPersistent, iterator, iterator, keySet, nameHasChanged, remove, remove, removeCatalogChangeListener, rollbackAdd, rollbackRemove, setCatalog, size, toString
 
Methods inherited from class org.salespointframework.core.data.CatalogItemImpl
addValueListener, compareTo, equals, firePropertyChanged, getCatalog, getImage, getImageBytes, getInternalShallowClone, getValue, isEditable, recover, removeValueListener, 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.Catalog
add, contains, get, iterator, keySet, remove, remove, size
 
Methods inherited from interface org.salespointframework.core.data.interfaces.CatalogItem
addValueListener, firePropertyChanged, getCatalog, getImage, getValue, 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
 
Methods inherited from interface org.salespointframework.core.data.events.DatasourceChangeListener
DatasourceChanged
 
Methods inherited from interface org.salespointframework.core.data.events.ExternalModificationListener
externalModificationOccurred
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

m_nfFormatter

private java.text.NumberFormat m_nfFormatter
Deprecated. 
Tool used to format and parse currency values.


PFENNIG_STCK_1

public static java.lang.String PFENNIG_STCK_1
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

1-Pfennig-Stueck


PFENNIG_STCK_2

public static java.lang.String PFENNIG_STCK_2
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

2-Pfennig-Stueck


PFENNIG_STCK_5

public static java.lang.String PFENNIG_STCK_5
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

5-Pfennig-Stueck


PFENNIG_STCK_10

public static java.lang.String PFENNIG_STCK_10
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

10-Pfennig-Stueck


PFENNIG_STCK_50

public static java.lang.String PFENNIG_STCK_50
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

50-Pfennig-Stueck


DM_STCK_1

public static java.lang.String DM_STCK_1
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

1-Mark-Stueck


DM_STCK_2

public static java.lang.String DM_STCK_2
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

2-Mark-Stueck


DM_STCK_5

public static java.lang.String DM_STCK_5
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

5-Mark-Stueck


DM_SCHEIN_5

public static java.lang.String DM_SCHEIN_5
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

5-Mark-Schein


DM_STCK_10

public static java.lang.String DM_STCK_10
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

10-Mark-Stueck


DM_SCHEIN_10

public static java.lang.String DM_SCHEIN_10
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

10-Mark-Schein


DM_SCHEIN_20

public static java.lang.String DM_SCHEIN_20
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

20-Mark-Schein


DM_SCHEIN_50

public static java.lang.String DM_SCHEIN_50
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

50-Mark-Schein


DM_SCHEIN_100

public static java.lang.String DM_SCHEIN_100
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

100-Mark-Schein


DM_SCHEIN_200

public static java.lang.String DM_SCHEIN_200
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

200-Mark-Schein


DM_SCHEIN_500

public static java.lang.String DM_SCHEIN_500
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

500-Mark-Schein


DM_SCHEIN_1000

public static java.lang.String DM_SCHEIN_1000
Deprecated. 
Field string represents the mainkey for an added CurrencyItemImpl.

1000-Mark-Schein


m_anDenominations

private int[] m_anDenominations
Deprecated. 
Constructor Detail

CurrencyImpl

public CurrencyImpl(java.lang.String sName,
                    java.util.Locale l)
Deprecated. 
Create a new, initially empty CurrencyImpl for the given locale.

Parameters:
sName - the name of the currency to create.
l - the locale that determines how currency values will be formatted.

CurrencyImpl

public CurrencyImpl(java.lang.String sName)
Deprecated. 
Create a new CurrencyImpl with a default locale of Locale.GERMANY and fill it.

The currency will already contain all denominations that are available in the DEM currency.

Parameters:
sName - the name of the new currency.
Method Detail

toString

public java.lang.String toString(NumberValue nv)
Deprecated. 
Return a String representation of the given NumberValue assuming it is a value given in the smallest unit of this currency.

Specified by:
toString in interface Currency<CurrencyItemImpl>
Parameters:
nv - the value to be rendered.
Returns:
the formatted String representation

parse

public NumberValue parse(java.lang.String s)
                  throws java.text.ParseException
Deprecated. 
Try to parse the given String as a currency value in the currency's associated format.

Specified by:
parse in interface Currency<CurrencyItemImpl>
Parameters:
s - the text to be parsed.
Returns:
the value that was identified in the text, given in the smallest unit of this currency.
Throws:
java.text.ParseException - if the given String could not be interpreted as a currency value.