com.ibm.retail.saf.provider
Class DefaultPriceResult

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--com.ibm.retail.saf.provider.POSInfoImpl
                    |
                    +--com.ibm.retail.saf.provider.POSResultImpl
                          |
                          +--com.ibm.retail.saf.provider.DefaultPriceResult
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, POSInfo, POSResult, PriceResult, java.io.Serializable

public class DefaultPriceResult
extends POSResultImpl
implements PriceResult

Contains the results obtained from performing a price lookup on the point-of-sale system.

PriceResult is used by a POSProvider to return pricing information. Results from a price request are put in a PriceResult object and returned to the client.

See Also:
Serialized Form

Field Summary
protected  java.util.Map prices
           
 
Fields inherited from class com.ibm.retail.saf.provider.POSResultImpl
exceptionsMap
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
DefaultPriceResult()
           
 
Method Summary
 void addPrice(com.ibm.retail.saf.provider.ItemIdentifier item, com.ibm.retail.saf.provider.PriceInfo price)
           
 int getNumberOfPrices()
          Gets the total number of items in this PriceResult.
 com.ibm.retail.saf.provider.PriceInfo getPrice(com.ibm.retail.saf.provider.ItemIdentifier itemID)
          Gets the price of an item in this PriceResult.
 java.util.Iterator itemIdentifiers()
          Gets an iterator for the item identifiers defined for this PriceResult.
 void removePrice(com.ibm.retail.saf.provider.ItemIdentifier item)
           
 
Methods inherited from class com.ibm.retail.saf.provider.POSResultImpl
addException, getExceptions, hasExceptions, removeException
 
Methods inherited from class com.ibm.retail.saf.provider.POSInfoImpl
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.retail.saf.provider.POSResult
getExceptions, hasExceptions
 
Methods inherited from interface com.ibm.retail.saf.provider.POSInfo
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

prices

protected java.util.Map prices
Constructor Detail

DefaultPriceResult

public DefaultPriceResult()
Method Detail

addPrice

public void addPrice(com.ibm.retail.saf.provider.ItemIdentifier item,
                     com.ibm.retail.saf.provider.PriceInfo price)

removePrice

public void removePrice(com.ibm.retail.saf.provider.ItemIdentifier item)

getPrice

public com.ibm.retail.saf.provider.PriceInfo getPrice(com.ibm.retail.saf.provider.ItemIdentifier itemID)
                                               throws POSException
Description copied from interface: PriceResult
Gets the price of an item in this PriceResult.

Specified by:
getPrice in interface PriceResult
Parameters:
itemID - ItemIdentifier key used to access the price.
Returns:
price of the item.
Throws:
POSException - if the price is not found

itemIdentifiers

public java.util.Iterator itemIdentifiers()
Description copied from interface: PriceResult
Gets an iterator for the item identifiers defined for this PriceResult.

Entries returned by the iterator are of type ItemIdentifier. The ItemIdentifier is the number used to sell the item at the point-of-sale register. Examples include UPC, SKU, or PLU codes.

Specified by:
itemIdentifiers in interface PriceResult
Returns:
iterator for the items contained in price list.

getNumberOfPrices

public int getNumberOfPrices()
                      throws POSException
Description copied from interface: PriceResult
Gets the total number of items in this PriceResult.

Specified by:
getNumberOfPrices in interface PriceResult
Returns:
total number of items.
Throws:
POSException - if the price is not found