com.ibm.commerce.utf.commands
Class CreateRFQCatentryRelCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.utf.commands.CreateRFQCatentryRelCmdImpl
All Implemented Interfaces:
CreateRFQCatentryRelCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CreateRFQCatentryRelCmdImpl
extends TaskCommandImpl
implements CreateRFQCatentryRelCmd

Creates the relationship between a catalog entry or a made to order item and the RFQ.

Behaviour

  1. Verifies that the mandatory parameter offeringId is present.
  2. Creates the RFQ catalog entry relationship using the incoming values for price, quantity, currency and quantityunit.

Exception conditions

This is the default implementation of the CreateRFQCatentryRelCmd. This command uses the following AccessBeans:
See Also:
Serialized Form

Field Summary
 java.lang.Long catentryId
          Catentry Id.
 java.lang.Integer changeable
          Changeable integer.
 java.lang.String currency
          Currency.
 java.lang.Long offeringId
          Offering Id.
 java.math.BigDecimal price
          Price.
 java.lang.String qtyunit
          Quantity Unit of Measurement.
 java.lang.Double quantity
          Quantity.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.utf.commands. CreateRFQCatentryRelCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CreateRFQCatentryRelCmdImpl()
          Default Constructor.
 
Method Summary
 java.lang.Long getCatentryId()
          Retrieves the catalog entry ID.
 java.lang.Integer getChangeable()
          Returns the changeable.
 java.lang.String getCurrency()
          Retrieves the currency.
 java.lang.Long getOfferingId()
          Retrieves the RFQ ID.
 java.math.BigDecimal getPrice()
          Retrieves the quoted price for the catalog entry.
 java.lang.String getQtyunit()
          Retrieves the quantity unit.
 java.lang.Double getQuantity()
          Retrieves the quantity(number of instances) of the catalog entry that has been requested.
 java.lang.Long getRFQProductId()
          Gets the new RFQ product ID.
 void performExecute()           Creates the RFQ catalog entry relationship.
 void reset()
          Reset the command
 void setCategoryId(java.lang.Long newCategoryid)
          Stores the category ID.
 void setCatentryId(java.lang.Long newCatentryId)
          Stores the catalog entry ID.
 void setChangeable(java.lang.Integer changeable)
          Sets the changeable.
 void setCurrency(java.lang.String newCurrency)
          Stores the currency.
 void setOfferingId(java.lang.Long newOfferingId)
          Stores the RFQ ID.
 void setPrice(java.math.BigDecimal newPrice)
          Stores the price quoted for the catalog entry.
 void setPrice(java.lang.String newPrice)
          Stores the price quoted for the catalog entry.
 void setProductName(java.lang.String productName)
          Sets the product name.
 void setQtyunit(java.lang.String newQtyunit)
          Stores the quantity unit.
 void setQuantity(java.lang.Double newQuantity)
          Stores the requested quantity
 void setQuantity(java.lang.String newQuantity)
          Stores the requested quantity
 void validateParameters()           This method does the following: Verifies that an RFQ Id has been provided. Verifies that a catalog entry ID has been provided.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offeringId

public java.lang.Long offeringId
Offering Id.

catentryId

public java.lang.Long catentryId
Catentry Id.

price

public java.math.BigDecimal price
Price.

quantity

public java.lang.Double quantity
Quantity.

currency

public java.lang.String currency
Currency.

qtyunit

public java.lang.String qtyunit
Quantity Unit of Measurement.

changeable

public java.lang.Integer changeable
Changeable integer.
Constructor Detail

CreateRFQCatentryRelCmdImpl

public CreateRFQCatentryRelCmdImpl()
Default Constructor.
Method Detail

reset

public void reset()
Reset the command
Overrides:
reset in class AbstractECTargetableCommand

getCatentryId

public java.lang.Long getCatentryId()
Retrieves the catalog entry ID.
Returns:
The catalog entry ID.

getCurrency

