java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.price.commands.GetBaseUnitPriceCmdImpl
Get the best price for a catalog entry.
The offer that is used to find the price of a catalog entry Id must satisfy the following criteria:
setQuantity(QuantityAmount)
or the quantity range specified on the
offer includes the quantity amount specified. If a conversion is required and
cannot be performed (because there is no conversion rule) then the offer is not
considered.If a valid offer cannot be found for an item, the parent product offers will be searched.
This command calls the following TaskCommands:
This command uses the following AccessBeans:
StoreAccessBean
CatalogEntryShippingAccessBean
OfferAccessBean
OfferPriceAccessBean
CatalogEntryAccessBean
ServerJDBCHelperAccessBean
UserAccessBean
MemberGroupMemberAccessBean
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.price.commands. GetBaseUnitPriceCmd |
COPYRIGHT,
defaultCommandClassName,
ERR_CODE_NO_PRICE,
ERRTASK_NAME,
NAME |
Fields inherited from interface com.ibm.commerce.price.commands. GetBaseSpecialPriceCmd |
COPYRIGHT,
defaultCommandClassName,
ERR_CODE_NO_PRICE,
ERRTASK_NAME,
NAME |
Fields inherited from interface com.ibm.commerce.price.commands. GetProductBaseUnitPriceCmd |
COPYRIGHT,
defaultCommandClassName,
ERR_CODE_NO_PRICE,
ERRTASK_NAME,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
GetBaseUnitPriceCmdImpl() GetBaseUnitPriceCmdImpl constructor. |
Method Summary | |
---|---|
MonetaryAmount |
getBasePrice() Gets the base price of the catalog entry. |
java.lang.Long[] |
getContractIds() Get the contract IDs associated with the offer that supplied the price. |
java.sql.Timestamp |
getExpiryDateForCache() Get the expiry date of the price. |
OfferAccessBean |
getOffer() Get the offer access bean that was used to determine the price. |
java.lang.Long |
getOfferId() getOfferID method comment. |
MonetaryAmount |
getPrice() Gets the actual price of the catalog entry. |
void |
performExecute() Execute the command. |
void |
reset() reset the command. |
void |
setCatEntryId(java.lang.Long aCatEntryId) Sets the primary key of the catalog entry whose price is to be retrieved. |
void |
setContractIds(java.lang.Long[] aContractIdList) (Optional) Sets the contract IDs to be used to determine which offers apply. |
void |
setCurrency(java.lang.String aCurrency) (Optional) Set the currency to be used for finding the price. |
void |
setOfferIds(java.lang.Long[] anOfferIdList) (Optional) Sets the offer IDs to use for the price. |
void |
setOrderItemAccessBean(
OrderItemAccessBean anOrderItemAccessBean) (Optional) Set the order item. |
void |
setQuantity(com.ibm.commerce.price.utils.QuantityAmount newQuantityAmount) (Optional) Set the quantity amount of the catalog entry that is to be priced. |
void |
setStoreId(java.lang.Integer newStoreId) (Optional) Set the store Id to use for calculating the price. |
void |
validateParameters() Check mandatory parameters. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.price.commands. GetBaseUnitPriceCmd |
setQuantity |
Methods inherited from interface com.ibm.commerce.price.commands. GetBaseSpecialPriceCmd |
setQuantity |
Methods inherited from interface com.ibm.commerce.price.commands. GetProductBaseUnitPriceCmd |
setQuantity |
Constructor Detail |
---|
public GetBaseUnitPriceCmdImpl()
Method Detail |
---|
public MonetaryAmount getBasePrice()
getBasePrice
in interface
GetBaseUnitPriceCmd
public java.lang.Long[] getContractIds() throws ECSystemException
getContractIds
in interface
GetBaseUnitPriceCmd
ECSystemException
public java.sql.Timestamp getExpiryDateForCache() throws ECSystemException
getExpiryDateForCache
in interface
GetBaseUnitPriceCmd
ECSystemException
public OfferAccessBean getOffer()
getOffer
in interface
GetBaseUnitPriceCmd
public java.lang.Long getOfferId()
getOfferId
in interface
GetBaseUnitPriceCmd
public MonetaryAmount getPrice()
getPrice
in interface
GetBaseUnitPriceCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
reset
in class
AbstractECTargetableCommand
public void setCatEntryId(java.lang.Long aCatEntryId)
setCatEntryId
in interface
GetBaseUnitPriceCmd
aCatEntryId
- the reference number of a catalog
entry.public void setContractIds(java.lang.Long[] aContractIdList)
setContractIds
in interface
GetBaseUnitPriceCmd
aContractIdList
- the contract IDs to use.public void setCurrency(java.lang.String aCurrency)
setCurrency
in interface
GetBaseUnitPriceCmd
aCurrency
- the currency.public void setOfferIds(java.lang.Long[] anOfferIdList)
setOfferIds
in interface
GetBaseUnitPriceCmd
anOfferIdList
- the offer IDs.public void setOrderItemAccessBean(OrderItemAccessBean anOrderItemAccessBean)
setOrderItemAccessBean
in interface
GetBaseSpecialPriceCmd
anOrderItemAccessBean
- an order item access
bean.public void setQuantity(com.ibm.commerce.price.utils.QuantityAmount newQuantityAmount)
public void setStoreId(java.lang.Integer newStoreId)
setStoreId
in interface
GetBaseUnitPriceCmd
newStoreId
- the store Id.public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException