public class GetBaseUnitPriceCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements GetBaseUnitPriceCmd, GetBaseSpecialPriceCmd, GetProductBaseUnitPriceCmd
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:
StoreAccessBeanCatalogEntryShippingAccessBeanOfferAccessBeanOfferPriceAccessBeanCatalogEntryAccessBean ServerJDBCHelperBeanUserAccessBeanMemberGroupMemberAccessBeandefaultCommandClassName, ERR_CODE_NO_PRICE, ERRTASK_NAME, NAMEdefaultCommandClassName, ERR_CODE_NO_PRICE, ERRTASK_NAME, NAMEdefaultCommandClassName, ERR_CODE_NO_PRICE, ERRTASK_NAME, NAME| Constructor and Description |
|---|
GetBaseUnitPriceCmdImpl()
GetBaseUnitPriceCmdImpl constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
com.ibm.commerce.order.objects.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(com.ibm.commerce.order.objects.OrderItemAccessBean anOrderItemAccessBean)
(Optional) Set the order item.
|
void |
setQuantity(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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic GetBaseUnitPriceCmdImpl()
public MonetaryAmount getBasePrice()
getBasePrice in interface GetBaseSpecialPriceCmdgetBasePrice in interface GetBaseUnitPriceCmdgetBasePrice in interface GetProductBaseUnitPriceCmdpublic java.lang.Long[] getContractIds()
throws com.ibm.commerce.exception.ECSystemException
getContractIds in interface GetBaseSpecialPriceCmdgetContractIds in interface GetBaseUnitPriceCmdgetContractIds in interface GetProductBaseUnitPriceCmdcom.ibm.commerce.exception.ECSystemExceptionpublic java.sql.Timestamp getExpiryDateForCache()
throws com.ibm.commerce.exception.ECSystemException
getExpiryDateForCache in interface GetBaseSpecialPriceCmdgetExpiryDateForCache in interface GetBaseUnitPriceCmdgetExpiryDateForCache in interface GetProductBaseUnitPriceCmdcom.ibm.commerce.exception.ECSystemExceptionpublic com.ibm.commerce.order.objects.OfferAccessBean getOffer()
getOffer in interface GetBaseSpecialPriceCmdgetOffer in interface GetBaseUnitPriceCmdgetOffer in interface GetProductBaseUnitPriceCmdpublic java.lang.Long getOfferId()
getOfferId in interface GetBaseSpecialPriceCmdgetOfferId in interface GetBaseUnitPriceCmdgetOfferId in interface GetProductBaseUnitPriceCmdpublic MonetaryAmount getPrice()
getPrice in interface GetBaseSpecialPriceCmdgetPrice in interface GetBaseUnitPriceCmdgetPrice in interface GetProductBaseUnitPriceCmdpublic void performExecute()
throws com.ibm.commerce.exception.ECException
performExecute in interface com.ibm.commerce.command.ECCommandperformExecute in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECExceptionpublic void reset()
reset in class com.ibm.commerce.command.AbstractECTargetableCommandpublic void setCatEntryId(java.lang.Long aCatEntryId)
setCatEntryId in interface GetBaseSpecialPriceCmdsetCatEntryId in interface GetBaseUnitPriceCmdsetCatEntryId in interface GetProductBaseUnitPriceCmdaCatEntryId - the reference number of a catalog entry.public void setContractIds(java.lang.Long[] aContractIdList)
setContractIds in interface GetBaseSpecialPriceCmdsetContractIds in interface GetBaseUnitPriceCmdsetContractIds in interface GetProductBaseUnitPriceCmdaContractIdList - the contract IDs to use.public void setCurrency(java.lang.String aCurrency)
setCurrency in interface GetBaseSpecialPriceCmdsetCurrency in interface GetBaseUnitPriceCmdsetCurrency in interface GetProductBaseUnitPriceCmdaCurrency - the currency.public void setOfferIds(java.lang.Long[] anOfferIdList)
setOfferIds in interface GetBaseSpecialPriceCmdsetOfferIds in interface GetBaseUnitPriceCmdsetOfferIds in interface GetProductBaseUnitPriceCmdanOfferIdList - the offer IDs.public void setOrderItemAccessBean(com.ibm.commerce.order.objects.OrderItemAccessBean anOrderItemAccessBean)
setOrderItemAccessBean in interface GetBaseSpecialPriceCmdanOrderItemAccessBean - an order item access bean.public void setQuantity(QuantityAmount newQuantityAmount)
setQuantity in interface GetBaseSpecialPriceCmdsetQuantity in interface GetBaseUnitPriceCmdsetQuantity in interface GetProductBaseUnitPriceCmdaQuantityAmount - a quantity amount.public void setStoreId(java.lang.Integer newStoreId)
setStoreId in interface GetBaseSpecialPriceCmdsetStoreId in interface GetBaseUnitPriceCmdsetStoreId in interface GetProductBaseUnitPriceCmdaStoreId - the store Id.public void validateParameters()
throws com.ibm.commerce.exception.ECException
validateParameters in interface com.ibm.commerce.command.ECCommandvalidateParameters in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECException