Class QueryParser
- java.lang.Object
-
- de.hybris.platform.persistence.flexiblesearch.QueryParser
-
public class QueryParser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intQUERYCACHSIZE_DEFAULTstatic java.lang.StringQUERYCACHSIZE_KEYstatic intQUERYCACHSIZE_LIMIT
-
Constructor Summary
Constructors Constructor Description QueryParser()QueryParser(int translationCacheSize)QueryParser(int translationCacheSize, FlexibleSearchTypeCacheProvider fsCache)QueryParser(FlexibleSearchTypeCacheProvider fsCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCachedQueries(Cache cache)protected java.lang.ObjectgetDynamicQueriesKey(java.util.Collection<ContextQueryFilter> dynamicRestrictions)java.util.Map<java.lang.Object,TranslatedQuery>getQueryCacheMap(Cache cache)intgetQueryCacheSize()TranslatedQuerytranslateQuery(Principal principal, java.lang.String query, int valueCount, boolean hasLanguage, boolean failOnUnknownFields, boolean disableRestrictions, boolean disablePrincipalGroupRestrictions, java.util.Collection<ContextQueryFilter> dynamicRestrictions, java.util.Map values)translates a flexible query.
-
-
-
Field Detail
-
QUERYCACHSIZE_KEY
public static final java.lang.String QUERYCACHSIZE_KEY
- See Also:
- Constant Field Values
-
QUERYCACHSIZE_DEFAULT
public static final int QUERYCACHSIZE_DEFAULT
- See Also:
- Constant Field Values
-
QUERYCACHSIZE_LIMIT
public static final int QUERYCACHSIZE_LIMIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QueryParser
public QueryParser()
-
QueryParser
public QueryParser(FlexibleSearchTypeCacheProvider fsCache)
-
QueryParser
public QueryParser(int translationCacheSize)
-
QueryParser
public QueryParser(int translationCacheSize, FlexibleSearchTypeCacheProvider fsCache)
-
-
Method Detail
-
getQueryCacheSize
public int getQueryCacheSize()
-
getQueryCacheMap
public final java.util.Map<java.lang.Object,TranslatedQuery> getQueryCacheMap(Cache cache)
-
clearCachedQueries
public final void clearCachedQueries(Cache cache)
-
translateQuery
public TranslatedQuery translateQuery(Principal principal, java.lang.String query, int valueCount, boolean hasLanguage, boolean failOnUnknownFields, boolean disableRestrictions, boolean disablePrincipalGroupRestrictions, java.util.Collection<ContextQueryFilter> dynamicRestrictions, java.util.Map values) throws FlexibleSearchException
translates a flexible query.- Parameters:
query- the unparsed query textvalueCount- the size of provided values, for checking value indexeshasLanguage- tells if a language PK is provided, for checking localized fieldsfailOnUnknownFields- tells whether unknown (untyped) fields are ignored and considered as dump properties or not- Throws:
FlexibleSearchException
-
getDynamicQueriesKey
protected java.lang.Object getDynamicQueriesKey(java.util.Collection<ContextQueryFilter> dynamicRestrictions)
-
-