public class EJBQLC extends Object
A EJBQLC instance is able to compile multiple EJBQL queries as long as they
come from the same deployement descriptor. The class uses the model instance
passed to the constructor to access any meta data from the deployement
descriptor. Method compile(java.lang.String, java.lang.reflect.Method, int, boolean, java.lang.String)
compiles a single EJBQL query string
together with the java.lang.reflect.Method instance of the corresponding
finder/selector method. The result is a JDOQLElements instance, that can be
used to construct a JDOQL query instance.
Modifier and Type | Field and Description |
---|---|
protected EJBQLAST |
ast
The intermediate form of the EJBQL query string.
|
protected Model |
model
Meta data access.
|
protected static ResourceBundle |
msgs
I18N support.
|
protected NameMapper |
nameMapper
Name mapping EJB <-> JDO.
|
static String |
SIGNATURE
Signature with CVS keyword substitution for identifying the generated code
|
Constructor and Description |
---|
EJBQLC(Model model,
NameMapper nameMapper)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
JDOQLElements |
compile(String ejbqlQuery,
Method method,
int resultTypeMapping,
boolean finderNotSelector,
String ejbName)
Compiles the specified query string for the specified
finder/selector method.
|
protected Model model
protected NameMapper nameMapper
protected EJBQLAST ast
protected static final ResourceBundle msgs
public static final String SIGNATURE
public EJBQLC(Model model, NameMapper nameMapper)
model
- meta data access.nameMapper
- name mapping EJB <-> JDO.public JDOQLElements compile(String ejbqlQuery, Method method, int resultTypeMapping, boolean finderNotSelector, String ejbName) throws EJBQLException
ejbqlQuery
- the EJBQL query textmethod
- the Method instance of the finder or selectorresultTypeMapping
- result-type-mapping element from the DDfinderNotSelector
- true
indicates a finder,
false
a selectorejbName
- the ejb name of the entity beanEJBQLException
Copyright © 2018. All rights reserved.