org.salespointframework.core.data.interfaces
Interface DataBasketCondition<T>

All Superinterfaces:
DataBasketKeys
All Known Implementing Classes:
DataBasketConditionImpl

public interface DataBasketCondition<T>
extends DataBasketKeys

Condition used for filtering DataBaskets.

Since:
v2.0
Version:
2.0 14/06/1999
Author:
Steffen Zschaler

Field Summary
 
Fields inherited from interface org.salespointframework.core.data.interfaces.DataBasketKeys
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY
 
Method Summary
 DataBasketEntryDestination getDestination()
          Return the destination for operations that match the condition.
 java.lang.String getMainKey()
          Return the main key that DataBasketEntries must have to match the condition.
 java.lang.String getSecondaryKey()
          Return the secondary key that DataBasketEntries must have to match the condition.
 DataBasketEntrySource getSource()
          Return the source for operations that match the condition.
 java.lang.Object getValue()
          Return the object for operations that match the condition.
 boolean match(DataBasketEntry<T> dbe)
          Return true for DataBasketEntries that match the condition.
 

Method Detail

getMainKey

java.lang.String getMainKey()
Return the main key that DataBasketEntries must have to match the condition. Returning null means any main key.


getSecondaryKey

java.lang.String getSecondaryKey()
Return the secondary key that DataBasketEntries must have to match the condition. Returning null means any secondary key.


getSource

DataBasketEntrySource getSource()
Return the source for operations that match the condition. Returning null means any source, other values mean exactly what they say, i.e. they are tested for identity.


getDestination

DataBasketEntryDestination getDestination()
Return the destination for operations that match the condition. Returning null means any destination, other values mean exactly what they say, i.e. they are tested for identity.


getValue

java.lang.Object getValue()
Return the object for operations that match the condition. Returning null means check each DataBasketEntry by calling match(), other values mean exactly what they say, i.e. they are tested for identity.


match

boolean match(DataBasketEntry<T> dbe)
Return true for DataBasketEntries that match the condition. This method is only called for DataBasketEntries that have already been filtered by their main and secondary key, as well as their source and destination. Additionally, it is only called if getValue() returns null.