com.ibm.retail.saf.provider
Class POSResultImpl

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

public class POSResultImpl
extends POSInfoImpl
implements POSResult

Base implementation of the POSResult interface.

See Also:
Serialized Form

Field Summary
protected  java.util.Map exceptionsMap
           
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
POSResultImpl()
          Constructs a POSResult with no attributes
 
Method Summary
 void addException(java.lang.Object key, java.lang.Throwable t)
           
 java.util.Iterator getExceptions()
          Return an iterator of non-fatal exceptions that are contained in the result.
 boolean hasExceptions()
          Return true if non-fatal exceptions occurred during processing of the request.
 void removeException(java.lang.Object key)
           
 
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.POSInfo
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

exceptionsMap

protected java.util.Map exceptionsMap
Constructor Detail

POSResultImpl

public POSResultImpl()
Constructs a POSResult with no attributes

Method Detail

hasExceptions

public boolean hasExceptions()
Description copied from interface: POSResult
Return true if non-fatal exceptions occurred during processing of the request.

A request may produce a "partial result" without throwing a fatal exception. An example is the processing of a price inquiry where an item lookup fails.

Specified by:
hasExceptions in interface POSResult
Returns:
true if the result contains non-fatal exceptions

getExceptions

public java.util.Iterator getExceptions()
Description copied from interface: POSResult
Return an iterator of non-fatal exceptions that are contained in the result.

If no exceptions are contained in the result, null is returned.

A request may produce a "partial result" without throwing a fatal exception. An example is the processing of a price inquiry where an item lookup fails.

This method provides an iterator of exceptions to an object identifier related to the operation that failed. A typical usage provides an ItemIdentifier and a Throwable explaining the exception condition (e.g., Item not on file).

Specified by:
getExceptions in interface POSResult
Returns:
Iterator of Map.Entry objects containing an Object key and a Throwable value. NULL is returned if no exceptions are found.

addException

public void addException(java.lang.Object key,
                         java.lang.Throwable t)

removeException

public void removeException(java.lang.Object key)