|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object data.ooimpl.DataBasketImpl.SubDataBasket
protected static class DataBasketImpl.SubDataBasket
Internal helper class used by DataBasketImpl
, representing a subbasket of a DataBasket
.
This class has been made protected so that framework users be able to subclass it should the need arise.
Constructor Summary | |
---|---|
DataBasketImpl.SubDataBasket(DataBasketImpl dbiOwner)
Create a new subbasket. |
Method Summary | ||
---|---|---|
void |
commit(DataBasketCondition dbc)
Commit all items in this subbasket that match the condition. |
|
boolean |
equals(Object o)
Check whether the given Object is equal to this subbasket. |
|
DataBasketEntry |
get(DataBasketCondition dbc)
Get the first entry in this subbasket that matches the condition, if any. |
|
|
iterator(DataBasketCondition<T> dbc,
boolean fAllowRemove,
boolean fShowHandled)
Iterate all entries in the subbasket that match the given condition. |
|
void |
put(DataBasketEntryImpl dbe)
Put a DataBasketEntry into the subbasket. |
|
void |
rollback(DataBasketCondition dbc)
Rollback all entries in this subbasket that match the condition. |
|
Value |
sumSubBasket(DataBasketCondition dbc,
BasketEntryValue bev,
Value vInit)
Sum up the values of all entries in this subbasket that match the condition. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataBasketImpl.SubDataBasket(DataBasketImpl dbiOwner)
dbiOwner
- the DataBasketImpl instance owning this subbasket.Method Detail |
---|
public boolean equals(Object o)
This is overridden to mean identity, because for subbaskets equality and identity are really the same.
equals
in class Object
public void commit(DataBasketCondition dbc)
dbc
- the condition that must be matched.DataBasketEntry.commit()
public void rollback(DataBasketCondition dbc)
dbc
- the condition to be matched.DataBasketEntry.rollback()
public <T> Iterator<DataBasketEntry> iterator(DataBasketCondition<T> dbc, boolean fAllowRemove, boolean fShowHandled)
The condition applies to the returned iterator only, it will not be influenced by any future calls
to iterator()
.
dbc
- the condition returned items will have to match. null
means match all.fAllowRemove
- if true,the returned iterator's remove()
method * will be enabled. An iterator with its remove()
method enabled must never be made publicly
accessible outside of the DataBasket
.fShowHandled
- if true, the iterator will include items that return true from their
DataBasketEntry.isHandled()
method. Such an iterator must never be made publicly accessible
outside of the DataBasket
.
remove()
method, if fAllowRemove
is
true.public Value sumSubBasket(DataBasketCondition dbc, BasketEntryValue bev, Value vInit)
dbc
- the condition to be matched.bev
- an helper object used to determine the value of each matching DataBasketEntry.vInit
- the value that is to be used for adding up. All adding is performed by calling
Value.addAccumulating(data.Value)
on this object.
vInit
.public void put(DataBasketEntryImpl dbe)
DataBasketEntry
into the subbasket.
dbe
- the entry to be putDataBasketImpl.put(data.DataBasketEntry)
public DataBasketEntry get(DataBasketCondition dbc)
dbc
- the condition to be matched
DataBasketImpl.get(data.DataBasketCondition)
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |