com.ibm.commerce.catalog.beans

Class BundleDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, com.ibm.commerce.catalog.beans.BundleInputDataBean, com.ibm.commerce.catalog.beans.BundleSmartDataBean, java.io.Serializable


    public class BundleDataBean
    extends BundleAccessBean
    implements com.ibm.commerce.catalog.beans.BundleInputDataBean, com.ibm.commerce.catalog.beans.BundleSmartDataBean
    This bean represents a Bundle. A product comprised of a set of SKUs from the catalog for promotional purposes. The Product Manager may group any set of SKUs targeted for clearance, special introductions or other reasons to promote quick sales. A promotional package has two types:
    • A static kit or prebuilt kit which is priced independent of its SKUs and cannot be broken down into its constituent SKUs either in the shopping cart or order.
    • A bundle which is not priced as a whole but is the sum of each individual SKU. Its constituent SKUs are placed individually in the shopping cart or order (SKUs can be removed). A bundle is a convenient mechanism for stores to group a set of products together for their customers to purchase easily.

    You can find more information about data beans in the WebSphere Commerce data beans topic in the Information Center. Access Beans: Bundle

    Mandatory Parameters (for single row retrieval):

    • bundle ID

    Some hints and tips for using this data bean are:

    • It is important to set the bundle ID before activating the data bean.
    • You can set parameters using the constructor, or setters

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • BundleDataBean

        public BundleDataBean()
        Constructs an empty BundleDataBean.
      • BundleDataBean

        public BundleDataBean(CatalogEntryAccessBean abCatEntry)
        Creates a BundleDataBean from a CatalogEntryAccessBean.
        Parameters:
        abCatentry - The CatalogEntryAccessBean.
      • BundleDataBean

        public BundleDataBean(CatalogEntryAccessBean abCatEntry,
                              CommandContext aCommandContext)
        Constructs a BundleDataBean from a CatalogEntryAccessBean and the command context.
        Parameters:
        abCatEntry - The CatalogEntryAccessbean.
        aCommandContext - The command context as CommandContext object.
    • Method Detail

      • getAllAttachments

        public AttachmentDataBean[] getAllAttachments()
        Gets all the attachments in the bundle. Attachments are used in all the areas of Web applications. An attachment is additional material that a user can send in an e-mail, a request, or a detailed product specification. Attachments can be images files, text files, audio or video files, programs or documents. If there are no attachments to return this method will return a zero length array.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentsByUsage

        public AttachmentDataBean[] getAttachmentsByUsage()
        Gets all the bundle attachments by the specified attachment relation usage.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentUsages

        public AttachmentUsageDataBean[] getAttachmentUsages()
        Gets all the attachment relation usage used in the bundle attachments
        Returns:
        An array of AttachmentUsageDataBean
      • getAttributes

        public AttributeAccessBean[] getAttributes()
        Gets a list of beans that represent attributes of the bundle.
        Returns:
        The list of AttributeAccessBean for the bundle.
      • getDescriptiveAttributes

        public AttributeAccessBean[] getDescriptiveAttributes()
        Gets a list of beans that represent descriptive attributes of the bundle.
        Returns:
        The list of AttributeAccessBean for the bundle.
      • getBundleAccessories

        public RelatedBundleDataBean[] getBundleAccessories()
                                                     throws ECException
        Gets a list of beans which represent bundles that are accessories to this bundle. If there are no bundle accessories to return this method will return a zero length array.
        Specified by:
        getBundleAccessories in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method. An exception occurs during the execution of the method.
      • getBundleAssociations

        public RelatedBundleDataBean[] getBundleAssociations()
                                                      throws ECException
        Gets a list of beans which represent bundles that are merchandising associations for this bundle. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getBundleAssociations. If istrAssociationType is null, all types of merchandising associations will return.
        For example, the following code returns a list of beans that are bundle up-sells for this bundle:

        setAssociationType("UPSELL");
        RelatedBundleDataBean[] rb = getBundleAssociations();

        If there are no bundle associations to return this method will return a zero length array.
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundleCrossSells

        public RelatedBundleDataBean[] getBundleCrossSells()
                                                    throws ECException
        Gets a list of beans which represent bundles that are cross-sells to this bundle. If there are no bundle cross-sells to return this method will return a zero length array.
        Specified by:
        getBundleCrossSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundledItems

        public CompositeItemDataBean[] getBundledItems()
                                                throws ECException
        Gets a list of beans which represent items that are components of this bundle. If there are no bundled items to return this method will return a zero length array.
        Specified by:
        getBundledItems in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of CompositeItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundledPackages

        public CompositePackageDataBean[] getBundledPackages()
                                                      throws ECException
        Gets a list of beans which represent packages that are components of this bundle. If there are no bundled packages to return this method will return a zero length array.
        Specified by:
        getBundledPackages in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of CompositePackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundledProducts

        public CompositeProductDataBean[] getBundledProducts()
                                                      throws ECException
        Gets the list of beans which represent products that are components of this bundle. If there are no bundled products to return this method will return a zero length array.
        Specified by:
        getBundledProducts in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of CompositeProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundleID

        public java.lang.String getBundleID()
        Gets the bundle ID that represents the primary key for this bundle.
        Specified by:
        getBundleID in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The bundle ID.
      • getBundlePartNumber

        public java.lang.String getBundlePartNumber()
        Gets the part (SKU) number of the bundle.
        Specified by:
        getBundlePartNumber in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The part (SKU) number.
      • getBundleUpSells

        public RelatedBundleDataBean[] getBundleUpSells()
                                                 throws ECException
        Gets a list of beans that represent bundles that are up-sells to this bundle. If there are no bundle up-sells to return this method will return a zero length array.
        Specified by:
        getBundleUpSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCalculatedContractPrice

        public PriceDataBean getCalculatedContractPrice()
                                                 throws ECException
        Gets a PriceDataBean that represents the sum of the calculated contract prices for each of the bundle components .
        Returns:
        The PriceDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCalculatedPrice

        public PriceDataBean getCalculatedPrice()
                                         throws ECException
        Gets a PriceDataBean that represents the sum of the calculated prices for each of the bundle components.
        Specified by:
        getCalculatedPrice in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The PriceDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDescription

        public CatalogEntryDescriptionAccessBean getDescription()
        Gets a bean representing descriptive information about this bundle.
        Specified by:
        getDescription in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Overrides:
        getDescription in class BundleAccessBean
        Returns:
        The CatalogEntryDescriptionAccessBean.
      • getDisplayTaxes

        public CategorizedMonetaryAmountsDataBean getDisplayTaxes()
                                                           throws ECException
        Invokes the getTaxes method in PriceDataBean to calculate the taxes for those tax categories that are displayable at product display time.
        Specified by:
        getDisplayTaxes in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The CategorizedMonetaryAmountsDataBean containing the taxing monetary amounts, names and descriptions, and so on.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitAssociations

        public RelatedDynamicKitDataBean[] getDynamicKitAssociations()
                                                              throws ECException
        Gets a list of beans that represent dynamic kits that are merchandising associations for this bundle. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling the method getDynamicKitAssociations(). If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are dynamic kit up-sells for this bundle:

        setAssociationType("UPSELL");
        RelatedDynamicKitDataBean[] rb = getDynamicKitAssociations();

        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitAccessories

        public RelatedDynamicKitDataBean[] getDynamicKitAccessories()
                                                             throws ECException
        Gets a list of beans that represent dynamic kits that are accessories.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitCrossSells

        public RelatedDynamicKitDataBean[] getDynamicKitCrossSells()
                                                            throws ECException
        Gets the list of beans which represent dynamic kits that are cross-sells.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitUpSells

        public RelatedDynamicKitDataBean[] getDynamicKitUpSells()
                                                         throws ECException
        Gets the list of beans which represent dynamic kits that are up-sells.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getItemAssociations

        public RelatedItemDataBean[] getItemAssociations()
                                                  throws ECException
        Gets the list of beans which represent items that are merchandising associations for this bundle. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getItemAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are item up-sells for this bundle:

        setAssociationType("UPSELL");
        RelatedItemDataBean[] rb = getItemAssociations();

        Returns:
        The list of RelatedItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getItemAccessories

        public RelatedItemDataBean[] getItemAccessories()
                                                 throws ECException
        Gets the list of beans which represent items that are accessories to this bundle.
        Specified by:
        getItemAccessories in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getItemCrossSells

        public RelatedItemDataBean[] getItemCrossSells()
                                                throws ECException
        Gets the list of beans which represent items that are cross-sells to this bundle.
        Specified by:
        getItemCrossSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getItemUpSells

        public RelatedItemDataBean[] getItemUpSells()
                                             throws ECException
        Gets the list of beans which represent items that are up-sells to this bundle.
        Specified by:
        getItemUpSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getListPrice

        public PriceDataBean getListPrice()
                                   throws ECException
        Gets a bean that represents the sum of the list prices for each of the bundle components.
        Specified by:
        getListPrice in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The PriceDataBean.
        Throws:
        ECException
      • getObjectPath

        public java.lang.String getObjectPath()
                                       throws ECException
        Gets the path to objects such as images in the context of the current store.
        Returns:
        The path to objects in the current store
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageAssociations

        public RelatedPackageDataBean[] getPackageAssociations()
                                                        throws ECException
        Gets the list of beans which represent packages that are merchandising associations for this bundle. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getPackageAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of packages that are up-sells for this bundle:

        setAssociationType("UPSELL");
        RelatedPackageDataBean[] rp = getPackageAssociations();

        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageAccessories

        public RelatedPackageDataBean[] getPackageAccessories()
                                                       throws ECException
        Gets the list of beans which represent packages that are accessories to this bundle.
        Specified by:
        getPackageAccessories in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageCrossSells

        public RelatedPackageDataBean[] getPackageCrossSells()
                                                      throws ECException
        Gets the list of beans which represent packages that are cross-sells to this bundle.
        Specified by:
        getPackageCrossSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageUpSells

        public RelatedPackageDataBean[] getPackageUpSells()
                                                   throws ECException
        Gets the list of beans which represent packages that are up-sells to this bundle.
        Specified by:
        getPackageUpSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProductAssociations

        public RelatedProductDataBean[] getProductAssociations()
                                                        throws ECException
        Gets the list of beans which represent products that are merchandising associations for this bundle. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getProductAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are product up-sells for this bundle:

        setAssociationType("UPSELL");
        RelatedProductDataBean[] rb = getProductAssociations();

        Returns:
        The list of RelatedProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProductAccessories

        public RelatedProductDataBean[] getProductAccessories()
                                                       throws ECException
        Gets the list of beans which represent products that are accessories to this bundle.
        Specified by:
        getProductAccessories in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedProductDatabean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProductCrossSells

        public RelatedProductDataBean[] getProductCrossSells()
                                                      throws ECException
        Gets the list of beans which represent products that are cross-sells to this bundle.
        Specified by:
        getProductCrossSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedProductDatabean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProductUpSells

        public RelatedProductDataBean[] getProductUpSells()
                                                   throws ECException
        Gets the list of beans which represent products that are up-sells to this bundle.
        Specified by:
        getProductUpSells in interface com.ibm.commerce.catalog.beans.BundleSmartDataBean
        Returns:
        The list of RelatedProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • populate

        public void populate()
        Fetches and populates information needed by the bean.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        java.lang.Exception - An exception occurs during the execution of the method.
      • getBundleReplacements

        public RelatedBundleDataBean[] getBundleReplacements()
                                                      throws ECException
        Gets a list of beans that represent bundles that are replacement to this bundle.
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • setBundleID

        public void setBundleID(java.lang.String astrBundleId)
        Sets the bundle ID that represents the primary key for this bundle.
        Specified by:
        setBundleID in interface com.ibm.commerce.catalog.beans.BundleInputDataBean
        Parameters:
        astrBundleId - The bundle ID.
      • setAssociationType

        public void setAssociationType(java.lang.String type)
        Sets the variable istrAssociationType, which represents the target association type to be processed by an internal method called processCatalogEntryAssociation(). Call this method before the following methods to retrieve a list of specific merchandising association types: getBundleAssociations, getDynamicKitAssociations, getItemAssociations, getPackageAssociations, getProductAssociations. If type is null, all types of merchandising associations will return.
        Avoid calling this method multiple times. If this method is called multiple times, even with the same parameters, the same internal method will also be called multiple times, and may result in performance degradation.
        Parameters:
        type - The merchandising association type. Valid values are stored in the MASSOCTYPE.MASSOCTYPE_ID column, for example, "X-SELL".
      • setBundlePartNumber

        public void setBundlePartNumber(java.lang.String astrBundlePartNumber)
        Sets the bundle part (SKU) number.
        Specified by:
        setBundlePartNumber in interface com.ibm.commerce.catalog.beans.BundleInputDataBean
        Parameters:
        astrBundlePartNumber - The bundle part (SKU) number.
      • setCommandContext

        public void setCommandContext(CommandContext aCommandContext)
        Sets the command context passed in at run time.
        Specified by:
        setCommandContext in interface SmartDataBean
        Parameters:
        aCommandContext - The command context as CommandContext object.
      • setDescription

        public void setDescription(CatalogEntryDescriptionAccessBean aabDescription)
        Sets the descriptive AccessBean CatalogEntryDescriptionAccessBean about this bundle.
        Parameters:
        aabDescription - The CatalogEntryDescriptionAccessBean.
      • setAttachmentUsage

        public void setAttachmentUsage(java.lang.String astrAttachmentUsage)
        Sets the attachment relation usage identifier to get all the attachments of the bundle with the same usage.
        Parameters:
        astrAttachmentUsage - The attachment relation usage identifier
      • setRequestProperties

        public void setRequestProperties(TypedProperty aParam)
        Sets the request properties and populates the parameters that are needed by the bean. The following values are set in this method: bundle ID
        Specified by:
        setRequestProperties in interface InputDataBean
        Parameters:
        aParam - The request property as TypeProperty object.
      • isAdminMode

        public boolean isAdminMode()
        Is the databean used in the administrative mode. False is the default.
        Returns:
        True if it is running in administrative mode. False otherwise.
      • setAdminMode

        public void setAdminMode(boolean aboolAdminMode)
        Sets the administrative mode.
        Parameters:
        The - administrative mode to set: true or false.
      • getStandardPrice

        public PriceDataBean getStandardPrice()
        Gets a PriceDataBean that represents the standard contract price for the bundle.
        Returns:
        The PriceDataBean.
      • getAttributeDataBeans

        public AttributeDataBean[] getAttributeDataBeans()
        Gets a list of data beans that represent attributes of the product.
        Returns:
        The list of AttributeDataBean.
      • getDescriptiveAttributeDataBeans

        public AttributeDataBean[] getDescriptiveAttributeDataBeans()
        Gets a list of data beans that represent descriptive attributes of the product. If there are no descriptive attributes to return this method will return a zero length array.
        Returns:
        The list of AttributeDataBean.
      • isMerchandisingAssociated

        public boolean isMerchandisingAssociated()
        Determines whether there are any merchandising associations associated with this product
        Returns:
        true if there are merchandising associations associated with this product, false otherwise.
      • isAnyMerchandisingAssociated

        public boolean isAnyMerchandisingAssociated()
        Determines whether there are any OOB or custom merchandising associations associated with this catalog entry
        Returns:
        true if there are merchandising associations associated with this catalog entry, false otherwise.
      • getMinimumBundlePrice

        public PriceDataBean getMinimumBundlePrice()
        Gets the minimum bundle price.
        Returns:
        the com.ibm.commerce.price.beans.PriceDataBean with the minimum bundle price.
      • getMaximumBundlePrice

        public PriceDataBean getMaximumBundlePrice()
        Gets the maximum bundle price.
        Returns:
        the com.ibm.commerce.price.beans.PriceDataBean with the maximum bundle price.
      • isCalculatedContractPriced

        public boolean isCalculatedContractPriced()
        Determines whether the bundle has a calculated contract price.
        Returns:
        true if there is a calculated contract price, false otherwise
      • isListPriced

        public boolean isListPriced()
        Determines whether the bundle has a list price.
        Returns:
        true if there is a list price, false otherwise