public class RetrievePriceRuleCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements RetrievePriceRuleCmd
com.ibm.commerce.contract.commands.RetrievePriceRuleCmd
.
After price rule feature has been enabled, this command is registered in the command registry as the
default implementation.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this class.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
RetrievePriceRuleCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getPriceRuleId()
Gets the retrieved price rule Id.
|
void |
performExecute()
Performs the main logic to retrieve the price rule.
|
void |
setContractId(java.lang.Long contractId)
Sets the contract Id.
|
void |
setEffectiveTime(java.sql.Timestamp effectiveTime)
Sets the effective time of the price rule.
|
void |
setMemberId(java.lang.Long memberId)
Sets the member Id.
|
void |
validateParameters()
Validate the 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, reset, 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 static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public java.lang.Long getPriceRuleId()
getPriceRuleId
in interface RetrievePriceRuleCmd
null
is returned is no price
rule retrieved.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
- Throws exception if errors occurred.public void setContractId(java.lang.Long contractId)
setContractId
in interface RetrievePriceRuleCmd
contractId
- The contract Id. Cannot be null or empty.public void setEffectiveTime(java.sql.Timestamp effectiveTime)
setEffectiveTime
in interface RetrievePriceRuleCmd
effectiveTime
- The effective time of the price rule. If null, the current time is used.public void setMemberId(java.lang.Long memberId)
setMemberId
in interface RetrievePriceRuleCmd
memberId
- The member Id. If null, the member Id in the business context
is used.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
- If contract Id is not set, exception is thrown.