com.ibm.commerce.price.commands
Interface GetContractSpecialPriceCmd

All Superinterfaces:
TaskCommand
All Known Implementing Classes:
GetContractUnitPriceCmdImpl

public interface GetContractSpecialPriceCmd
extends TaskCommand

Interface for the command used for retrieving the base special price of a product.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
static java.lang.String NAME
          The name of this command.
 
Method Summary
 java.lang.Long[] getApplicableTradingIds()
          Get all the trading Ids the user qualified and have a price
 MonetaryAmount[] getApplicableTradingUnitPrices()
          Get all the prices for all the trading Ids
 MonetaryAmount getBasePrice()
          Gets the base price of the catalog entry.
  CatEntryPrices[] getCatEntryPrices()
          Get the CatEntryPrices of the catalog entries
  OfferAccessBean getOffer()
          Get the offer access bean that was used to determine the price.
 java.lang.Long getOfferId()
          Get the offer Id that was used to determine the price.
 MonetaryAmount getPrice()
          Gets the actual price of the catalog entry.
 java.lang.Long getTcId()
          Get the Tc Id that was used to determine the price.
 java.lang.Long getTradingId()
          Get the trading IDs associated with the offer that supplied the price.
 void setCatEntryId(java.lang.Long aCatEntryId)
          Sets the primary key of the catalog entry whose price is to be retrieved.
 void setCatEntryPrices( CatEntryPrices[] aCatEntryPrices)
          Set CatEntryPrices
 void setCurrency(java.lang.String aCurrency)
          (Optional) Set the currency to be used for finding the price.
 void setErrorMode(boolean aErrorMode)
          Set error mode
 void setOfferIds(java.lang.Long[] anOfferIdList)
          (Optional) Sets the offer IDs to use for the price.
 void setOrderItemAccessBean( OrderItemAccessBean aOrderItemAccessBean)
          (Optional) Set the order item.
 void setQuantity(QuantityAmount aQuantityAmount)
          (Optional) Set the quantity amount of the catalog entry that is to be priced.
 void setStoreId(java.lang.Integer aStoreId)
          (Optional) Set the store Id to use for calculating the price.
 void setTradingIds(java.lang.Long[] aTradingIds)           (Optional) Sets the trading IDs to be used to determine which offers apply.
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
The name of this command.
See Also:
Constant Field Values
Method Detail

getBasePrice

public MonetaryAmount getBasePrice()
Gets the base price of the catalog entry. The base price is the price (and currency) found for the catalog entry before any conversion. This is only set when the requested currency is different from the base currency and the base price must be converted to the requested price.
Returns:
the base price of the product.

getCatEntryPrices

public CatEntryPrices[] getCatEntryPrices()
Get the CatEntryPrices of the catalog entries
Returns:
CatEntryPrices[] return a array of price structures

getOffer

public OfferAccessBean getOffer()
Get the offer access bean that was used to determine the price.
Returns:
the offer access bean associated with the offer used to calculate the price.

getOfferId

public java.lang.Long getOfferId()
Get the offer Id that was used to determine the price.
Returns:
the offer Id.

getPrice

public MonetaryAmount getPrice()
Gets the actual price of the catalog entry. This price is in the requested currency of the shopper.
Returns:
the price of the catalog entry Id.

getTcId

public java.lang.Long getTcId()
Get the Tc Id that was used to determine the price.
Returns:
the Tc Id.

getTradingId

public java.lang.Long getTradingId()
                            throws ECSystemException
Get the trading IDs associated with the offer that supplied the price.
Returns:
the trading ID(s).
Throws:
ECSystemException

setCatEntryId

public void setCatEntryId(java.lang.Long aCatEntryId)
Sets the primary key of the catalog entry whose price is to be retrieved.
Parameters:
aCatEntryId - the reference number of a catalog entry.

setCurrency

public void setCurrency(java.lang.String aCurrency)
(Optional) Set the currency to be used for finding the price. If the currency is not specified then the "negotiated" currency is used for the store Id and shopper's preferred currency. (The negotiated currency is the currency returned from the getCurrency() method of the currency manager).
Parameters:
aCurrency - the currency.

setOfferIds

public void setOfferIds(java.lang.Long[] anOfferIdList)
(Optional) Sets the offer IDs to use for the price. If no offer IDs are supplied, then the "best" of all qualifying offers will be used. If offer IDs are specified, the "best" of the specified offers will be returned.
Parameters:
anOfferIdList - the offer IDs.

setOrderItemAccessBean

public void setOrderItemAccessBean(OrderItemAccessBean aOrderItemAccessBean)
(Optional) Set the order item.

setQuantity

public void setQuantity(QuantityAmount aQuantityAmount)
(Optional) Set the quantity amount of the catalog entry that is to be priced. The quantity amount helps determine which offers are valid. If the quantity amount is not specified then the nominal quantity (rounded up to the nearest multiple as specified in the quantityMultiple attribute) of the Catalog entry is assumed to be the requested quantity.
Parameters:
aQuantityAmount - a quantity amount.

setStoreId

public void setStoreId(java.lang.Integer aStoreId)
(Optional) Set the store Id to use for calculating the price. If the store Id is not specified then the store Id of the command context will be used.
Parameters:
aStoreId - the store Id.

getApplicableTradingIds

public java.lang.Long[] getApplicableTradingIds()
Get all the trading Ids the user qualified and have a price
Returns:
Long[] return all the trading IDs this shopper eligible

getApplicableTradingUnitPrices

public MonetaryAmount[] getApplicableTradingUnitPrices()
Get all the prices for all the trading Ids
Returns:
MonetaryAmount[] For each trading ID, return applicable price values

setErrorMode

public void setErrorMode(boolean aErrorMode)
Set error mode
Parameters:
aErrorMode - a boolean to decide if throw error message if price can not be retrieved.

setTradingIds

public void setTradingIds(java.lang.Long[] aTradingIds)
(Optional) Sets the trading IDs to be used to determine which offers apply. If no trading ID is specified then the default contract for the store is used.
Parameters:
aTradingIds - the trading IDs to use.

setCatEntryPrices

public void setCatEntryPrices(CatEntryPrices[] aCatEntryPrices)
Set CatEntryPrices
Parameters:
aCatEntryPrices - the CatEntryPrices structure to use