data.ooimpl
Class CountingStockItemDBEntry
java.lang.Object
data.ooimpl.DataBasketEntryImpl
data.ooimpl.StockItemDBEntry
data.ooimpl.CountingStockItemDBEntry
- All Implemented Interfaces:
- DataBasketEntry, DataBasketKeys, Loggable, Serializable
- public class CountingStockItemDBEntry
- extends StockItemDBEntry
DataBasketEntry describing operations with CountingStock's items. The fields
of the DataBasketEntry
are set as follows:
- Since:
- v2.0
- Author:
- Steffen Zschaler
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountingStockItemDBEntry
public CountingStockItemDBEntry(String sKey,
StockImpl stiSource,
StockImpl stiDest,
int nCount)
- Create a new CountingStockItemDBEntry.
- Parameters:
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.
count
public int count()
- Count the affected items.
- Overrides:
count
in class StockItemDBEntry
- Returns:
- the number of affected items.
- Override:
- Never
partialRollback
public void partialRollback(int nCount)
- Rollback the operation described by this
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.
- Parameters:
nCount
- the number of items for which to rollback the operation.
- Throws:
IllegalArgumentException
- if nCount >= count()
.- Override:
- Never
getLogData
public LogEntry getLogData()
- Create and return a LogEntry describing this DataBasketEntry.
- Specified by:
getLogData
in interface Loggable
- Overrides:
getLogData
in class StockItemDBEntry
- Override:
- Sometimes