public class JRHibernateQueryExecuterFactory extends AbstractQueryExecuterFactory implements Designated
JRHibernateQueryExecuter
query executers.Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_HIBERNATE_FILTER_COLLECTION
Built-in parameter used for collection filter queries.
|
static String |
PARAMETER_HIBERNATE_SESSION
Built-in parameter holding the value of the Hibernate session to be used for creating the query.
|
static String |
PROPERTY_HIBERNATE_CLEAR_CACHE
Property specifying whether hibernate session cache should be cleared between two consecutive fetches when using pagination.
|
static String |
PROPERTY_HIBERNATE_FIELD_MAPPING_DESCRIPTIONS
Property specifying whether field descriptions should be used to determine the mapping between the fields
and the query return values.
|
static String |
PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE
Property specifying the number of result rows to be retrieved at once when the execution type is list.
|
static String |
PROPERTY_HIBERNATE_QUERY_RUN_TYPE
Property specifying the query execution type.
|
static String |
QUERY_EXECUTER_NAME |
static String |
QUERY_LANGUAGE_HQL
HQL query language.
|
static String |
VALUE_HIBERNATE_QUERY_RUN_TYPE_ITERATE
Value of the
PROPERTY_HIBERNATE_QUERY_RUN_TYPE property
corresponding to iterate execution type. |
static String |
VALUE_HIBERNATE_QUERY_RUN_TYPE_LIST
Value of the
PROPERTY_HIBERNATE_QUERY_RUN_TYPE property
corresponding to list execution type. |
static String |
VALUE_HIBERNATE_QUERY_RUN_TYPE_SCROLL
Value of the
PROPERTY_HIBERNATE_QUERY_RUN_TYPE property
corresponding to scroll execution type. |
QUERY_EXECUTER_FACTORY_PREFIX
Constructor and Description |
---|
JRHibernateQueryExecuterFactory() |
Modifier and Type | Method and Description |
---|---|
JRQueryExecuter |
createQueryExecuter(JasperReportsContext jasperReportsContext,
JRDataset dataset,
Map<String,? extends JRValueParameter> parameters)
Creates a query executer.
|
Object[] |
getBuiltinParameters()
Returns an array containing the
PARAMETER_HIBERNATE_SESSION and
PARAMETER_HIBERNATE_FILTER_COLLECTION parameters. |
String |
getDesignation() |
boolean |
supportsQueryParameterType(String className)
Returns
true for all parameter types. |
createQueryExecuter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createQueryExecuter
public static final String QUERY_EXECUTER_NAME
public static final String QUERY_LANGUAGE_HQL
public static final String PARAMETER_HIBERNATE_SESSION
public static final String PARAMETER_HIBERNATE_FILTER_COLLECTION
public static final String PROPERTY_HIBERNATE_QUERY_RUN_TYPE
org.hibernate.Query.list()
org.hibernate.Query.iterate()
org.hibernate.Query.scroll()
public static final String PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE
org.hibernate.Query.setFirstResult()
and org.hibernate.Query.setMaxResults()
.
By default, all the rows are retrieved (no result pagination is performed).public static final String PROPERTY_HIBERNATE_CLEAR_CACHE
public static final String PROPERTY_HIBERNATE_FIELD_MAPPING_DESCRIPTIONS
public static final String VALUE_HIBERNATE_QUERY_RUN_TYPE_LIST
PROPERTY_HIBERNATE_QUERY_RUN_TYPE
property
corresponding to list execution type.public static final String VALUE_HIBERNATE_QUERY_RUN_TYPE_ITERATE
PROPERTY_HIBERNATE_QUERY_RUN_TYPE
property
corresponding to iterate execution type.public static final String VALUE_HIBERNATE_QUERY_RUN_TYPE_SCROLL
PROPERTY_HIBERNATE_QUERY_RUN_TYPE
property
corresponding to scroll execution type.public Object[] getBuiltinParameters()
PARAMETER_HIBERNATE_SESSION
and
PARAMETER_HIBERNATE_FILTER_COLLECTION
parameters.getBuiltinParameters
in interface JRQueryExecuterFactory
getBuiltinParameters
in interface QueryExecuterFactory
public JRQueryExecuter createQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parameters) throws JRException
QueryExecuterFactory
createQueryExecuter
in interface 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.supportsQueryParameterType
in interface JRQueryExecuterFactory
supportsQueryParameterType
in interface QueryExecuterFactory
className
- the value class name of the parameterpublic String getDesignation()
getDesignation
in interface Designated
Copyright © 2023 Cloud Software Group, Inc.. All rights reserved.