com.ibm.commerce.catalog.beans

Class PackageDataBean

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


    public class PackageDataBean
    extends PackageAccessBean
    implements com.ibm.commerce.catalog.beans.PackageSmartDataBean, com.ibm.commerce.catalog.beans.PackageInputDataBean
    This data bean represents a Package.

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

    Access Beans: Package

    Mandatory Parameters (for single row retrieval):

    • package ID

    Some hints and tips for using this data bean are:

    • It is important to set the package ID value before activating the data bean
    • You can set parameters using the constructor, or the 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

      • PackageDataBean

        public PackageDataBean()
        Constructs an empty PackageDataBean.
      • PackageDataBean

        public PackageDataBean(CatalogEntryAccessBean abCatentry)
        Constructs a PackageDataBean from a CatalogEntryAccessBean.
        Parameters:
        abCatentry - The CatalogEntryAccessBean.
      • PackageDataBean

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

      • getAttributes

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

        public AttachmentDataBean[] getAllAttachments()
        Gets all the attachments in the pre-built kit.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentsByUsage

        public AttachmentDataBean[] getAttachmentsByUsage()
        Get all the pre-built kit attachments by the specified attachment relation usage.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentUsages

        public AttachmentUsageDataBean[] getAttachmentUsages()
        Get all the attachment relation usage used in the pre-built kit attachments
        Returns:
        An array of AttachmentUsageDataBean
      • getDescriptiveAttributes

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

        public java.lang.Long[] getApplicableContractIds()
                                                  throws ECException
        Gets a list of applicable contracts for calculating the prices.
        Specified by:
        getApplicableContractIds in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The list of contract IDs.
        Throws:
        ECException - An exception occurs during the execution of the method. An exception occurs during the execution of the method.
      • getApplicableContractPrices

        public PriceDataBean[] getApplicableContractPrices()
        Gets a list of price of the applicable contracts for calculating the prices.
        Specified by:
        getApplicableContractPrices in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The list of PriceDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundleAccessories

        public RelatedBundleDataBean[] getBundleAccessories()
                                                     throws ECException
        Gets a list of beans that represent bundles that are accessories to this package.
        Specified by:
        getBundleAccessories in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundleAssociations

        public RelatedBundleDataBean[] getBundleAssociations()
                                                      throws ECException
        Gets a list of beans that represent bundles that are merchandising associations for this package. 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 package:

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

        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 that represent bundles that are cross-sells to this package.
        Specified by:
        getBundleCrossSells in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getBundleUpSells

        public RelatedBundleDataBean[] getBundleUpSells()
                                                 throws ECException
        Gets a list of beans that represent bundles that are up-sells to this package.
        Specified by:
        getBundleUpSells in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        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 the calculated contract price for the package.
        Specified by:
        getCalculatedContractPrice in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        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 the calculated price for the package.
        Specified by:
        getCalculatedPrice in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The PriceDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCommandContext

        public CommandContext getCommandContext()
        Gets the current command's context passed in at run time.
        Specified by:
        getCommandContext in interface SmartDataBean
        Returns:
        The command context as CommandContext object.
      • getDescription

        public CatalogEntryDescriptionAccessBean getDescription()
        Gets a bean representing descriptive information about this package.
        Specified by:
        getDescription in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Overrides:
        getDescription in class PackageAccessBean
        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.PackageSmartDataBean
        Returns:
        The CategorizedMonetaryAmountsDataBean containing the taxing monetary amounts, names and descriptions.
        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.
      • getDynamicKitAssociations

        public RelatedDynamicKitDataBean[] getDynamicKitAssociations()
                                                              throws ECException
        Gets a list of beans that represent dynamic kits that are merchandising associations for this package. 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 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 package:

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

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

        public RelatedDynamicKitDataBean[] getDynamicKitCrossSells()
                                                            throws ECException
        Gets a list of beans that 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 a list of beans that represent dynamic kits that are up-sells.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getItemAccessories

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

        public RelatedItemDataBean[] getItemAssociations()
                                                  throws ECException
        Gets a list of beans that represent items that are merchandising associations for this package. 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 package:

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

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

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

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

        public PriceDataBean getListPrice()
                                   throws ECException
        Gets a bean that represents the list price for the package.
        Specified by:
        getListPrice in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The PriceDataBean.
        Throws:
        ECException - Any ECException captured
      • 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.
      • getPackageAccessories

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

        public RelatedPackageDataBean[] getPackageAssociations()
                                                        throws ECException
        Gets a list of beans that represent packages that are merchandising associations for this package. 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 beans that are package up-sells for this package:

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

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

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

        public CompositeItemDataBean[] getPackagedItems()
                                                 throws ECException
        Gets a list of beans that represent items that are components of this package.
        Specified by:
        getPackagedItems in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The list of CompositeItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackagedProducts

        public CompositeProductDataBean[] getPackagedProducts()
                                                       throws ECException
        Gets a list of beans that represent products that are components of this package.
        Specified by:
        getPackagedProducts in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The list of CompositeProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackagedPackages

        public CompositePackageDataBean[] getPackagedPackages()
                                                       throws ECException
        Gets a list of beans that represent packages that are components of this package.
        Returns:
        The list of CompositePackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageID

        public java.lang.String getPackageID()
        Gets the package ID that represents the primary key for this package.
        Specified by:
        getPackageID in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        Returns:
        The package ID.
      • getPackagePartNumber

        public java.lang.String getPackagePartNumber()
        Gets the part (SKU) number of the package.
        Returns:
        The part (SKU) code.
      • getPackageUpSells

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

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

        public RelatedProductDataBean[] getProductAssociations()
                                                        throws ECException
        Gets a list of beans that represent products that are merchandising associations for this package. 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 package:

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

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

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

        public RelatedProductDataBean[] getProductUpSells()
                                                   throws ECException
        Gets a list of beans that represent products that are up-sells to this package.
        Specified by:
        getProductUpSells in interface com.ibm.commerce.catalog.beans.PackageSmartDataBean
        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.
      • getPackageReplacements

        public RelatedPackageDataBean[] getPackageReplacements()
                                                        throws ECException
        Gets a list of beans that represent packages that are replacementss to this package.
        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • setCommandContext

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

        public void setDescription(CatalogEntryDescriptionAccessBean aabDescription)
        Sets the descriptive information about this package.
        Parameters:
        aabDescription - The description to be set as a CatalogEntryDescriptionAccessBean object.
      • setPackageID

        public void setPackageID(java.lang.String astrPackageId)
        Sets the package ID that represents the primary key for this package.
        Parameters:
        astrPackageId - The package 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".
      • setAttachmentUsage

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

        public void setPackagePartNumber(java.lang.String astrPackagePartNumber)
        Sets the package part (SKU) number.
        Specified by:
        setPackagePartNumber in interface com.ibm.commerce.catalog.beans.PackageInputDataBean
        Parameters:
        astrPackagePartNumber - The part (SKU) number of the package.
      • setRequestProperties

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

        public boolean isAdminMode()
        Gets if the bean is running in administrative mode. false is the default.
        Returns:
        true if the bean is running in administrative mode; false otherwise.
      • setAdminMode

        public void setAdminMode(boolean aboolAdminMode)
        Sets the administrative mode flag of the bean.
        Parameters:
        iboolAdminMode - true to have the bean in administrative mode; false otherwise.
      • getStandardPrice

        public PriceDataBean getStandardPrice()
        Gets a PriceDataBean that represents the standard contract price for the item.
        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.
        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.
      • isCalculatedContractPriced

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

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

        public int getNumberOfApplicableContractIds()
                                             throws ECException
        Gets the number of applicable contract IDs for calculating the prices.
        Returns:
        The number of contract IDs.
        Throws:
        ECException - An exception occurs during the execution of the method. An exception occurs during the execution of the method.
      • isCheckNumberOfApplicableContractIds

        public boolean isCheckNumberOfApplicableContractIds()
        Determines whether the package has any applicable contract ids
        Returns:
        true if there is one or more applicable contract id
      • getApplicableContracts

        public ContractDataBean[] getApplicableContracts()
        Gets a list of ContractDataBean that represents applicable contracts for the package.
        Returns:
        The ContractDataBean[].
      • getApplicableContractPriceRanges

        public com.ibm.commerce.catalog.util.RangePricingData[] getApplicableContractPriceRanges()
                                                                                          throws ECException
        Retrieve the tiered pricing information for the current package in all the applicable contracts.
        Returns:
        The array of RangePricingData that contains the tiered pricing data for each of the contracts applicable to this package.
        Throws:
        ECException - An exception occurs during the execution of the method.