|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--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.
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
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 |
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(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.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, 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.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Constructor Detail |
public GetBaseUnitPriceCmdImpl()
Method Detail |
public MonetaryAmount getBasePrice()
getBasePrice
in interface GetBaseUnitPriceCmd
public java.lang.Long[] getContractIds() throws ECSystemException
getContractIds
in interface GetBaseUnitPriceCmd
public java.sql.Timestamp getExpiryDateForCache() throws ECSystemException
getExpiryDateForCache
in interface GetBaseUnitPriceCmd
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 AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void reset()
reset
in class AbstractECCommand
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(QuantityAmount newQuantityAmount)
setQuantity
in interface GetBaseUnitPriceCmd
aQuantityAmount
- a quantity amount.public void setStoreId(java.lang.Integer newStoreId)
setStoreId
in interface GetBaseUnitPriceCmd
aStoreId
- the store Id.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |