Class RandomStringValueResolver<T extends ItemModel>
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver<T,java.lang.Object,java.lang.Object>
-
- de.hybris.platform.solrfacetsearch.provider.impl.RandomStringValueResolver<T>
-
- All Implemented Interfaces:
QualifierProviderAware,ValueResolver<T>
public class RandomStringValueResolver<T extends ItemModel> extends AbstractValueResolver<T,java.lang.Object,java.lang.Object>
Resolver that generates random numbers.Supported parameters:
Parameter Default value Description valueCount 1 The number of values to be generated per document per indexed property. distinctValueCount 1 The number of distinct values to be generated. prefix value The value prefix.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
AbstractValueResolver.ValueResolverContext<T,U>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDISTINCT_VALUE_COUNT_PARAMstatic intDISTINCT_VALUE_COUNT_PARAM_DEFAULT_VALUEstatic java.lang.StringIDstatic java.lang.StringPREFIX_PARAMstatic java.lang.StringPREFIX_PARAM_DEFAULT_VALUEstatic java.lang.StringVALUE_COUNT_PARAMstatic intVALUE_COUNT_PARAM_DEFAULT_VALUE
-
Constructor Summary
Constructors Constructor Description RandomStringValueResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, T model, AbstractValueResolver.ValueResolverContext<java.lang.Object,java.lang.Object> resolverContext)protected intresolveDistinctValueCount(IndexedProperty indexedProperty)protected java.lang.StringresolvePrefix(IndexedProperty indexedProperty)protected intresolveValueCount(IndexedProperty indexedProperty)-
Methods inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
addFieldValue, createLocalSessionContext, doResolve, filterAndAddFieldValues, filterFieldValue, getQualifierProvider, getSessionService, getValueFilters, loadData, loadQualifierData, removeLocalSessionContext, resolve, setQualifierProvider, setSessionService, setValueFilters
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
VALUE_COUNT_PARAM
public static final java.lang.String VALUE_COUNT_PARAM
- See Also:
- Constant Field Values
-
VALUE_COUNT_PARAM_DEFAULT_VALUE
public static final int VALUE_COUNT_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
DISTINCT_VALUE_COUNT_PARAM
public static final java.lang.String DISTINCT_VALUE_COUNT_PARAM
- See Also:
- Constant Field Values
-
DISTINCT_VALUE_COUNT_PARAM_DEFAULT_VALUE
public static final int DISTINCT_VALUE_COUNT_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
PREFIX_PARAM
public static final java.lang.String PREFIX_PARAM
- See Also:
- Constant Field Values
-
PREFIX_PARAM_DEFAULT_VALUE
public static final java.lang.String PREFIX_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addFieldValues
protected void addFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, T model, AbstractValueResolver.ValueResolverContext<java.lang.Object,java.lang.Object> resolverContext) throws FieldValueProviderException
- Specified by:
addFieldValuesin classAbstractValueResolver<T extends ItemModel,java.lang.Object,java.lang.Object>- Throws:
FieldValueProviderException
-
resolveValueCount
protected int resolveValueCount(IndexedProperty indexedProperty)
-
resolveDistinctValueCount
protected int resolveDistinctValueCount(IndexedProperty indexedProperty)
-
resolvePrefix
protected java.lang.String resolvePrefix(IndexedProperty indexedProperty)
-
-