public abstract class AbstractQueryEngine extends Object implements QueryEngine
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractQueryEngine.ParsedQuery
Immutable helper class that wraps both final query string and a map
of parameter types, keyed by parameter name.
|
Modifier and Type | Field and Description |
---|---|
protected Map |
m_mapParsedQuery
Map of cached ParsedQuery instances, keyed by their corresponding
final query string.
|
DEFAULT
Constructor and Description |
---|
AbstractQueryEngine() |
Modifier and Type | Method and Description |
---|---|
protected List |
convertList(List<String> listSource,
Class clzElementType)
Convert all elements of the source list into the specified type.
|
protected Map<String,Object> |
createBindings(Map<String,Object> mapParams,
Map<String,Class> mapParamTypes)
Converts string parameters to their required types.
|
protected AbstractQueryEngine.ParsedQuery |
parseQueryString(String sQuery)
Parse a query string containing parameter type hints.
|
protected Class |
resolveParameterType(String sType)
Return the Class that corresponds with the given type hint.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepareQuery
protected final Map m_mapParsedQuery
protected AbstractQueryEngine.ParsedQuery parseQueryString(String sQuery)
Parameter type hints allow users to specify the type conversion that should be performed on the string value of the parameter defined in the query string portion of the URL before it is bound to the query.
sQuery
- a query string to parse, which contains zero or more
parameter bindings, possibly with type hintsprotected Class resolveParameterType(String sType)
sType
- the type hintprotected Map<String,Object> createBindings(Map<String,Object> mapParams, Map<String,Class> mapParamTypes)
mapParams
- a map of string parameter valuesmapParamTypes
- a map of required parameter types