com.ibm.commerce.utf.commands
Class CreateRFQCatentryRelCmdImpl

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

public class CreateRFQCatentryRelCmdImpl
extends TaskCommandImpl
implements CreateRFQCatentryRelCmd

Creates the relationship between a catalog entry and the RFQ.

Behaviour

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

Exception conditions


Field Summary
 java.lang.Long catentryId
           
 java.lang.String currency
           
 java.lang.Long offeringId
           
 java.math.BigDecimal price
           
 java.lang.String qtyunit
           
 java.lang.Double quantity
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.utf.commands.CreateRFQCatentryRelCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Constructor Summary
CreateRFQCatentryRelCmdImpl()
           
 
Method Summary
 java.lang.Long getCatentryId()
          Retrieves the catalog entry ID.
 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.
 void performExecute()
          Creates the RFQ catalog entry relationship.
 void setCatentryId(java.lang.Long newCatentryId)
          Stores the catalog entry ID.
 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 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.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, 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
 

Field Detail

catentryId

public java.lang.Long catentryId

currency

public java.lang.String currency

offeringId

public java.lang.Long offeringId

price

public java.math.BigDecimal price

qtyunit

public java.lang.String qtyunit

quantity

public java.lang.Double quantity
Constructor Detail

CreateRFQCatentryRelCmdImpl

public CreateRFQCatentryRelCmdImpl()
Method Detail

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 AbstractECCommand
Throws:
ECApplicationException - If an application error occurs while creating the RFQ.
ECSystemException - If a system error occurs while creating the RFQ.

setCatentryId

public void setCatentryId(java.lang.Long newCatentryId)
Stores the catalog entry ID.
Specified by:
setCatentryId in interface CreateRFQCatentryRelCmd
Parameters:
newCatentryid - The catalog entry 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.math.BigDecimal newPrice)
Stores the price quoted for the catalog entry.
Parameters:
newPrice - The price of the catalog entry.

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.

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 AbstractECCommand
Throws:
ECApplicationException -
  • If the RFQ ID has not been provided.
  • If the catalog entry has not been provided.