Interface QueryFactory
-
- All Known Implementing Classes:
DefaultQueryFactory
public interface QueryFactory
Used by the query deserializer to map between key/parameters andSearchQuery
objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SearchQuery
newQuery(String queryKey)
Generate a SearchQuery without parametersSearchQuery
newQuery(String queryKey, List parameters)
Generate a SearchQuery with parameters.
-
-
-
Method Detail
-
newQuery
SearchQuery newQuery(String queryKey) throws InvalidQueryException
Generate a SearchQuery without parameters- Parameters:
queryKey
- the key for that query type- Returns:
- the appropriate SearchQuery object
- Throws:
InvalidQueryException
- if no query can be found for that key, or a query can be found but it can not be constructed with no parameters.
-
newQuery
SearchQuery newQuery(String queryKey, List parameters) throws InvalidQueryException
Generate a SearchQuery with parameters. Parameters must be either String or SearchQuery instances.- Parameters:
queryKey
- the key for that query typeparameters
- the parameters for that query- Returns:
- the appropriate SearchQuery object
- Throws:
InvalidQueryException
- if no query can be found for that key, or a query can be found but it can not be constructed with the given parameters.
-
-