Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.coherence.rest.query
Class AbstractQueryEngine

java.lang.Object
  extended by com.tangosol.coherence.rest.query.AbstractQueryEngine

All Implemented Interfaces:
QueryEngine
Direct Known Subclasses:
CoherenceQueryLanguageEngine

public abstract class AbstractQueryEngine
extends java.lang.Object
implements QueryEngine

Abstract base class for QueryEngine implementations.

Author:
as 2012.01.19

Nested Class Summary
protected static class AbstractQueryEngine.ParsedQuery
          Immutable helper class that wraps both final query string and a map of parameter types, keyed by parameter name.

 

Field Summary
protected  java.util.Map m_mapParsedQuery
          Map of cached ParsedQuery instances, keyed by their corresponding final query string.

 

Constructor Summary
AbstractQueryEngine()
           

 

Method Summary
protected  java.util.List convertList(java.util.List listSource, java.lang.Class clzElementType)
          Convert all elements of the source list into the specified type.
protected  java.util.Map createBindings(java.util.Map mapParams, java.util.Map mapParamTypes)
          Converts string parameters to their required types.
protected  AbstractQueryEngine.ParsedQuery parseQueryString(java.lang.String sQuery)
          Parse a query string containing parameter type hints.
protected  java.lang.Class resolveParameterType(java.lang.String sType)
          Return the Class that corresponds with the given type hint.

 

Methods inherited from interface com.tangosol.coherence.rest.query.QueryEngine
prepareQuery

 

Field Detail

m_mapParsedQuery

protected final java.util.Map m_mapParsedQuery
Map of cached ParsedQuery instances, keyed by their corresponding final query string.

Constructor Detail

AbstractQueryEngine

public AbstractQueryEngine()

Method Detail

parseQueryString

protected AbstractQueryEngine.ParsedQuery parseQueryString(java.lang.String sQuery)
Parse a query string containing parameter type hints.

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.

Parameters:
sQuery - a query string to parse, which contains zero or more parameter bindings, possibly with type hints
Returns:
a ParsedQuery instance containing both the original query string with parameter type hints removed, and the map of parameter types keyed by parameter name

resolveParameterType

protected java.lang.Class resolveParameterType(java.lang.String sType)
Return the Class that corresponds with the given type hint.
Parameters:
sType - the type hint
Returns:
the Class that corresponds with the given type hint

createBindings

protected java.util.Map createBindings(java.util.Map mapParams,
                                       java.util.Map mapParamTypes)
Converts string parameters to their required types.
Parameters:
mapParams - a map of string parameter values
mapParamTypes - a map of required parameter types
Returns:
a map of parameters converted to a required type

convertList

protected java.util.List convertList(java.util.List listSource,
                                     java.lang.Class clzElementType)
Convert all elements of the source list into the specified type.
Parameters:
listSource - source list
clzElementType - element type
Returns:
converted list

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.