public class JRJpaQueryExecuterFactory extends AbstractQueryExecuterFactory
JRJpaQueryExecuter
query executers.Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_JPA_ENTITY_MANAGER
Built-in parameter holding the value of the
javax.persistence.EntityManager to be used for creating the query. |
static String |
PARAMETER_JPA_QUERY_HINTS_MAP
Built-in parameter (optional) holding the value of the query hints map.
|
static String |
PROPERTY_JPA_QUERY_HINT_PREFIX
Property specifying the prefix for EJBQL query hints.
|
static String |
PROPERTY_JPA_QUERY_PAGE_SIZE
Property specifying the number of result rows to be retrieved at once.
|
static String |
QUERY_LANGUAGE_EJBQL
EJBQL query language.
|
QUERY_EXECUTER_FACTORY_PREFIX
Constructor and Description |
---|
JRJpaQueryExecuterFactory() |
Modifier and Type | Method and Description |
---|---|
JRQueryExecuter |
createQueryExecuter(JasperReportsContext jasperReportsContext,
JRDataset dataset,
Map<String,? extends JRValueParameter> parameters)
Creates a query executer.
|
Object[] |
getBuiltinParameters()
Returns the built-in parameters associated with this query type.
|
boolean |
supportsQueryParameterType(String className)
Returns
true for all parameter types. |
createQueryExecuter
public static final String QUERY_LANGUAGE_EJBQL
public static final String PARAMETER_JPA_ENTITY_MANAGER
javax.persistence.EntityManager
to be used for creating the query.public static final String PARAMETER_JPA_QUERY_HINTS_MAP
public static final 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 String PROPERTY_JPA_QUERY_HINT_PREFIX
public Object[] getBuiltinParameters()
QueryExecuterFactory
{"Param1", String.class, "Param2", "List.class"}
).public JRQueryExecuter createQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parameters) throws JRException
QueryExecuterFactory
jasperReportsContext
- the JasperReportsContextdataset
- the dataset containing the query, fields, etcparameters
- map of value parameters (instances of JRValueParameter
)
indexed by nameJRException
public boolean supportsQueryParameterType(String className)
true
for all parameter types.className
- the value class name of the parameterCopyright © 2016. All rights reserved.