|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.salespointframework.core.data.DataBasketEntryImpl<java.lang.Object>
org.salespointframework.core.data.StockItemDBEntry
org.salespointframework.core.data.CountingStockItemDBEntry
public class CountingStockItemDBEntry
DataBasketEntry describing operations with CountingStock's items. The fields
of the DataBasketEntry
are set as follows:
Field | Value | |
main key |
STOCK_ITEM_MAIN_KEY
|
|
secondary key |
name of the StockItem in question |
|
source |
source stock | |
destination |
destination stock | |
value |
an Integer representing the number of StockItems that were
moved. |
Nested Class Summary | |
---|---|
static class |
CountingStockItemDBEntry.CSDBELogEntry
LogEntry describing an operation on CountingStock StockItem's. |
Nested classes/interfaces inherited from class org.salespointframework.core.data.StockItemDBEntry |
---|
StockItemDBEntry.StockItemDBELogEntry |
Field Summary |
---|
Fields inherited from class org.salespointframework.core.data.DataBasketEntryImpl |
---|
m_dbedDest, m_dbesSource, m_dbiOwner, m_fHandled, m_oValue, m_sMainKey, m_sSecondaryKey |
Fields inherited from interface org.salespointframework.core.data.interfaces.DataBasketKeys |
---|
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY |
Constructor Summary | |
---|---|
CountingStockItemDBEntry(java.lang.String sKey,
StockImpl stiSource,
StockImpl stiDest,
int nCount)
Create a new CountingStockItemDBEntry. |
Method Summary | |
---|---|
int |
count()
Count the affected items. |
LogEntry |
getLogData()
Create and return a LogEntry describing this DataBasketEntry. |
void |
partialRollback(int nCount)
Rollback the operation described by this DataBasketEntry for a given number of items. |
Methods inherited from class org.salespointframework.core.data.DataBasketEntryImpl |
---|
commit, DBEtoCatalogItem, getDestination, getMainKey, getName, getOwner, getSecondaryKey, getSource, getValue, isHandled, rollback, setOwner, setSecondaryKey, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CountingStockItemDBEntry(java.lang.String sKey, StockImpl stiSource, StockImpl stiDest, int nCount)
sKey
- the affected key.stiSource
- the source Stock.stiDest
- the destination Stock.nCount
- the number of affected items. This will be stored as the
value attribute
of the DataBasketEntry.Method Detail |
---|
public int count()
count
in class StockItemDBEntry
public void partialRollback(int nCount)
DataBasketEntry
for a given number of items.
The method will rollback the operation for the given number of items, updating the underlying DataBasket correctly.
Attention: The method is public as an implementation detail and should not be called directly.
nCount
- the number of items for which to rollback the operation.
java.lang.IllegalArgumentException
- if nCount >= count()
.public LogEntry getLogData()
getLogData
in interface Loggable
getLogData
in class StockItemDBEntry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |