com.force.sdk.jpa.query
Class JPQLPartialCompiler

java.lang.Object
  extended by com.force.sdk.jpa.query.JPQLPartialCompiler

public class JPQLPartialCompiler
extends Object

This is a utility class that will compile JPQL query fragments into expression for use. This is mostly intended to take query expressions from annotations and converting them into expression that can be appended to existing queries.

Author:
Fiaz Hossain

Constructor Summary
JPQLPartialCompiler(org.datanucleus.store.ExecutionContext ec, org.datanucleus.query.compiler.QueryCompilation compilation, Map options, Map params)
          Instantiate a JPQLParser and store the symbol table from the compilation, or create a new one.
 
Method Summary
 org.datanucleus.query.expression.Expression[] compileOrdering(String ordering)
          adds the proper ordering to the parser and returns the resulting expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPQLPartialCompiler

public JPQLPartialCompiler(org.datanucleus.store.ExecutionContext ec,
                           org.datanucleus.query.compiler.QueryCompilation compilation,
                           Map options,
                           Map params)
Instantiate a JPQLParser and store the symbol table from the compilation, or create a new one.

Parameters:
ec - the current execution context
compilation - possibly null, contains components of a query string
options - JPQL parser options
params - parameters for the parser
Method Detail

compileOrdering

public org.datanucleus.query.expression.Expression[] compileOrdering(String ordering)
adds the proper ordering to the parser and returns the resulting expressions.

Parameters:
ordering - the orderBy string
Returns:
an ordered expression array


Copyright © 2011. All Rights Reserved.