com.ibm.commerce.store.beans

Class StoreLocatorDataBean

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


    public class StoreLocatorDataBean
    extends com.ibm.commerce.beans.SmartDataBeanImpl
    This bean locates hosted stores based on input search criteria. The search criteria may be set from the JSP. Criteria that may be used are:
      Common parameters:
    1. beginIndex (String): This variable is used for paging the result set. The value must be the index of the first result row in a page.
    2. mode (String): This variable is used to define the type of search desired. Value of '0' means search by products, value of '1' means search by store category.
    3. pageSize (String): This variable is used for paging the result set. The value is the maximum number of rows to be displayed per page.
    4. searchStores (String): This variable is used to determine the stores that need to be searched. A aalue of '0' means search all stores regardless of state. A value of '1' means stores only stores that are in open state. And a value of '2' means search stores in opened or closed state.

      Store Category search mode parameters:
    1. storeCategoryId (String): This variable must be provided when searching by store category. Value 'All' means stores in any store category.

      Product search mode parameters:
    1. categoryType (String) : A user can specify three types of search criteria All, Any, Exact Phrase. The value in this variable is used to store a user's search criteria. The value must be 'ALL'(for All search criteria), 'ANY'(for Any search criteria) and 'EXACT'(for Exact phrase criteria).
    2. categoryTerm (String): The value of this variable is used in search on category name and/or descriptions (table columns searched: Catgrpdesc.name, Catgrpdesc.Shortdescription, Catgrpdesc.Longdescription).
    3. categoryTermScope (Integer) : A user can restrict the scope (of 'search term'/ 'filter term' search) to name; name and short description; or name, short description and long description. The value in this variable is used to store a user's choice. The value must be 1 (for name and short description), or 2 (for name only), or 3 (for name, short description and long description).
    4. isBundle (boolean): Set this to false if bundle ids must be returned, by default it is false.
    5. isItem (boolean): Set this to false if item ids must be returned, by default it is false.
    6. isPackage (boolean): Set this to true if package ids must be returned, by default it is false.
    7. isProduct (boolean): Set this to true if product ids must be returned, by default it is false.
    8. searchType (String) : A user can specify three types of search criteria: All, Any, Exact Phrase. The value in this variable is used to store a user's search criteria. The value must be 'ALL'(for All search criteria), 'ANY'(for Any search criteria) and 'EXACT'(for Exact phrase criteria).
    9. searchTerm (String) : The value of this variable is used in search on a word (table columns searched: Catentdesc.name, Catentdesc.Shortdescription, Catentdesc.Longdescription).
    10. searchTermScope (Integer) :A user can restrict the scope of the 'search term' to search for name only, name and short description, or name, short description and long description, or just keyword. The value in this variable is used to store a user's choice. The value must be either 1 (for name and short description), or 2 (for name only), or 3 (for name, short description and long description), or 4 (for keyword).
    11. sku(String) : The value of this variable is used to search on SKU (table columns searched: Catentry.Sku).
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ALL_CATEGORIES
      Search stores in any store category.
      static java.lang.String ALL_STORES
      All stores.
      static java.lang.String CATALOG_RESOURCE
      Catalog store relationship type.
      static java.lang.String CHANNEL_RESOURCE
      Channel store relationship type.
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String EQUAL
      Equal.
      static java.lang.String MAX_SEARCH
      The maximum number of matches from the product search bean.
      static java.lang.String MODE
      The search mode parameter name.
      static java.lang.String OPEN_STORES
      Only stores with open state.
      static java.lang.String OPENCLOSE_STORES
      Stores with open and closed state.
      static java.lang.String SEARCH_BY_PRODUCT
      Locate stores by products.
      static java.lang.String SEARCH_BY_STCATEGORY
      Locate stores by store category.
      static java.lang.String SEARCH_STORES
      The stores to search parameter name.
      static java.lang.String STORECATEGORYID
      The store category id parameter name.
      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Constructor Summary

      Constructors 
      Constructor and Description
      StoreLocatorDataBean()
      This method creates a new StoreLocatorDataBean by calling the super constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCategoryTerm()
      This method gets the category term to find.
      java.lang.String getCategoryTermScope()
      This method gets the category term scope to be used.
      java.lang.String getCategoryType()
      This method gets the category type criteria for this search.
      boolean getIsBundle()
      This method gets the value of the isBundle parameter.
      boolean getIsItem()
      This method gets the value of the isItem parameter.
      boolean getIsPackage()
      This method gets the value of the isPackage parameter.
      boolean getIsProduct()
      This method gets the value of the isProduct parameter.
      java.lang.String getMode()
      This method gets the search mode which describes the type of search desired.
      int getQuerySize()
      This method gets the size of the entire query.
      java.util.Vector getResultSet()
      This method gets the entire result set of the query.
      java.util.Vector getResultSubset()
      This method gets the subset that the page needs for display.
      java.lang.String getSearchStores()
      This method gets the search stores parameter value.
      java.lang.String getSearchTerm()
      This method gets the search term to find.
      java.lang.String getSearchTermScope()
      This method gets the search term scope to be used.
      java.lang.String getSearchType()
      This method gets the search type criteria for this search.
      java.lang.String getSku()
      This method gets the sku value to find.
      java.lang.String getStoreCategoryId()
      This method gets the store category id to search for.
      void populate()
      Loads data into the data bean when the DataBeanManager.activate() executes.
      void setBeginIndex(int inBeginIndex)
      This method sets the index of the first item to be returned.
      void setCategoryTerm(java.lang.String categoryTerm)
      This method sets the category term to find.
      void setCategoryTermScope(java.lang.String categoryTermScope)
      This method sets the category term scope to be used.
      void setCategoryType(java.lang.String categoryType)
      This method sets the category type criteria for this search.
      void setIsBundle(boolean isBundle)
      This method sets the value of the isBundle parameter.
      void setIsItem(boolean isItem)
      This method sets the value of the isItem parameter.
      void setIsPackage(boolean isPackage)
      This method sets the value of the isPackage parameter.
      void setIsProduct(boolean isProduct)
      This method sets the value of the isProduct parameter.
      void setMode(java.lang.String inMode)
      This method sets the search mode which describes the type of search desired.
      void setPageSize(int inPageSize)
      This method sets the maximum number of rows that the page can display.
      void setSearchStores(java.lang.String inSearchStores)
      This method sets the search stores parameter value
      void setSearchTerm(java.lang.String searchTerm)
      This method sets the search term to find.
      void setSearchTermScope(java.lang.String searchTermScope)
      This method sets the search term scope to be used.
      void setSearchType(java.lang.String searchType)
      This method sets the search type criteria for this search.
      void setSku(java.lang.String sku)
      This method sets the sku to find.
      void setStoreCategoryId(java.lang.String inStoreCategoryId)
      This method sets the store category to find.
      • Methods inherited from class com.ibm.commerce.beans.SmartDataBeanImpl

        fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
      • Methods inherited from class com.ibm.commerce.beans.InputDataBeanImpl

        getRequestProperties, setRequestProperties
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.beans.InputDataBean

        getRequestProperties, setRequestProperties
    • Field Detail

      • ALL_CATEGORIES

        public static final java.lang.String ALL_CATEGORIES
        Search stores in any store category.
        See Also:
        Constant Field Values
      • ALL_STORES

        public static final java.lang.String ALL_STORES
        All stores.
        See Also:
        Constant Field Values
      • CATALOG_RESOURCE

        public static final java.lang.String CATALOG_RESOURCE
        Catalog store relationship type.
        See Also:
        Constant Field Values
      • CHANNEL_RESOURCE

        public static final java.lang.String CHANNEL_RESOURCE
        Channel store relationship type.
        See Also:
        Constant Field Values
      • COPYRIGHT

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

        public static final java.lang.String MAX_SEARCH
        The maximum number of matches from the product search bean.
        See Also:
        Constant Field Values
      • MODE

        public static final java.lang.String MODE
        The search mode parameter name.
        See Also:
        Constant Field Values
      • OPEN_STORES

        public static final java.lang.String OPEN_STORES
        Only stores with open state.
        See Also:
        Constant Field Values
      • OPENCLOSE_STORES

        public static final java.lang.String OPENCLOSE_STORES
        Stores with open and closed state.
        See Also:
        Constant Field Values
      • SEARCH_BY_PRODUCT

        public static final java.lang.String SEARCH_BY_PRODUCT
        Locate stores by products.
        See Also:
        Constant Field Values
      • SEARCH_BY_STCATEGORY

        public static final java.lang.String SEARCH_BY_STCATEGORY
        Locate stores by store category.
        See Also:
        Constant Field Values
      • SEARCH_STORES

        public static final java.lang.String SEARCH_STORES
        The stores to search parameter name.
        See Also:
        Constant Field Values
      • STORECATEGORYID

        public static final java.lang.String STORECATEGORYID
        The store category id parameter name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StoreLocatorDataBean

        public StoreLocatorDataBean()
        This method creates a new StoreLocatorDataBean by calling the super constructor.
    • Method Detail

      • getCategoryTerm

        public java.lang.String getCategoryTerm()
        This method gets the category term to find.
        Returns:
        Returns the category term
      • getCategoryTermScope

        public java.lang.String getCategoryTermScope()
        This method gets the category term scope to be used. Category term scope is used to determine if the search is performed against name, or name and desctiption, or name, short and long description, or just keywords.
        Returns:
        Returns the category term scope to use
      • getCategoryType

        public java.lang.String getCategoryType()
        This method gets the category type criteria for this search. A user can specify three types of search criteria: all, any, or exact phrase.
        Returns:
        Returns the category type criteria
      • getIsBundle

        public boolean getIsBundle()
        This method gets the value of the isBundle parameter.
        Returns:
        Returns true if want to search for bundles, false otherwise
      • getIsItem

        public boolean getIsItem()
        This method gets the value of the isItem parameter.
        Returns:
        Returns true if want to search for items, false otherwise
      • getIsPackage

        public boolean getIsPackage()
        This method gets the value of the isPackage parameter.
        Returns:
        Returns true if want to search for packages, false otherwise
      • getIsProduct

        public boolean getIsProduct()
        This method gets the value of the isProduct parameter.
        Returns:
        Returns true if want to search for products, false otherwise
      • getMode

        public java.lang.String getMode()
        This method gets the search mode which describes the type of search desired. Value of '0' means search by products, value of '1' means search by store category.
        Returns:
        The search mode which describes the type of search desired.
      • getQuerySize

        public int getQuerySize()
        This method gets the size of the entire query.
        Returns:
        The size of the entire query.
      • getResultSet

        public java.util.Vector getResultSet()
        This method gets the entire result set of the query. For product search mode, the result is a vector of vectors of [catentryId(String) storeId(String)]. For store category search mode, the result is a vector of vectors of [StoreAccessBean storeCategoryId(String)].
        Returns:
        The entire result set of the query.
      • getResultSubset

        public java.util.Vector getResultSubset()
        This method gets the subset that the page needs for display. Based on beginIndex and pageSize parameters.
        Returns:
        The subset that the page needs for display.
      • getSearchStores

        public java.lang.String getSearchStores()
        This method gets the search stores parameter value.
        Returns:
        The search stores parameter value.
      • getSearchTerm

        public java.lang.String getSearchTerm()
        This method gets the search term to find.
        Returns:
        Returns the search term
      • getSearchTermScope

        public java.lang.String getSearchTermScope()
        This method gets the search term scope to be used. Search term scope is used to determine if the search is performed against name, or name and desctiption, or name, short and long description, or just keywords.
        Returns:
        Returns the search term scope to use
      • getSearchType

        public java.lang.String getSearchType()
        This method gets the search type criteria for this search. A user can specify three types of search criteria: all, any, or exact phrase.
        Returns:
        Returns the search type criteria
      • getSku

        public java.lang.String getSku()
        This method gets the sku value to find.
        Returns:
        Returns the sku value
      • getStoreCategoryId

        public java.lang.String getStoreCategoryId()
        This method gets the store category id to search for.
        Returns:
        The store category id to search for.
      • populate

        public void populate()
                      throws java.lang.Exception
        Loads data into the data bean when the DataBeanManager.activate() executes. The main logic of the data bean is in this method. The resulting objects will be determined by executing the search queries depending on the parameters that are set in the bean.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Overrides:
        populate in class com.ibm.commerce.beans.SmartDataBeanImpl
        Throws:
        java.lang.Exception
      • setBeginIndex

        public void setBeginIndex(int inBeginIndex)
        This method sets the index of the first item to be returned.
        Parameters:
        inBeginIndex - The index of the first item that needs to be returned
      • setCategoryTerm

        public void setCategoryTerm(java.lang.String categoryTerm)
        This method sets the category term to find.
        Parameters:
        categoryTerm - The category term to use
      • setCategoryTermScope

        public void setCategoryTermScope(java.lang.String categoryTermScope)
        This method sets the category term scope to be used. Category term scope is used to determine if the search is performed against name, or name and desctiption, or name, short and long description, or just keywords.
        Parameters:
        categoryTermScope - The category term scope to use
      • setCategoryType

        public void setCategoryType(java.lang.String categoryType)
        This method sets the category type criteria for this search. A user can specify three types of search criteria: all, any, or exact phrase.
        Parameters:
        searchType - The category type criteria
      • setIsBundle

        public void setIsBundle(boolean isBundle)
        This method sets the value of the isBundle parameter.
        Parameters:
        isBundle - Set the parameter to true to search for bundles, false otherwise.
      • setIsItem

        public void setIsItem(boolean isItem)
        This method sets the value of the isItem parameter.
        Parameters:
        isItem - Set the parameter to true to search for items, false otherwise.
      • setIsPackage

        public void setIsPackage(boolean isPackage)
        This method sets the value of the isPackage parameter.
        Parameters:
        isPackage - Set the parameter to true to search for packages, false otherwise.
      • setIsProduct

        public void setIsProduct(boolean isProduct)
        This method sets the value of the isProduct parameter.
        Parameters:
        isProduct - Set the parameter to true to search for products, false otherwise.
      • setMode

        public void setMode(java.lang.String inMode)
        This method sets the search mode which describes the type of search desired. Value of '0' means search by products, value of '1' means search by store category.
        Parameters:
        inMode - The search mode which describes the type of search desired.
      • setPageSize

        public void setPageSize(int inPageSize)
        This method sets the maximum number of rows that the page can display.
        Parameters:
        newMaxListSize - The maximum number of rows that the page can display
      • setSearchStores

        public void setSearchStores(java.lang.String inSearchStores)
        This method sets the search stores parameter value
        Parameters:
        inSearchStores - The search stores parameter value
      • setSearchTerm

        public void setSearchTerm(java.lang.String searchTerm)
        This method sets the search term to find.
        Parameters:
        searchTerm - The search term to use
      • setSearchTermScope

        public void setSearchTermScope(java.lang.String searchTermScope)
        This method sets the search term scope to be used. Search term scope is used to determine if the search is performed against name, or name and desctiption, or name, short and long description, or just keywords.
        Parameters:
        searchTermScope - The search term scope to use
      • setSearchType

        public void setSearchType(java.lang.String searchType)
        This method sets the search type criteria for this search. A user can specify three types of search criteria: all, any, or exact phrase.
        Parameters:
        searchType - The search type criteria
      • setSku

        public void setSku(java.lang.String sku)
        This method sets the sku to find.
        Parameters:
        sku - The sku value
      • setStoreCategoryId

        public void setStoreCategoryId(java.lang.String inStoreCategoryId)
        This method sets the store category to find.
        Parameters:
        inSearchStores - The store category to find