org.salespointframework.core.data
Class MoneyBagImpl
java.lang.Object
org.salespointframework.core.data.AbstractNameable
org.salespointframework.core.data.StockItemImpl
org.salespointframework.core.data.StockImpl<java.lang.Integer,T,CT>
org.salespointframework.core.data.CountingStockImpl<StockItemImpl,CurrencyItemImpl>
org.salespointframework.core.data.MoneyBagImpl
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, Recoverable, DatasourceChangeListener, ExternalModificationListener, CountingStock<StockItemImpl,CurrencyItemImpl>, DataBasketEntryDestination, DataBasketEntrySource, DataBasketKeys, ListenableStock<StockItemImpl,CurrencyItemImpl>, MoneyBag, Nameable, NameContext, SpAggregate, SpItem, Stock<StockItemImpl,CurrencyItemImpl>, StockItem, SelfManagingDBEDestination<StockItemImpl>, SelfManagingDBESource<StockItemImpl>
public class MoneyBagImpl
- extends CountingStockImpl<StockItemImpl,CurrencyItemImpl>
- implements MoneyBag
Pure Java implementation of the MoneyBag
interface.
- Since:
- v2.0
- Version:
- 2.0 19/08/1999
- Author:
- Steffen Zschaler
Methods inherited from class org.salespointframework.core.data.CountingStockImpl |
add, add, addStock, commitAdd, commitRemove, contains, containsStock, countItems, createPeer, get, internalSetCatalog, remove, remove, remove, rollbackAdd, rollbackRemove |
Methods inherited from class org.salespointframework.core.data.StockImpl |
addStockChangeListener, checkNameChange, clone, compareTo, contains, DatasourceChanged, externalModificationOccurred, fillShallowClone, fillStockWithValue, fireCanEditStockItems, fireCanRemoveStockItems, fireEditingStockItems, fireStockItemsAddCommit, fireStockItemsAdded, fireStockItemsAddRollback, fireStockItemsEditCommit, fireStockItemsEditRollback, fireStockItemsRemoveCommit, fireStockItemsRemoved, fireStockItemsRemoveRollback, getCatalog, getEditingItemsContainer, getItemsContainer, getItemsLock, getNCMonitor, getRefIntegrEditContainer, getRefIntegrItemsContainer, getShallowClone, getTemporaryAddedItemsContainer, getTemporaryRemovedItemsContainer, iterator, keySet, nameHasChanged, prepareReferentialIntegrity, removeStockChangeListener, setEditingItemsContainer, setItemsContainer, setRefIntegrEditContainer, setRefIntegrItemsContainer, setStock, setTemporaryAddedItemsContainer, setTemporaryRemovedItemsContainer, size, sumStock, unsubscribe |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.salespointframework.core.data.interfaces.Stock |
add, addStock, contains, contains, containsStock, countItems, fillStockWithValue, get, getCatalog, iterator, keySet, remove, remove, size, sumStock |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface org.salespointframework.core.data.interfaces.SpItem |
getName |
MoneyBagImpl
public MoneyBagImpl(java.lang.String sName,
AbstractCurrency ac,
boolean temporary)
- Create a new MoneyBagImpl.
- Parameters:
sName
- the name of the MoneyBag.ac
- the Currency associated to the MoneyBag.temporary
- true, if moneybag should not be persisted
MoneyBagImpl
public MoneyBagImpl(java.lang.String sName,
Catalog c,
boolean temporary)
transferMoney
public void transferMoney(MoneyBag mbDest,
DataBasket db,
NumberValue nvAmount)
- Tries to transfer money from this DataBasket into another one.
- Specified by:
transferMoney
in interface MoneyBag
- Parameters:
mbDest
- the MoneyBag to transfer the money todb
- a transaction DataBasketnvAmount
- the amount of money to transfer
toString
public java.lang.String toString()
- Return a String representation of the MoneyBag.
In addition to the representation created by the super class this will calculate the total amount of
this MoneyBag and append this in formatted form to the end of the representation.
- Overrides:
toString
in class CountingStockImpl<StockItemImpl,CurrencyItemImpl>