SalesPoint Framework v3.0

data.swing
Class CountingStockDBEGrouper

java.lang.Object
  |
  +--data.swing.CountingStockDBEGrouper

public class CountingStockDBEGrouper
extends Object
implements DataBasketEntryGrouper

DataBasketEntryGrouper that groups entries that have the same main and secondary key as well as the same source and destination and where both values contain an Integer object. These are DataBasketEntries that describe operations on CountingStock items.

Since:
v2.0
Version:
2.0 23/08/1999
Author:
Steffen Zschaler
See Also:
Serialized Form

Constructor Summary
CountingStockDBEGrouper()
          Create a new CountingStockDBEGrouper.
 
Method Summary
 boolean canGroup(DataBasketEntry dbe1, DataBasketEntry dbe2)
          Return true if dbe1 and dbe2 have the same main and secondary key as well as the same source and destination and both values contain an Integer object.
 DataBasketEntry group(DataBasketEntry dbe1, DataBasketEntry dbe2)
          Return a new DataBasketEntry with the same main and secondary key, source and destination as dbe1 and a value of dbe1.getValue() + dbe2.getValue().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingStockDBEGrouper

public CountingStockDBEGrouper()
Create a new CountingStockDBEGrouper.
Method Detail

canGroup

public boolean canGroup(DataBasketEntry dbe1,
                        DataBasketEntry dbe2)
Return true if dbe1 and dbe2 have the same main and secondary key as well as the same source and destination and both values contain an Integer object.
Override:
Never.
Specified by:
canGroup in interface DataBasketEntryGrouper

group

public DataBasketEntry group(DataBasketEntry dbe1,
                             DataBasketEntry dbe2)
Return a new DataBasketEntry with the same main and secondary key, source and destination as dbe1 and a value of dbe1.getValue() + dbe2.getValue().

The returned DataBasketEntry cannot be used for commiting or rolling back operations.

Override:
Never.
Specified by:
group in interface DataBasketEntryGrouper

SalesPoint Framework v3.0