public class JRJpaQueryExecuterFactory extends java.lang.Object implements JRQueryExecuterFactory
JRJpaQueryExecuter
query executers.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAMETER_JPA_ENTITY_MANAGER
Built-in parameter holding the value of the
javax.persistence.EntityManager to be used for creating the query. |
static java.lang.String |
PARAMETER_JPA_QUERY_HINTS_MAP
Built-in parameter (optional) holding the value of the query hints map.
|
static java.lang.String |
PROPERTY_JPA_QUERY_HINT_PREFIX
Property specifying the prefix for EJBQL query hints.
|
static java.lang.String |
PROPERTY_JPA_QUERY_PAGE_SIZE
Property specifying the number of result rows to be retrieved at once.
|
static java.lang.String |
QUERY_LANGUAGE_EJBQL
EJBQL query language.
|
QUERY_EXECUTER_FACTORY_PREFIX
Constructor and Description |
---|
JRJpaQueryExecuterFactory() |
Modifier and Type | Method and Description |
---|---|
JRQueryExecuter |
createQueryExecuter(JRDataset dataset,
java.util.Map<java.lang.String,? extends JRValueParameter> parameters)
Creates a query executer.
|
java.lang.Object[] |
getBuiltinParameters()
Returns the built-in parameters associated with this query type.
|
boolean |
supportsQueryParameterType(java.lang.String className)
Returns
true for all parameter types. |
public static final java.lang.String QUERY_LANGUAGE_EJBQL
public static final java.lang.String PARAMETER_JPA_ENTITY_MANAGER
javax.persistence.EntityManager
to be used for creating the query.public static final java.lang.String PARAMETER_JPA_QUERY_HINTS_MAP
public static final java.lang.String PROPERTY_JPA_QUERY_PAGE_SIZE
javax.persistence.Query.setFirstResult()
and javax.persistence.Query.setMaxResults()
.
By default, all the rows are retrieved (no result pagination is performed).public static final java.lang.String PROPERTY_JPA_QUERY_HINT_PREFIX
public java.lang.Object[] getBuiltinParameters()
JRQueryExecuterFactory
{"Param1", String.class, "Param2", "List.class"}
).getBuiltinParameters
in interface JRQueryExecuterFactory
public JRQueryExecuter createQueryExecuter(JRDataset dataset, java.util.Map<java.lang.String,? extends JRValueParameter> parameters) throws JRException
JRQueryExecuterFactory
createQueryExecuter
in interface JRQueryExecuterFactory
dataset
- the dataset containing the query, fields, etcparameters
- map of value parameters (instances of JRValueParameter
)
indexed by nameJRException
public boolean supportsQueryParameterType(java.lang.String className)
true
for all parameter types.supportsQueryParameterType
in interface JRQueryExecuterFactory
className
- the value class name of the parameter© 2001-2010 Jaspersoft Corporation www.jaspersoft.com