public class QuotationUtility
extends java.lang.Object
Constructor and Description |
---|
QuotationUtility() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Integer |
calcBaseItemQuantity(java.lang.String theUOM,
java.lang.Double theQuantity,
BaseItemAccessBean theBaseItemAB)
Calculates the base item quantity (with rounding DOWN).
|
static java.lang.Integer |
calcBaseItemQuantityUp(java.lang.String theUOM,
java.lang.Double theQuantity,
BaseItemAccessBean theBaseItemAB)
Calculates the base item quantity (with rounding UP).
|
static QuantityAmount |
calcQuantityAmount(OrderItemAccessBean theOrderItemAB,
CommandContext theCommandContext,
java.lang.Long theReferralInterfacePolicyId)
Calculates the quantity amount.
|
static BaseItemAccessBean |
getBaseItemOf(OrderItemAccessBean theOrderItemAB)
Gets the base item access bean related to the order item access bean
|
static java.lang.Long |
getDefaultContractReferralInterfacePolicyId(CommandContext commandContext,
java.lang.Integer anStoreId)
Returns the policy Id of the ReferralInterface for the
default Contract ID of the specified Store ID.
|
static java.lang.Long |
getReferralInterfacePolicyIdFor(java.lang.Long theTradingAgreementId,
CommandContext commandContext)
Sets the referral interface policy id based on the trading access bean for the quotation request.
|
static java.lang.Long |
getReferralInterfacePolicyIdFor(com.ibm.commerce.order.objects.OrderQuotationRelAccessBean theOrderQuotationRelAB,
CommandContext commandContext)
Sets the referral interface policy id based on the trading access bean for the quotation request.
|
static java.lang.String |
mapUOM(java.lang.String theUOM,
CommandContext theCommandContext,
java.lang.Long theReferralInterfacePolicyId)
Maps the unit of measure from the Websphere Commerce system to the external system.
|
static java.lang.String |
mapUOMToWCUnit(java.lang.String theUOM,
CommandContext theCommandContext,
java.lang.Long theReferralInterfacePolicyId)
Maps the unit of measure to the Websphere Commerce system from the external system.
|
public static java.lang.Long getReferralInterfacePolicyIdFor(java.lang.Long theTradingAgreementId, CommandContext commandContext) throws ECException
theTradingAgreementId
- The contract id.commandContext
- The command context.ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if there is a javax.ejb.CreateException,
_ERR_FINDER_EXCEPTION if there is a javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a javax.naming.NamingException,
_ERR_REMOTE_EXCEPTION if there is a java.rmi.RemoteException.ECException
public static java.lang.Long getReferralInterfacePolicyIdFor(com.ibm.commerce.order.objects.OrderQuotationRelAccessBean theOrderQuotationRelAB, CommandContext commandContext) throws ECException
theOrderQuotationRelAB
- The order quotation rel access bean.commandContext
- The command context.ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if there is a javax.ejb.CreateException,
_ERR_FINDER_EXCEPTION if there is a javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a javax.naming.NamingException,
_ERR_REMOTE_EXCEPTION if there is a java.rmi.RemoteException.ECException
public static BaseItemAccessBean getBaseItemOf(OrderItemAccessBean theOrderItemAB) throws ECException
theOrderItemAB
- The order item access bean.ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if there is a javax.ejb.CreateException,
_ERR_FINDER_EXCEPTION if there is a javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a javax.naming.NamingException,
_ERR_REMOTE_EXCEPTION if there is a java.rmi.RemoteException.ECException
public static java.lang.String mapUOM(java.lang.String theUOM, CommandContext theCommandContext, java.lang.Long theReferralInterfacePolicyId) throws ECException
theUOM
- The unit of measure (in Websphere Commerce units) to convert.theCommandContext
- The command context.theReferralInterfacePolicyId
- The referral interface policy id.ECException
public static java.lang.String mapUOMToWCUnit(java.lang.String theUOM, CommandContext theCommandContext, java.lang.Long theReferralInterfacePolicyId) throws ECException
theUOM
- The unit of measure (in external units) to convert.theCommandContext
- The command context.theReferralInterfacePolicyId
- The referral interface policy id.ECException
public static QuantityAmount calcQuantityAmount(OrderItemAccessBean theOrderItemAB, CommandContext theCommandContext, java.lang.Long theReferralInterfacePolicyId) throws ECException
theOrderItemAB
- The order item access bean data.theCommandContext
- The command context.theReferralInterfacePolicyId
- The referral interface policy id.ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if there is a javax.ejb.CreateException,
_ERR_FINDER_EXCEPTION if there is a javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a javax.naming.NamingException,
_ERR_REMOTE_EXCEPTION if there is a java.rmi.RemoteException.ECException
public static java.lang.Integer calcBaseItemQuantityUp(java.lang.String theUOM, java.lang.Double theQuantity, BaseItemAccessBean theBaseItemAB) throws ECException
theUOM
- The unit of measure.theQuantity
- The quantity to use to calculate the base item quantity.theBaseItemAB
- The base item access bean.ECException
- These exceptions are allowed to percolate.public static java.lang.Integer calcBaseItemQuantity(java.lang.String theUOM, java.lang.Double theQuantity, BaseItemAccessBean theBaseItemAB) throws ECException
theUOM
- The unit of measure.theQuantity
- The quantity to use to calculate the base item quantity.theBaseItemAB
- The base item access bean.ECException
- These exceptions are allowed to percolate.public static java.lang.Long getDefaultContractReferralInterfacePolicyId(CommandContext commandContext, java.lang.Integer anStoreId) throws ECException
commandContext
- The command context.anStoreId
- the Store ID.ECException