Class NameValueQueryStrategy
- java.lang.Object
-
- com.saperion.rs.federatedsearch.strategy.QueryStrategy
-
- com.saperion.rs.federatedsearch.strategy.NameValueQueryStrategy
-
public class NameValueQueryStrategy extends QueryStrategy
The NameValueQueryStrategy to build HQL queries by parsing name value pair query statements. This strategy looks for name-value-pairs connected with ':' . Multiple name-value-pairs connected with 'and' or 'or' are supported.- Author:
- sts
-
-
Constructor Summary
Constructors Constructor Description NameValueQueryStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbuildHQLQuery(java.util.Properties templateProperties, java.lang.String ddc, java.lang.String query)Builds a HQL query out of the given parameters.booleanisSpecialQuery(java.lang.String query)Searches for ':' in the given query string.
-
-
-
Method Detail
-
isSpecialQuery
public boolean isSpecialQuery(java.lang.String query)
Searches for ':' in the given query string.- Specified by:
isSpecialQueryin classQueryStrategy- Parameters:
query- The user query to be mapped to HQL.- Returns:
- true if ':' is contained in the given query.
-
buildHQLQuery
public java.lang.String buildHQLQuery(java.util.Properties templateProperties, java.lang.String ddc, java.lang.String query)Builds a HQL query out of the given parameters. This strategy looks for name-value-pairs connected with ':' . Multiple name-value-pairs connected with 'and' or 'or' are supported.- Specified by:
buildHQLQueryin classQueryStrategy- Parameters:
templateProperties- The properties to be used to build the HQL query.ddc- The DDC to be used to build the HQL query.query- The user query to be mapped to HQL.- Returns:
- The built HQL query.
-
-