Class HQLQueryStrategy
java.lang.Object
com.saperion.rs.federatedsearch.strategy.QueryStrategy
com.saperion.rs.federatedsearch.strategy.HQLQueryStrategy
The HQLQueryStrategy to build HQL queries by parsing SQL like query
statements. This strategy looks for name-value-pairs connected with '=' or '
like '. Multiple name-value-pairs connected with 'and' or 'or' are supported.
- Author:
- sts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildHQLQuery(Properties templateProperties, String ddc, String query) Builds a HQL query out of the given parameters.booleanisSpecialQuery(String query) Searches for '=' and ' like ' in the given query string.
-
Constructor Details
-
HQLQueryStrategy
public HQLQueryStrategy()
-
-
Method Details
-
isSpecialQuery
Searches for '=' and ' like ' in the given query string.- Specified by:
isSpecialQueryin classQueryStrategy- Parameters:
query- The user query to be mapped to HQL.- Returns:
- true if '=' or ' like ' is contained in the given query.
-
buildHQLQuery
Builds a HQL query out of the given parameters. This strategy looks for name-value-pairs connected with '=' or ' like '. 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.
-