com.ibm.commerce.fulfillment.beans

Class CalculationCodeDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, com.ibm.commerce.fulfillment.beans.CalculationCodeInputDataBean, com.ibm.commerce.fulfillment.beans.CalculationCodeSmartDataBean, Delegator, Protectable, java.io.Serializable


    public class CalculationCodeDataBean
    extends com.ibm.commerce.fulfillment.beansrc.CalculationCodeDataBeanBase
    implements com.ibm.commerce.fulfillment.beans.CalculationCodeInputDataBean, com.ibm.commerce.fulfillment.beans.CalculationCodeSmartDataBean
    This databean represents a CalculationCodeDataBean object.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CalculationCodeDataBean

        public CalculationCodeDataBean()
    • Method Detail

      • getRequestProperties

        public TypedProperty getRequestProperties()
        This method returns the request property set within this bean.
        Specified by:
        getRequestProperties in interface InputDataBean
        Returns:
        com.ibm.commerce.datatype.TypedProperty
      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperty)
        This method sets the request property within this bean.
        Specified by:
        setRequestProperties in interface InputDataBean
        Parameters:
        aRequestProperty - TypedProperty
      • getDataBeanKeyCalculationCodeId

        public java.lang.String getDataBeanKeyCalculationCodeId()
        This method returns the databean key:calculation code id.
        Specified by:
        getDataBeanKeyCalculationCodeId in interface com.ibm.commerce.fulfillment.beans.CalculationCodeSmartDataBean
        Returns:
        java.lang.String the databean key:calculation code id.
      • getCommandContext

        public CommandContext getCommandContext()
        This method returns the command context set within this bean.
        Specified by:
        getCommandContext in interface SmartDataBean
        Returns:
        com.ibm.commerce.command.CommandContext
      • setCommandContext

        public void setCommandContext(CommandContext aCommandContext)
        This method sets the command context within this bean.
        Specified by:
        setCommandContext in interface SmartDataBean
        Parameters:
        aCommandContext - com.ibm.commerce.command.CommandContext
      • setDataBeanKeyCalculationCodeId

        public void setDataBeanKeyCalculationCodeId(java.lang.String aCalculationCodeId)
        This method sets the databean key:calculation code id.
        Specified by:
        setDataBeanKeyCalculationCodeId in interface com.ibm.commerce.fulfillment.beans.CalculationCodeInputDataBean
        Parameters:
        aCalculationCodeId - java.lang.String
      • populate

        public void populate()
        This method is used to populate the CalculationCodeDataBean. You must set iDataBeanKeyCalculationCodeId using the setDataBeanKeyCalculationCodeId(java.lang.String) method before running the populate() method.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        java.lang.Exception
        See Also:
        setDataBeanKeyCalculationCodeId(java.lang.String)
      • getDescriptionString

        public java.lang.String getDescriptionString()
        This method returns the description string of this CalculationCode that corresponds to the current Language. Equivalent to getDescriptionDataBean(). getDescription().
        Returns:
        the description string, or null if none is found or an error has occurred during its retrieval.
      • getLongDescriptionString

        public java.lang.String getLongDescriptionString()
        This method returns the long description string of this CalculationCode that corresponds to the current Language. Equivalent to getDescriptionDataBean(). getLongDescription().
        Returns:
        the long description string, or null if none is found or an error has occurred during its retrieval.
      • getPromotionCodeDataBean

        public com.ibm.commerce.tools.epromotion.databeans.PromotionCodeDataBean getPromotionCodeDataBean()
        Deprecated. This method is reserved for internal use.

        To get the promotion code applied to an order, create a new instance of OrderPromotionCodeDataBean , set the order ID by calling method setOrderID, then call method getOrderPromotionCodes.

        To get the promotion code of the promotion associated with the calculation code, using method com.ibm.commerce.tools.epromotion.objimpl.CalculationCodePromotionCache#findByCalculationCodeId() to get com.ibm.commerce.tools.epromotion.objimpl.CalculationCodePromotionAccessBean objects. Then get promotion ID by com.ibm.commerce.tools.epromotion.objimpl.CalculationCodePromotionAccessBean#getPromotionId(). Next to call com.ibm.commerce.marketing.promotion.PromotionPersistenceManager#reverseLookup() and com.ibm.commerce.marketing.promotion.PromotionPersistenceManager#lookup() to get Promotion The last is to retrieve promotion code by Promotion.getCode().

        This method returns a PromotionCodeDataBean for this calcode . The PromotionCodeDataBean is for internal use.
        Returns:
        PromotionCodeDataBean
      • getAttachedCatalogEntryDataBeans

        public CatalogEntryDataBean[] getAttachedCatalogEntryDataBeans()
        This method returns attached CatalogEntryDataBean array
        Returns:
        CatalogEntryDataBean[]
      • getAttachedCatalogEntryDataBeansForPromotion

        public CatalogEntryDataBean[] getAttachedCatalogEntryDataBeansForPromotion()
        This method returns attached CatalogEntryDataBean array for promotion.
        Returns:
        CatalogEntryDataBean[]
      • getLocalizedStartDate

        public java.lang.String getLocalizedStartDate()
        Return localized start date of this CalculationCode.
        Returns:
        String startDate
      • getLocalizedEndDate

        public java.lang.String getLocalizedEndDate()
        Return localized end date of this CalculationCode.
        Returns:
        String endDate
      • isPromotionRelated

        public boolean isPromotionRelated()
        Return if this calculation code is related to a promotion
        Returns:
        true this calculation code is related to a promotion false this calculation code is not related to a promotion