SalesPoint Framework v3.1

data
Class CatalogItemValue

java.lang.Object
  extended bydata.CatalogItemValue

public class CatalogItemValue
extends Object

Objectifier to compute the value of a CatalogItem.

Since:
v1.0
Author:
Steffen Zschaler
See Also:
Stock.sumStock(data.DataBasket, data.CatalogItemValue, data.Value)

Field Summary
static CatalogItemValue EVALUATE_BID
          A CatalogItemValue that will return the bid if the standard value of a CatalogItem is a QuoteValue.
static CatalogItemValue EVALUATE_MID
          A CatalogItemValue that will return the mid if the standard value of a CatalogItem is a QuoteValue.
static CatalogItemValue EVALUATE_OFFER
          A CatalogItemValue that will return the offer if the standard value of a CatalogItem is a QuoteValue.
static CatalogItemValue EVALUATE_SPREAD
          A CatalogItemValue that will return the spread if the standard value of a CatalogItem is a QuoteValue.
 
Constructor Summary
CatalogItemValue()
           
 
Method Summary
 Value getValue(CatalogItem ci)
          Return the value of an CatalogItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVALUATE_BID

public static final CatalogItemValue EVALUATE_BID
A CatalogItemValue that will return the bid if the standard value of a CatalogItem is a QuoteValue. Otherwise, it will simply return the standard value of the CatalogItem.


EVALUATE_OFFER

public static final CatalogItemValue EVALUATE_OFFER
A CatalogItemValue that will return the offer if the standard value of a CatalogItem is a QuoteValue. Otherwise, it will simply return the standard value of the CatalogItem.


EVALUATE_MID

public static final CatalogItemValue EVALUATE_MID
A CatalogItemValue that will return the mid if the standard value of a CatalogItem is a QuoteValue. Otherwise, it will simply return the standard value of the CatalogItem.


EVALUATE_SPREAD

public static final CatalogItemValue EVALUATE_SPREAD
A CatalogItemValue that will return the spread if the standard value of a CatalogItem is a QuoteValue. Otherwise, it will simply return the standard value of the CatalogItem.

Constructor Detail

CatalogItemValue

public CatalogItemValue()
Method Detail

getValue

public Value getValue(CatalogItem ci)
Return the value of an CatalogItem.

By default returns ci.getValue(), but you can create subclasses that refer to any attribute you want to use as the CatalogItem's value.

Parameters:
ci - the CatalogItem whose value is to be computed
Returns:
the value of ci.
See Also:
Stock.sumStock(data.DataBasket, data.CatalogItemValue, data.Value)
Override:
Always

SalesPoint Framework v3.1