com.ibm.commerce.tools.contract.beans

Class ProductSearchListDataBean

  • java.lang.Object
    • com.ibm.commerce.beans.InputDataBeanImpl
      • com.ibm.commerce.beans.SmartDataBeanImpl
        • com.ibm.commerce.tools.contract.beans.ProductSearchListDataBean
  • All Implemented Interfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, com.ibm.commerce.beans.SmartDataBean, java.io.Serializable


    public class ProductSearchListDataBean
    extends com.ibm.commerce.beans.SmartDataBeanImpl
    This data bean is used to get a list of ProductSearchDataBean. When finding Catalog Entries or Categories in a store, the data bean will be called. Store identifier is prerequisite parameter that need to be set before populate.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String buildCategoryExclusionQuery(java.lang.String contractId, java.lang.String catalogId)
      Builds the query to excluded the excluded categories
      java.lang.String buildProductExclusionQuery(java.lang.String contractId)
      Builds the query to excluded the excluded catentries
      static java.lang.String escapeSQLstring(java.lang.String result)
      Receives a string to be used in an SQL command and inserts any necessary escape characters.
      java.lang.String getCatalogEntryType()
      Gets the catalog entry type
      java.lang.String getCatalogID()
      Gets the store identifier
      ProductSearchDataBean[] getCatalogList()
      Gets the list of entries that were found
      ProductSearchDataBean getCatalogListData(int index)
      Gets a specific entry that was found
      java.lang.String getContractID()
      Gets the contract ID
      java.lang.String getDefaultLanguageID()
      Gets the language identifier for the language in which to search
      java.lang.String getExcludedProductSets(java.lang.String contractId)
      Finds the excluded product sets from the base contract
      java.lang.String getIndexBegin()
      Gets the beginning index into the search results
      java.lang.String getIndexEnd()
      Gets the end index into the search results
      java.lang.String getLanguageID()
      Gets the language identifier for the language in which to search
      int getListSize()
      Gets the size of the search results list
      java.lang.String getMemberID()
      Gets the member identifier
      java.lang.String getName()
      Gets the name of the item to search for
      java.lang.String getNameLike()
      Gets the type of name search
      java.lang.String getOrderBy()
      Gets the parameter to order the results by
      java.lang.String getPartNumber()
      Gets the SKU to search for
      java.lang.String getPartNumberLike()
      Gets the type of SKU search
      com.ibm.commerce.datatype.TypedProperty getRequestProperties()
      Gets the request properties
      int getResultSetSize()
      Gets the total number of entries found
      java.lang.String getShortDescription()
      Gets the short description to search for
      java.lang.String getShortDescriptionLike()
      Gets the type of short description search
      java.lang.String getStoreEntityIdWhereClause(java.lang.Integer storeId, java.lang.String prefix)
      Gets the where clause that includes the stores on the store path.
      java.lang.String getStoreID()
      Gets the store identifier
      static java.lang.String getUpperCaseFunction()
      Determines the DB-dependent upper case function by different database.
      void populate()
      This method is used to populate the Category or Catalog Entry data.
      void setCatalogEntryType(java.lang.String catEntType)
      Sets the type of catalog entry identifier search
      void setCatalogID(java.lang.String newCatalogID)
      Sets the catalog identifier
      void setCatalogList(java.util.Vector newCatalogList)
      Sets the list of results found
      void setContractID(java.lang.String newContractID)
      Sets the contract identifier
      void setIndexBegin(java.lang.String newIndexBegin)
      Sets the starting index of the result items
      void setIndexEnd(java.lang.String newIndexEnd)
      Sets the end index of the result items
      void setLanguageID(java.lang.String newLanguageID)
      Sets the language identifier in which to search
      void setMemberID(java.lang.String newMemberID)
      Sets the member identifier
      void setName(java.lang.String newName)
      Sets the name to search for
      void setNameLike(java.lang.String newNameLike)
      Sets the type of name search
      void setOrderBy(java.lang.String newOrderBy)
      Sets the parameter in which to sort by
      void setPartNumber(java.lang.String newPartNumber)
      Sets the SKU to search for
      void setPartNumberLike(java.lang.String newPartNumberLike)
      Sets the type of SKU search
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
      Sets the request properties
      void setResultSetSize(int newResultSetSize)
      Sets the total number of results
      void setSearchType(java.lang.String searchType)
      Sets the type of search to perform
      void setShortDescription(java.lang.String newShortDescription)
      Sets the short description to search for
      void setShortDescriptionLike(java.lang.String newShortDescriptionLike)
      Sets the type of short description search
      void setStoreID(java.lang.String newStoreID)
      Sets the store identifier
      • Methods inherited from class com.ibm.commerce.beans.SmartDataBeanImpl

        fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CATENTRY_TYPE_BUNDLE

        public static final java.lang.String CATENTRY_TYPE_BUNDLE
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_DYNAMIC_KIT

        public static final java.lang.String CATENTRY_TYPE_DYNAMIC_KIT
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_ITEM

        public static final java.lang.String CATENTRY_TYPE_ITEM
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_PACKAGE

        public static final java.lang.String CATENTRY_TYPE_PACKAGE
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_PRODUCT

        public static final java.lang.String CATENTRY_TYPE_PRODUCT
        Catentry type constants
        See Also:
        Constant Field Values
      • ORDER_BY_CATEGORY_IDENTIFIER

        public static final java.lang.String ORDER_BY_CATEGORY_IDENTIFIER
        Order by constants
        See Also:
        Constant Field Values
      • ORDER_BY_CATEGORY_NAME

        public static final java.lang.String ORDER_BY_CATEGORY_NAME
        Order by constants
        See Also:
        Constant Field Values
      • ORDER_BY_CATEGORY_SHORTDESCRIPTION

        public static final java.lang.String ORDER_BY_CATEGORY_SHORTDESCRIPTION
        Order by constants
        See Also:
        Constant Field Values
      • ORDER_BY_PRODUCT_CODE

        public static final java.lang.String ORDER_BY_PRODUCT_CODE
        Order by constants
        See Also:
        Constant Field Values
      • ORDER_BY_PRODUCT_NAME

        public static final java.lang.String ORDER_BY_PRODUCT_NAME
        Order by constants
        See Also:
        Constant Field Values
      • ORDER_BY_SHORTDESCRIPTION

        public static final java.lang.String ORDER_BY_SHORTDESCRIPTION
        Order by constants
        See Also:
        Constant Field Values
      • TYPE_LIKE_CASE_SENSITIVE

        public static final java.lang.String TYPE_LIKE_CASE_SENSITIVE
        Pattern match type constants
        See Also:
        Constant Field Values
      • TYPE_LIKE_IGNORE_CASE

        public static final java.lang.String TYPE_LIKE_IGNORE_CASE
        Pattern match type constants
        See Also:
        Constant Field Values
      • TYPE_MATCH_CASE_SENSITIVE

        public static final java.lang.String TYPE_MATCH_CASE_SENSITIVE
        Pattern match type constants
        See Also:
        Constant Field Values
      • TYPE_MATCH_IGNORE_CASE

        public static final java.lang.String TYPE_MATCH_IGNORE_CASE
        Pattern match type constants
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProductSearchListDataBean

        public ProductSearchListDataBean()
        Creates a ProductSearchListDataBean
    • Method Detail

      • buildCategoryExclusionQuery

        public java.lang.String buildCategoryExclusionQuery(java.lang.String contractId,
                                                            java.lang.String catalogId)
        Builds the query to excluded the excluded categories
        Parameters:
        contractId - java.lang.String
        catalogId - java.lang.String
        Returns:
        String
      • buildProductExclusionQuery

        public java.lang.String buildProductExclusionQuery(java.lang.String contractId)
        Builds the query to excluded the excluded catentries
        Parameters:
        contractId - java.lang.String
        Returns:
        String
      • escapeSQLstring

        public static java.lang.String escapeSQLstring(java.lang.String result)
        Receives a string to be used in an SQL command and inserts any necessary escape characters.

        Behaviour:

        \ is inserted before % _ ' and \
        Parameters:
        result - The string to be formatted for SQL.
        Returns:
        The formatted string.
      • getCatalogEntryType

        public java.lang.String getCatalogEntryType()
        Gets the catalog entry type
        Returns:
        java.lang.String
      • getCatalogID

        public java.lang.String getCatalogID()
        Gets the store identifier
        Returns:
        java.lang.String
      • getCatalogList

        public ProductSearchDataBean[] getCatalogList()
        Gets the list of entries that were found
        Returns:
        ProductSearchDataBean[]
      • getCatalogListData

        public ProductSearchDataBean getCatalogListData(int index)
                                                 throws java.lang.ArrayIndexOutOfBoundsException
        Gets a specific entry that was found
        Parameters:
        index - int
        Returns:
        ProductSearchDataBean
        Throws:
        java.lang.ArrayIndexOutOfBoundsException
      • getContractID

        public java.lang.String getContractID()
        Gets the contract ID
        Returns:
        java.lang.String
      • getDefaultLanguageID

        public java.lang.String getDefaultLanguageID()
                                              throws java.lang.Exception
        Gets the language identifier for the language in which to search
        Returns:
        java.lang.String
        Throws:
        java.lang.Exception
      • getExcludedProductSets

        public java.lang.String getExcludedProductSets(java.lang.String contractId)
        Finds the excluded product sets from the base contract
        Parameters:
        contractId - java.lang.String
        Returns:
        String
      • getIndexBegin

        public java.lang.String getIndexBegin()
        Gets the beginning index into the search results
        Returns:
        java.lang.String
      • getIndexEnd

        public java.lang.String getIndexEnd()
        Gets the end index into the search results
        Returns:
        java.lang.String
      • getLanguageID

        public java.lang.String getLanguageID()
                                       throws java.lang.Exception
        Gets the language identifier for the language in which to search
        Returns:
        java.lang.String
        Throws:
        java.lang.Exception
      • getListSize

        public int getListSize()
        Gets the size of the search results list
        Returns:
        int
      • getMemberID

        public java.lang.String getMemberID()
        Gets the member identifier
        Returns:
        java.lang.String
      • getName

        public java.lang.String getName()
        Gets the name of the item to search for
        Returns:
        java.lang.String
      • getNameLike

        public java.lang.String getNameLike()
        Gets the type of name search
        Returns:
        java.lang.String
      • getOrderBy

        public java.lang.String getOrderBy()
        Gets the parameter to order the results by
        Returns:
        String
      • getPartNumber

        public java.lang.String getPartNumber()
        Gets the SKU to search for
        Returns:
        java.lang.String
      • getPartNumberLike

        public java.lang.String getPartNumberLike()
        Gets the type of SKU search
        Returns:
        java.lang.String
      • getRequestProperties

        public com.ibm.commerce.datatype.TypedProperty getRequestProperties()
        Gets the request properties
        Specified by:
        getRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Overrides:
        getRequestProperties in class com.ibm.commerce.beans.InputDataBeanImpl
        Returns:
        com.ibm.commerce.datatype.TypedProperty
      • getResultSetSize

        public int getResultSetSize()
        Gets the total number of entries found
        Returns:
        int
      • getShortDescription

        public java.lang.String getShortDescription()
        Gets the short description to search for
        Returns:
        java.lang.String
      • getShortDescriptionLike

        public java.lang.String getShortDescriptionLike()
        Gets the type of short description search
        Returns:
        java.lang.String
      • getStoreEntityIdWhereClause

        public java.lang.String getStoreEntityIdWhereClause(java.lang.Integer storeId,
                                                            java.lang.String prefix)
        Gets the where clause that includes the stores on the store path.
        Parameters:
        storeId - java.lang.Integer
        prefix - java.lang.String
        Returns:
        java.lang.String
      • getStoreID

        public java.lang.String getStoreID()
        Gets the store identifier
        Returns:
        java.lang.String
      • getUpperCaseFunction

        public static final java.lang.String getUpperCaseFunction()
        Determines the DB-dependent upper case function by different database. DB2, return "UCASE"; Oracle, return "UPPER"; others, return "UCASE". Creation date: (6/14/00 2:29:12 PM)
        Returns:
        java.lang.String
      • populate

        public void populate()
        This method is used to populate the Category or Catalog Entry data. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Overrides:
        populate in class com.ibm.commerce.beans.SmartDataBeanImpl
      • setCatalogEntryType

        public void setCatalogEntryType(java.lang.String catEntType)
        Sets the type of catalog entry identifier search
        Parameters:
        catEntType - java.lang.String
      • setCatalogID

        public void setCatalogID(java.lang.String newCatalogID)
        Sets the catalog identifier
        Parameters:
        newCatalogID - java.lang.String
      • setCatalogList

        public void setCatalogList(java.util.Vector newCatalogList)
        Sets the list of results found
        Parameters:
        newCatalogList - java.util.Vector
      • setContractID

        public void setContractID(java.lang.String newContractID)
        Sets the contract identifier
        Parameters:
        newContractID - java.lang.String
      • setIndexBegin

        public void setIndexBegin(java.lang.String newIndexBegin)
        Sets the starting index of the result items
        Parameters:
        newIndexBegin - java.lang.String
      • setIndexEnd

        public void setIndexEnd(java.lang.String newIndexEnd)
        Sets the end index of the result items
        Parameters:
        newIndexEnd - java.lang.String
      • setLanguageID

        public void setLanguageID(java.lang.String newLanguageID)
        Sets the language identifier in which to search
        Parameters:
        newLanguageID - java.lang.String
      • setMemberID

        public void setMemberID(java.lang.String newMemberID)
        Sets the member identifier
        Parameters:
        newMemberID - java.lang.String
      • setName

        public void setName(java.lang.String newName)
        Sets the name to search for
        Parameters:
        newName - java.lang.String
      • setNameLike

        public void setNameLike(java.lang.String newNameLike)
        Sets the type of name search
        Parameters:
        newNameLike - java.lang.String
      • setOrderBy

        public void setOrderBy(java.lang.String newOrderBy)
        Sets the parameter in which to sort by
        Parameters:
        newOrderBy - java.lang.String
      • setPartNumber

        public void setPartNumber(java.lang.String newPartNumber)
        Sets the SKU to search for
        Parameters:
        newPartNumber - java.lang.String
      • setPartNumberLike

        public void setPartNumberLike(java.lang.String newPartNumberLike)
        Sets the type of SKU search
        Parameters:
        newPartNumberLike - java.lang.String
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
        Sets the request properties
        Specified by:
        setRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Overrides:
        setRequestProperties in class com.ibm.commerce.beans.InputDataBeanImpl
        Parameters:
        param - com.ibm.commerce.datatype.TypedProperty
      • setResultSetSize

        public void setResultSetSize(int newResultSetSize)
        Sets the total number of results
        Parameters:
        newResultSetSize - int
      • setSearchType

        public void setSearchType(java.lang.String searchType)
        Sets the type of search to perform
        Parameters:
        searchType - String
      • setShortDescription

        public void setShortDescription(java.lang.String newShortDescription)
        Sets the short description to search for
        Parameters:
        newShortDescription - java.lang.String
      • setShortDescriptionLike

        public void setShortDescriptionLike(java.lang.String newShortDescriptionLike)
        Sets the type of short description search
        Parameters:
        newShortDescriptionLike - java.lang.String
      • setStoreID

        public void setStoreID(java.lang.String newStoreID)
        Sets the store identifier
        Parameters:
        newStoreID - java.lang.String