public class CopyContractCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements CopyContractCmd
CopyContractCmd
task command.
ContractAccessBeanTradingAgreementAccessBeanTradingDescriptionAccessBeanParticipantAccessBeanAttachmentAccessBeanTradingAttachmentRelationAccessBeanContractDisplayAccessBeanPolicyTCRelationAccessBeanTermConditionDescriptionAccessBeanTermConditionAccessBean| 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 |
|---|
CopyContractCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
createNewContract()
Creates a new contract based on an existing contract.
|
void |
createNewVersionInContractChildTable()
Copys other contract related data for the new
contract based on the existing contract.
|
void |
createNewVersionInTCChildTable(java.lang.Long newTCId,
java.lang.Long originalTCId)
Copys terms and conditions related data for the new
contract based on the existing contract.
|
java.lang.Long |
getNewContractId()
Returns ID of the new contract.
|
void |
performExecute()
Executes the business logic of this command implementation.
|
void |
setAccountId(java.lang.Long anAccountId)
Sets the ID of the account to which the contract will be copied.
|
void |
setContractId(java.lang.Long anContractId)
Sets ID of the contract which will be copied from.
|
void |
setContractMajorVersion(java.lang.Integer majorVersion)
Sets the major version of the new contract.
|
void |
setContractMinorVersion(java.lang.Integer minorVersion)
Sets the minor version of the new contract.
|
void |
setContractName(java.lang.String contractName)
Sets the name of the new contract.
|
void |
validateParameters()
Validates if the id of the original contract was provided.
|
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, reset, 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 static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public void createNewContract()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void createNewVersionInContractChildTable()
public void createNewVersionInTCChildTable(java.lang.Long newTCId,
java.lang.Long originalTCId)
newTCId - the ID of the new termoriginalTCId - the ID of the original termpublic java.lang.Long getNewContractId()
getNewContractId in interface CopyContractCmdpublic 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.ECException - Raised with message _ERR_CONTRACT_COPY whenever an IOException or SAXException
occurred during terms and conditions copying process.createNewContract(),
createNewVersionInContractChildTable(),
createNewVersionInTCChildTable(Long, Long),
AbstractECTargetableCommand.performExecute()public void setAccountId(java.lang.Long anAccountId)
setAccountId in interface CopyContractCmdanAccountId - the ID of the accountpublic void setContractId(java.lang.Long anContractId)
setContractId in interface CopyContractCmdanContractId - the ID of the original contractpublic void setContractMajorVersion(java.lang.Integer majorVersion)
setContractMajorVersion in interface CopyContractCmdmajorVersion - the major version of the new contractpublic void setContractMinorVersion(java.lang.Integer minorVersion)
setContractMinorVersion in interface CopyContractCmdminorVersion - the minor version of the new contractpublic void setContractName(java.lang.String contractName)
setContractName in interface CopyContractCmdcontractName - the name of the new contractpublic 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 - Raised with the message _ERR_MISSING_CONTRACT_ID if the id of the original contract was missing.AbstractECTargetableCommand.validateParameters()