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:
StoreAccessBean
CatalogEntryShippingAccessBean
OfferAccessBean
OfferPriceAccessBean
CatalogEntryAccessBean
ServerJDBCHelperBean
UserAccessBean
MemberGroupMemberAccessBean
defaultCommandClassName, ERR_CODE_NO_PRICE, ERRTASK_NAME, NAME
defaultCommandClassName, ERR_CODE_NO_PRICE, ERRTASK_NAME, NAME
defaultCommandClassName, 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, wait
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public GetBaseUnitPriceCmdImpl()
public MonetaryAmount getBasePrice()
getBasePrice
in interface GetBaseSpecialPriceCmd
getBasePrice
in interface GetBaseUnitPriceCmd
getBasePrice
in interface GetProductBaseUnitPriceCmd
public java.lang.Long[] getContractIds() throws com.ibm.commerce.exception.ECSystemException
getContractIds
in interface GetBaseSpecialPriceCmd
getContractIds
in interface GetBaseUnitPriceCmd
getContractIds
in interface GetProductBaseUnitPriceCmd
com.ibm.commerce.exception.ECSystemException
public java.sql.Timestamp getExpiryDateForCache() throws com.ibm.commerce.exception.ECSystemException
getExpiryDateForCache
in interface GetBaseSpecialPriceCmd
getExpiryDateForCache
in interface GetBaseUnitPriceCmd
getExpiryDateForCache
in interface GetProductBaseUnitPriceCmd
com.ibm.commerce.exception.ECSystemException
public com.ibm.commerce.order.objects.OfferAccessBean getOffer()
getOffer
in interface GetBaseSpecialPriceCmd
getOffer
in interface GetBaseUnitPriceCmd
getOffer
in interface GetProductBaseUnitPriceCmd
public java.lang.Long getOfferId()
getOfferId
in interface GetBaseSpecialPriceCmd
getOfferId
in interface GetBaseUnitPriceCmd
getOfferId
in interface GetProductBaseUnitPriceCmd
public MonetaryAmount getPrice()
getPrice
in interface GetBaseSpecialPriceCmd
getPrice
in interface GetBaseUnitPriceCmd
getPrice
in interface GetProductBaseUnitPriceCmd
public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
public void reset()
reset
in class com.ibm.commerce.command.AbstractECTargetableCommand
public void setCatEntryId(java.lang.Long aCatEntryId)
setCatEntryId
in interface GetBaseSpecialPriceCmd
setCatEntryId
in interface GetBaseUnitPriceCmd
setCatEntryId
in interface GetProductBaseUnitPriceCmd
aCatEntryId
- the reference number of a catalog entry.public void setContractIds(java.lang.Long[] aContractIdList)
setContractIds
in interface GetBaseSpecialPriceCmd
setContractIds
in interface GetBaseUnitPriceCmd
setContractIds
in interface GetProductBaseUnitPriceCmd
aContractIdList
- the contract IDs to use.public void setCurrency(java.lang.String aCurrency)
setCurrency
in interface GetBaseSpecialPriceCmd
setCurrency
in interface GetBaseUnitPriceCmd
setCurrency
in interface GetProductBaseUnitPriceCmd
aCurrency
- the currency.public void setOfferIds(java.lang.Long[] anOfferIdList)
setOfferIds
in interface GetBaseSpecialPriceCmd
setOfferIds
in interface GetBaseUnitPriceCmd
setOfferIds
in interface GetProductBaseUnitPriceCmd
anOfferIdList
- the offer IDs.public void setOrderItemAccessBean(com.ibm.commerce.order.objects.OrderItemAccessBean anOrderItemAccessBean)
setOrderItemAccessBean
in interface GetBaseSpecialPriceCmd
anOrderItemAccessBean
- an order item access bean.public void setQuantity(QuantityAmount newQuantityAmount)
setQuantity
in interface GetBaseSpecialPriceCmd
setQuantity
in interface GetBaseUnitPriceCmd
setQuantity
in interface GetProductBaseUnitPriceCmd
aQuantityAmount
- a quantity amount.public void setStoreId(java.lang.Integer newStoreId)
setStoreId
in interface GetBaseSpecialPriceCmd
setStoreId
in interface GetBaseUnitPriceCmd
setStoreId
in interface GetProductBaseUnitPriceCmd
aStoreId
- the store Id.public void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException