org.datanucleus.store.query
Class QueryManager

java.lang.Object
  extended by org.datanucleus.store.query.QueryManager

public class QueryManager
extends java.lang.Object

Manages the runtime, metadata and lifecycle of queries. Provides caching of query compilations.


Constructor Summary
QueryManager(OMFContext omfContext)
           
 
Method Summary
 void addQueryCompilation(java.lang.String language, java.lang.String query, QueryCompilation compilation)
          Method to store the compilation for a query.
 void close()
           
 InvocationEvaluator getInMemoryEvaluatorForMethod(java.lang.Class type, java.lang.String methodName)
          Accessor for an evaluator for invocation of the specified method.
 QueryCompilation getQueryCompilationForQuery(java.lang.String language, java.lang.String query)
          Accessor for a Query compilation for the specified query and language.
 QueryRuntime getQueryRuntime()
           
 Query newQuery(java.lang.String language, ObjectManager om, java.lang.Object query)
          Method to generate a new query using the passed query as basis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryManager

public QueryManager(OMFContext omfContext)
Method Detail

close

public void close()

getQueryRuntime

public QueryRuntime getQueryRuntime()

newQuery

public Query newQuery(java.lang.String language,
                      ObjectManager om,
                      java.lang.Object query)
Method to generate a new query using the passed query as basis.

Parameters:
language - The query language
om - The Object Manager
query - The query filter (String) or a previous Query
Returns:
The Query

getQueryCompilationForQuery

public QueryCompilation getQueryCompilationForQuery(java.lang.String language,
                                                    java.lang.String query)
Accessor for a Query compilation for the specified query and language.

Parameters:
language - Language of the query
query - Query string
Returns:
The compilation (if present)

addQueryCompilation

public void addQueryCompilation(java.lang.String language,
                                java.lang.String query,
                                QueryCompilation compilation)
Method to store the compilation for a query.

Parameters:
language - Language of the query
query - The query string
compilation - The compilation of this query

getInMemoryEvaluatorForMethod

public InvocationEvaluator getInMemoryEvaluatorForMethod(java.lang.Class type,
                                                         java.lang.String methodName)
Accessor for an evaluator for invocation of the specified method. If it is not a supported method then returns null.

Parameters:
methodName - Name of the method
Returns:
Evaluator suitable for this type with this method name


Copyright © 2009. All Rights Reserved.