org.salespointframework.web.movestrategies
Class SSCSStrategy
java.lang.Object
org.salespointframework.web.movestrategies.SSCSStrategy
- All Implemented Interfaces:
- MoveStrategy
public abstract class SSCSStrategy
- extends java.lang.Object
- implements MoveStrategy
MoveStategy moving items from a StoringStock
to a CountingStock
- Author:
- Lars Kreisz, Uwe Schmidt
Method Summary |
protected abstract StockItem |
createStockItem(StockItem ci)
|
boolean |
moveToDestination(java.lang.Object source,
java.lang.Object destination,
java.lang.String itemName,
DataBasket db,
int count)
moves the item with the given name from source to destination |
boolean |
moveToSource(java.lang.Object source,
java.lang.Object destination,
java.lang.String itemName,
DataBasket db,
int count)
moves the item with the given name from destination to source |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSCSStrategy
public SSCSStrategy()
moveToDestination
public boolean moveToDestination(java.lang.Object source,
java.lang.Object destination,
java.lang.String itemName,
DataBasket db,
int count)
throws java.lang.ClassCastException
- Description copied from interface:
MoveStrategy
- moves the item with the given name from source to destination
- Specified by:
moveToDestination
in interface MoveStrategy
- Parameters:
source
- source aggregatedestination
- destination aggregateitemName
- name of item that should be moveddb
- databasket used for movementcount
- number of items that should be moved
- Returns:
- false, if to many items should have been moved
- Throws:
java.lang.ClassCastException
moveToSource
public boolean moveToSource(java.lang.Object source,
java.lang.Object destination,
java.lang.String itemName,
DataBasket db,
int count)
throws java.lang.ClassCastException
- Description copied from interface:
MoveStrategy
- moves the item with the given name from destination to source
- Specified by:
moveToSource
in interface MoveStrategy
- Parameters:
source
- source aggregatedestination
- destination aggregateitemName
- name of item that should be moveddb
- databasket used for movementcount
- number of items that should be moved
- Returns:
- false, if to many items should have been moved
- Throws:
java.lang.ClassCastException
createStockItem
protected abstract StockItem createStockItem(StockItem ci)