market
Class CSOrder
java.lang.Object
|
+--data.AbstractNameable
|
+--data.ooimpl.StockItemImpl
|
+--data.ooimpl.StockImpl
|
+--data.ooimpl.CountingStockImpl
|
+--market.CSOrder
- All Implemented Interfaces:
- Cloneable, Comparable, CountingStock, DataBasketEntryDestination, DataBasketEntrySource, DataBasketKeys, ListenableStock, Nameable, NameContext, SelfManagingDBEDestination, SelfManagingDBESource, Serializable, Stock, StockItem
- public class CSOrder
- extends CountingStockImpl
A CountingStockImpl which is used to store orders of customers,
which can be set active or not
- See Also:
- Serialized Form
Method Summary |
static CSOrder |
create(String customer,
boolean active)
Returns a new CSOrder with a combination of owner-key and time as its key |
Long |
getTime()
Returns the time since this CSOrder exist |
boolean |
isActive()
Returns whether this CSOrder is active or not |
void |
remove(String sKey,
int nCount,
DataBasket db)
Removes a number of items from this CSOrder |
int |
removeAll(String sKey)
Removes all items with the specified key from this CSOrder |
void |
setActive(boolean active)
Sets this CSOrder active or not |
Methods inherited from class data.ooimpl.CountingStockImpl |
add, add, addStock, commitAdd, commitRemove, contains, containsStock, countItems, createPeer, get, internalSetCatalog, remove, remove, rollbackAdd, rollbackRemove, toString |
Methods inherited from class data.ooimpl.StockImpl |
addStockChangeListener, checkNameChange, clone, compareTo, contains, 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 |
CSOrder
public CSOrder(String s,
boolean active)
- Parameters:
s
- the name of the CSOrderactive
- if true the CSOrder will be active
remove
public void remove(String sKey,
int nCount,
DataBasket db)
- Removes a number of items from this CSOrder
- Specified by:
remove
in interface CountingStock
- Overrides:
remove
in class CountingStockImpl
- Parameters:
sKey
- the name of the StockItemnCount
- the number of StockItems, that will be removeddb
- the databasket related to this transaction
removeAll
public int removeAll(String sKey)
- Removes all items with the specified key from this CSOrder
- Parameters:
sKey
- the name of the StockItem
- Returns:
- the number of items that are removed
isActive
public boolean isActive()
- Returns whether this CSOrder is active or not
- Returns:
- true if this CSOrder is active, otherwise false
setActive
public void setActive(boolean active)
- Sets this CSOrder active or not
- Parameters:
active
- if true the CSOrder will be active
getTime
public Long getTime()
- Returns the time since this CSOrder exist
- Returns:
- the time since this CSOrder exist in milliseconds
create
public static CSOrder create(String customer,
boolean active)
- Returns a new CSOrder with a combination of owner-key and time as its key
- Parameters:
customer
- the owner of the new CSOrderactive
- if true the CSOrder will be active
- Returns:
- the new CSOrder