public java.lang.String getCurrency()
Retrieves the currency.
Returns:
The currency.

getOfferingId

public java.lang.Long getOfferingId()
Retrieves the RFQ ID.
Returns:
The RFQ ID.

getPrice

public java.math.BigDecimal getPrice()
Retrieves the quoted price for the catalog entry.
Returns:
The price of the catalog entry.

getQtyunit

public java.lang.String getQtyunit()
Retrieves the quantity unit.
Returns:
The quantity unit.

getQuantity

public java.lang.Double getQuantity()
Retrieves the quantity(number of instances) of the catalog entry that has been requested.
Returns:
The requested quantity of the catalog entry.

performExecute

public void performExecute()
                    throws ECException
Creates the RFQ catalog entry relationship.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECApplicationException - If an application error occurs while creating the RFQ.
ECSystemException - If a system error occurs while creating the RFQ.
ECException
See Also:
ECCommand#performExecute()

setCatentryId

public void setCatentryId(java.lang.Long newCatentryId)
Stores the catalog entry ID. If this is null, then a made to order RFQ product is created.
Specified by:
setCatentryId in interface CreateRFQCatentryRelCmd
Parameters:
newCatentryId - The catalog entry ID.

setCategoryId

public void setCategoryId(java.lang.Long newCategoryid)
Stores the category ID.
Specified by:
setCategoryId in interface CreateRFQCatentryRelCmd
Parameters:
newCategoryid - The category ID.

setCurrency

public void setCurrency(java.lang.String newCurrency)
Stores the currency.
Specified by:
setCurrency in interface CreateRFQCatentryRelCmd
Parameters:
newCurrency - The currency.

setOfferingId

public void setOfferingId(java.lang.Long newOfferingId)
Stores the RFQ ID.
Specified by:
setOfferingId in interface CreateRFQCatentryRelCmd
Parameters:
newOfferingId - The ID of the RFQ.

setPrice

public void setPrice(java.lang.String newPrice)
Stores the price quoted for the catalog entry.
Specified by:
setPrice in interface CreateRFQCatentryRelCmd
Parameters:
newPrice - The price of the catalog entry.

setPrice

public void setPrice(java.math.BigDecimal newPrice)
Stores the price quoted for the catalog entry.
Parameters:
newPrice - The price of the catalog entry.

setQtyunit

public void setQtyunit(java.lang.String newQtyunit)
Stores the quantity unit.
Specified by:
setQtyunit in interface CreateRFQCatentryRelCmd
Parameters:
newQtyunit - The quantity unit.

setQuantity

public void setQuantity(java.lang.Double newQuantity)
Stores the requested quantity
Parameters:
newQuantity - The requested quantity.

setQuantity

public void setQuantity(java.lang.String newQuantity)
Stores the requested quantity
Specified by:
setQuantity in interface CreateRFQCatentryRelCmd
Parameters:
newQuantity - The requested quantity.

validateParameters

public void validateParameters()
                        throws ECException
This method does the following:
  1. Verifies that an RFQ Id has been provided.
  2. Verifies that a catalog entry ID has been provided.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException -
  • If the RFQ ID has not been provided.
  • If the catalog entry has not been provided.
ECException
See Also:
ECCommand#validateParameters()

setProductName

public void setProductName(java.lang.String productName)
Sets the product name.
Specified by:
setProductName in interface CreateRFQCatentryRelCmd
Parameters:
productName - The product name.

getRFQProductId

public java.lang.Long getRFQProductId()
Gets the new RFQ product ID.
Specified by:
getRFQProductId in interface CreateRFQCatentryRelCmd
Returns:
The RFQ product ID.

getChangeable

public java.lang.Integer getChangeable()
Returns the changeable.
Returns:
java.lang.Integer

setChangeable

public void setChangeable(java.lang.Integer changeable)
Sets the changeable.
Specified by:
setChangeable in interface CreateRFQCatentryRelCmd
Parameters:
changeable - The changeable to set