public class CreateNominalCostCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements CreateNominalCostCmd
CreateNominalCostCmdImpl
Task Command Implementation
creates the nominal cost of a product
This implementation first obtains a TradingPositionContainer ID of the nominal cost pricelist; then creates an entry in OFFER table; and add one new record to OFFERPRICE table in one transaction.
This command uses the following AccessBeans:
OfferAccessBean
OfferPriceAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
CreateNominalCostCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrency()
Returns the currency.
|
void |
performExecute()
First validates the input parameters;
Second retrieves the nominal cost pricelist ID;
Third check if there exists a nominal cost, if yes, throw ECException;
Finally add record to OFFER and OFFERPRICE tables in a single transaction
|
void |
reset() |
void |
setCatEntryId(java.lang.Long aCatEntryID)
Sets the catalog entry ID whose nominal cost is going to be created.
|
void |
setCurrency(java.lang.String aCurrency)
Set the currency of the nominal cost.
|
void |
setNominalCost(java.math.BigDecimal aNominalCost)
Set the new value of the nominal cost of the product under this offer.
|
void |
setStoreId(java.lang.Integer aStoreId)
Set the store ID to which the catalog entry belongs.
|
void |
setTSRId(java.lang.Long aTSRId)
Set TSR ID who helps customer on shopping
|
void |
validateParameters() |
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 static final java.lang.String COPYRIGHT
public java.lang.String getCurrency() throws com.ibm.commerce.exception.ECSystemException
com.ibm.commerce.exception.ECSystemException
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
throw
- ECException when failure encountered.com.ibm.commerce.exception.ECException
public void reset()
reset
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.websphere.command.Command#reset()
public void setCatEntryId(java.lang.Long aCatEntryID)
setCatEntryId
in interface CreateNominalCostCmd
catEntryId
- A reference number of catalog entry.public void setCurrency(java.lang.String aCurrency)
setCurrency
in interface CreateNominalCostCmd
aCurrency
- A currency.public void setNominalCost(java.math.BigDecimal aNominalCost)
setNominalCost
in interface CreateNominalCostCmd
nominalCost
- BigDecimal A nominal cost amountpublic void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface CreateNominalCostCmd
storeId
- A store IDpublic void setTSRId(java.lang.Long aTSRId)
setTSRId
in interface CreateNominalCostCmd
aTSRId
- Long A TSR IDpublic 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
ECCommand.validateParameters()