SalesPoint Framework v3.0

data
Class DataBasketConditionImpl

java.lang.Object
  |
  +--data.DataBasketConditionImpl

public class DataBasketConditionImpl
extends Object
implements DataBasketCondition

Basic implementation of the DataBasketCondition interface. You can use this class as a basis for implementing more sophisticated queries.

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

Field Summary
static DataBasketCondition ALL_CATALOG_ITEMS
          A DataBasketCondition that matches all entries that describe CatalogItem movements.
static DataBasketCondition ALL_ENTRIES
          A DataBasketCondition matching all items in a DataBasket.
static DataBasketCondition ALL_STOCK_ITEMS
          A DataBasketCondition that matches all entries that describe StockItem movements.
protected  DataBasketEntryDestination m_dbedDest
          The destination condition.
protected  DataBasketEntrySource m_dbesSource
          The source condition.
protected  Object m_oValue
          The value condition.
protected  String m_sMainKey
          The main key condition.
protected  String m_sSecondaryKey
          The secondary key condition.
 
Constructor Summary
DataBasketConditionImpl(String sMainKey, String sSecondaryKey, DataBasketEntrySource dbesSource, DataBasketEntryDestination dbedDest, Object oValue)
          Create a new DataBasketConditionImpl.
 
Method Summary
static DataBasketCondition allCatalogItemsWithDest(Catalog cDest)
          A DataBasketCondition that matches all entries that describe CatalogItems being entered into the given Catalog.
static DataBasketCondition allCatalogItemsWithSource(Catalog cSource)
          A DataBasketCondition that matches all entries that describe CatalogItems being taken from the given Catalog.
static DataBasketCondition allStockItemsWithDest(Stock stDest)
          A DataBasketCondition that matches all entries that describe StockItems being entered into the given Stock.
static DataBasketCondition allStockItemsWithSource(Stock stSource)
          A DataBasketCondition that matches all entries that describe StockItems being taken from the given Stock.
 DataBasketEntryDestination getDestination()
           
 String getMainKey()
           
 String getSecondaryKey()
           
 DataBasketEntrySource getSource()
           
 Object getValue()
           
 boolean match(DataBasketEntry dbe)
          As a default, always returns true.
static DataBasketCondition specificCatalogItem(CatalogItem ci)
          A DataBasketCondition that matches exactly one given CatalogItem.
static DataBasketCondition specificStockItem(StockItem si)
          A DataBasketCondition that matches exactly one given StockItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_dbesSource

protected DataBasketEntrySource m_dbesSource
The source condition.

m_dbedDest

protected DataBasketEntryDestination m_dbedDest
The destination condition.

m_sMainKey

protected String m_sMainKey
The main key condition.

m_sSecondaryKey

protected String m_sSecondaryKey
The secondary key condition.

m_oValue

protected Object m_oValue
The value condition.

ALL_ENTRIES

public static final DataBasketCondition ALL_ENTRIES
A DataBasketCondition matching all items in a DataBasket.

ALL_STOCK_ITEMS

public static final DataBasketCondition ALL_STOCK_ITEMS
A DataBasketCondition that matches all entries that describe StockItem movements.

ALL_CATALOG_ITEMS

public static final DataBasketCondition ALL_CATALOG_ITEMS
A DataBasketCondition that matches all entries that describe CatalogItem movements.
Constructor Detail

DataBasketConditionImpl

public DataBasketConditionImpl(String sMainKey,
                               String sSecondaryKey,
                               DataBasketEntrySource dbesSource,
                               DataBasketEntryDestination dbedDest,
                               Object oValue)
Create a new DataBasketConditionImpl.
Parameters:
sMainKey - the value for m_sMainKey.
sSecondaryKey - the value for m_sSecondaryKey.
dbesSource - the value for m_dbesSource.
dbedDest - the value for m_dbedDest.
oValue - the value for m_oValue.
Method Detail

getSource

public DataBasketEntrySource getSource()
Override:
Never.
Instead set the value of m_dbesSource.
Specified by:
getSource in interface DataBasketCondition
Returns:
m_dbesSource.

getDestination

public DataBasketEntryDestination getDestination()
Override:
Never.
Instead set the value of m_dbedDest.
Specified by:
getDestination in interface DataBasketCondition
Returns:
m_dbedDest.

getValue

public Object getValue()
Override:
Never.
Instead set the value of m_oValue.
Specified by:
getValue in interface DataBasketCondition
Returns:
m_oValue.

getMainKey

public String getMainKey()
Override:
Never.
Instead set the value of m_sMainKey.
Specified by:
getMainKey in interface DataBasketCondition
Returns:
m_sMainKey.

getSecondaryKey

public String getSecondaryKey()
Override:
Never.
Instead set the value of m_sSecondaryKey.
Specified by:
getSecondaryKey in interface DataBasketCondition
Returns:
m_sSecondaryKey.

match

public boolean match(DataBasketEntry dbe)
As a default, always returns true.
Override:
Sometimes.
Specified by:
match in interface DataBasketCondition

allStockItemsWithSource

public static final DataBasketCondition allStockItemsWithSource(Stock stSource)
A DataBasketCondition that matches all entries that describe StockItems being taken from the given Stock.

allStockItemsWithDest

public static final DataBasketCondition allStockItemsWithDest(Stock stDest)
A DataBasketCondition that matches all entries that describe StockItems being entered into the given Stock.

allCatalogItemsWithSource

public static final DataBasketCondition allCatalogItemsWithSource(Catalog cSource)
A DataBasketCondition that matches all entries that describe CatalogItems being taken from the given Catalog.

allCatalogItemsWithDest

public static final DataBasketCondition allCatalogItemsWithDest(Catalog cDest)
A DataBasketCondition that matches all entries that describe CatalogItems being entered into the given Catalog.

specificCatalogItem

public static final DataBasketCondition specificCatalogItem(CatalogItem ci)
A DataBasketCondition that matches exactly one given CatalogItem.

specificStockItem

public static final DataBasketCondition specificStockItem(StockItem si)
A DataBasketCondition that matches exactly one given StockItem.

SalesPoint Framework v3.0