Package org.apache.ofbiz.product.feature
Class ParametricSearch
java.lang.Object
org.apache.ofbiz.product.feature.ParametricSearch
Utilities for parametric search based on features.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,
List<GenericValue>> getAllFeaturesByType
(Delegator delegator) static Map<String,
List<GenericValue>> getAllFeaturesByType
(Delegator delegator, int perTypeMaxSize) static Map<String,
List<GenericValue>> makeCategoryFeatureLists
(String productCategoryId, Delegator delegator) Gets all features associated with the specified category through:
ProductCategory -> ProductFeatureCategoryAppl -> ProductFeatureCategory -> ProductFeature.static Map<String,
List<GenericValue>> makeCategoryFeatureLists
(String productCategoryId, Delegator delegator, int perTypeMaxSize) makeFeatureIdByTypeMap
(Map<String, 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 suchmakeFeatureIdByTypeMap
(ServletRequest request) static String
makeFeatureIdByTypeString
(Map<String, String> featureIdByType) makeFeatureIdListFromPrefixed
(Map<String, 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 suchmakeProductFeatureCategoryIdListFromPrefixed
(Map<String, 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
-
Field Details
-
DEFAULT_PER_TYPE_MAX_SIZE
public static final int DEFAULT_PER_TYPE_MAX_SIZE- See Also:
-
-
Constructor Details
-
ParametricSearch
public ParametricSearch()
-
-
Method Details
-
makeCategoryFeatureLists
public static Map<String,List<GenericValue>> makeCategoryFeatureLists(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
-
getAllFeaturesByType
-
getAllFeaturesByType
public static Map<String,List<GenericValue>> getAllFeaturesByType(Delegator delegator, int perTypeMaxSize) -
makeFeatureIdByTypeMap
-
makeFeatureIdByTypeMap
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
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
-
makeProductFeatureCategoryIdListFromPrefixed
public static List<String> makeProductFeatureCategoryIdListFromPrefixed(Map<String, 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
-