com.ibm.retail.saf.provider
Class DefaultTransactionRequest

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--com.ibm.retail.saf.provider.POSInfoImpl
                    |
                    +--com.ibm.retail.saf.provider.POSRequestImpl
                          |
                          +--com.ibm.retail.saf.provider.DefaultTransactionRequest
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, POSInfo, POSRequest, java.io.Serializable, TransactionRequest

public class DefaultTransactionRequest
extends POSRequestImpl
implements TransactionRequest

Provides item information to a point-of-sale transaction.

The request contains a collection of lineitems identifying the items and quantities to be purchased.

See Also:
Serialized Form

Field Summary
protected  java.lang.String alternateLoyaltyID
           
protected  java.lang.String correlatorID
           
protected  java.lang.String customerLoyaltyID
           
protected  java.util.List lineItems
           
 
Fields inherited from class com.ibm.retail.saf.provider.POSRequestImpl
clientID, requestID
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
DefaultTransactionRequest()
          Default constructor
 
Method Summary
 void addLineItem(com.ibm.retail.saf.provider.LineItem lineItem)
          Adds a LineItem to the request.
 java.lang.String getAlternateLoyaltyID()
          Gets the alternate loyalty or customer number defined for this transaction.
 java.lang.String getCustomerLoyaltyID()
          Gets the customer's loyalty identifier defined for this transaction.
 java.util.List getLineItemList()
          Gets the list of LineItems contained in the request.
 void removeLineItem(com.ibm.retail.saf.provider.LineItem lineItem)
          Removes a LineItem from the request.
 void setAlternateLoyaltyID(java.lang.String altID)
          Sets the alternate loyalty or customer number for this transaction.
 void setCustomerLoyaltyID(java.lang.String customerID)
          Sets a customer's loyalty identifier for this transaction.
 
Methods inherited from class com.ibm.retail.saf.provider.POSRequestImpl
getClientID, getRequestIdentifier, setRequestIdentifier
 
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.POSRequest
getClientID, getRequestIdentifier
 
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

lineItems

protected java.util.List lineItems

customerLoyaltyID

protected java.lang.String customerLoyaltyID

alternateLoyaltyID

protected java.lang.String alternateLoyaltyID

correlatorID

protected java.lang.String correlatorID
Constructor Detail

DefaultTransactionRequest

public DefaultTransactionRequest()
Default constructor

Method Detail

getCustomerLoyaltyID

public java.lang.String getCustomerLoyaltyID()
Description copied from interface: TransactionRequest
Gets the customer's loyalty identifier defined for this transaction.

If no loyalty identifier is specified, the alternate loyalty identifier is used. If neither is specified, the transaction is processed without loyalty pricing.

Specified by:
getCustomerLoyaltyID in interface TransactionRequest
Returns:
loyalty ID

getAlternateLoyaltyID

public java.lang.String getAlternateLoyaltyID()
Description copied from interface: TransactionRequest
Gets the alternate loyalty or customer number defined for this transaction. The alternate identifier is used as a substitute lookup to determine the customer loyalty number.

Specified by:
getAlternateLoyaltyID in interface TransactionRequest

setCustomerLoyaltyID

public void setCustomerLoyaltyID(java.lang.String customerID)
Description copied from interface: TransactionRequest
Sets a customer's loyalty identifier for this transaction.

If no loyalty identifier is specified, the alternate loyalty identifier is used. If neither is specified, the transaction is processed without loyalty pricing.

Specified by:
setCustomerLoyaltyID in interface TransactionRequest

setAlternateLoyaltyID

public void setAlternateLoyaltyID(java.lang.String altID)
Description copied from interface: TransactionRequest
Sets the alternate loyalty or customer number for this transaction. This identifier is used as a substitute lookup to determine the customer loyalty number.

Specified by:
setAlternateLoyaltyID in interface TransactionRequest
Parameters:
altID - alternate loyalty ID

addLineItem

public void addLineItem(com.ibm.retail.saf.provider.LineItem lineItem)
Description copied from interface: TransactionRequest
Adds a LineItem to the request.

Duplicate lineitems in a list are allowed.

Specified by:
addLineItem in interface TransactionRequest

removeLineItem

public void removeLineItem(com.ibm.retail.saf.provider.LineItem lineItem)
Description copied from interface: TransactionRequest
Removes a LineItem from the request.

Specified by:
removeLineItem in interface TransactionRequest

getLineItemList

public java.util.List getLineItemList()
Description copied from interface: TransactionRequest
Gets the list of LineItems contained in the request.

If no list exists, a null is returned.

Objects in the list are of type LineItem. A lineitem identifies the item and the quantity of the item to be sold by the point-of-sale system.

Specified by:
getLineItemList in interface TransactionRequest
Returns:
a List of LineItems