Class ParametricSearch


  • public class ParametricSearch
    extends java.lang.Object
    Utilities for parametric search based on features.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.util.List<GenericValue>> getAllFeaturesByType​(Delegator delegator)  
      static java.util.Map<java.lang.String,​java.util.List<GenericValue>> getAllFeaturesByType​(Delegator delegator, int perTypeMaxSize)  
      static java.util.Map<java.lang.String,​java.util.List<GenericValue>> makeCategoryFeatureLists​(java.lang.String productCategoryId, Delegator delegator)
      Gets all features associated with the specified category through:
      ProductCategory -> ProductFeatureCategoryAppl -> ProductFeatureCategory -> ProductFeature.
      static java.util.Map<java.lang.String,​java.util.List<GenericValue>> makeCategoryFeatureLists​(java.lang.String productCategoryId, Delegator delegator, int perTypeMaxSize)  
      static java.util.Map<java.lang.String,​java.lang.String> makeFeatureIdByTypeMap​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Handles parameters coming in prefixed with "pft_" where the text in the key following the prefix is a productFeatureTypeId and the value is a productFeatureId; meant to be used with drop-downs and such
      static java.util.Map<java.lang.String,​java.lang.String> makeFeatureIdByTypeMap​(ServletRequest request)  
      static java.lang.String makeFeatureIdByTypeString​(java.util.Map<java.lang.String,​java.lang.String> featureIdByType)  
      static java.util.List<java.lang.String> makeFeatureIdListFromPrefixed​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Handles parameters coming in prefixed with "SEARCH_FEAT" where the parameter value is a productFeatureId; meant to be used with text entry boxes or check-boxes and such
      static java.util.List<java.lang.String> makeProductFeatureCategoryIdListFromPrefixed​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Handles parameters coming in prefixed with "SEARCH_PROD_FEAT_CAT" where the parameter value is a productFeatureCategoryId; meant to be used with text entry boxes or check-boxes and such
      • Methods inherited from class java.lang.Object

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

      • module

        public static final java.lang.String module
      • DEFAULT_PER_TYPE_MAX_SIZE

        public static final int DEFAULT_PER_TYPE_MAX_SIZE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ParametricSearch

        public ParametricSearch()
    • Method Detail

      • makeCategoryFeatureLists

        public static java.util.Map<java.lang.String,​java.util.List<GenericValue>> makeCategoryFeatureLists​(java.lang.String productCategoryId,
                                                                                                                  Delegator delegator)
        Gets all features associated with the specified category through:
        ProductCategory -> ProductFeatureCategoryAppl -> ProductFeatureCategory -> ProductFeature.
        Returns:
        a Map of Lists of ProductFeature GenericValue objects organized by productFeatureTypeId.
      • makeCategoryFeatureLists

        public static java.util.Map<java.lang.String,​java.util.List<GenericValue>> makeCategoryFeatureLists​(java.lang.String productCategoryId,
                                                                                                                  Delegator delegator,
                                                                                                                  int perTypeMaxSize)
      • getAllFeaturesByType

        public static java.util.Map<java.lang.String,​java.util.List<GenericValue>> getAllFeaturesByType​(Delegator delegator)
      • getAllFeaturesByType

        public static java.util.Map<java.lang.String,​java.util.List<GenericValue>> getAllFeaturesByType​(Delegator delegator,
                                                                                                              int perTypeMaxSize)
      • makeFeatureIdByTypeMap

        public static java.util.Map<java.lang.String,​java.lang.String> makeFeatureIdByTypeMap​(ServletRequest request)
      • makeFeatureIdByTypeMap

        public static java.util.Map<java.lang.String,​java.lang.String> makeFeatureIdByTypeMap​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Handles parameters coming in prefixed with "pft_" where the text in the key following the prefix is a productFeatureTypeId and the value is a productFeatureId; meant to be used with drop-downs and such
      • makeFeatureIdListFromPrefixed

        public static java.util.List<java.lang.String> makeFeatureIdListFromPrefixed​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Handles parameters coming in prefixed with "SEARCH_FEAT" where the parameter value is a productFeatureId; meant to be used with text entry boxes or check-boxes and such
      • makeFeatureIdByTypeString

        public static java.lang.String makeFeatureIdByTypeString​(java.util.Map<java.lang.String,​java.lang.String> featureIdByType)
      • makeProductFeatureCategoryIdListFromPrefixed

        public static java.util.List<java.lang.String> makeProductFeatureCategoryIdListFromPrefixed​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Handles parameters coming in prefixed with "SEARCH_PROD_FEAT_CAT" where the parameter value is a productFeatureCategoryId; meant to be used with text entry boxes or check-boxes and such