Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.query
Class JRHibernateQueryExecuterFactory

    java.lang.Object
      net.sf.jasperreports.engine.query.JRHibernateQueryExecuterFactory

All Implemented Interfaces:
  JRQueryExecuterFactory

    public class JRHibernateQueryExecuterFactory

extends java.lang.Object
implements JRQueryExecuterFactory

Query executer factory for HQL queries that uses Hibernate 3.

The factory creates `JRHibernateQueryExecuter` query executers.

Version:
  $Id: JRHibernateQueryExecuterFactory.java 3779 2010-05-04 10:37:38Z lucianc $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)

Field Summary
`static java.lang.String` | `PARAMETER_HIBERNATE_FILTER_COLLECTION` Built-in parameter used for collection filter queries.
`static java.lang.String` | `PARAMETER_HIBERNATE_SESSION` Built-in parameter holding the value of the Hibernate session to be used for creating the query.
`static java.lang.String` | `PROPERTY_HIBERNATE_CLEAR_CACHE` Property specifying whether hibernate session cache should be cleared between two consecutive fetches when using pagination.
`static java.lang.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 java.lang.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 java.lang.String` | `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` Property specifying the query execution type.
`static java.lang.String` | `QUERY_LANGUAGE_HQL` HQL query language.
`static java.lang.String` | `VALUE_HIBERNATE_QUERY_RUN_TYPE_ITERATE` Value of the `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` property corresponding to iterate execution type.
`static java.lang.String` | `VALUE_HIBERNATE_QUERY_RUN_TYPE_LIST` Value of the `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` property corresponding to list execution type.
`static java.lang.String` | `VALUE_HIBERNATE_QUERY_RUN_TYPE_SCROLL` Value of the `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` property corresponding to scroll execution type.

Fields inherited from interface net.sf.jasperreports.engine.query.JRQueryExecuterFactory
`QUERY_EXECUTER_FACTORY_PREFIX`

Constructor Summary
`JRHibernateQueryExecuterFactory()`

Method Summary
`JRQueryExecuter` | `createQueryExecuter(JRDataset dataset, java.util.Map parameters)` Creates a query executer.
`java.lang.Object[]` | `getBuiltinParameters()` Returns an array containing the `PARAMETER_HIBERNATE_SESSION` and `PARAMETER_HIBERNATE_FILTER_COLLECTION` paramters.
`boolean` | `supportsQueryParameterType(java.lang.String className)` Returns `true` for all parameter types.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### QUERY_LANGUAGE_HQL

    public static final java.lang.String QUERY_LANGUAGE_HQL

  HQL query language.

  See Also:
    Constant Field Values

### PARAMETER_HIBERNATE_SESSION

    public static final java.lang.String PARAMETER_HIBERNATE_SESSION

  Built-in parameter holding the value of the Hibernate session to be used for creating the query.

  See Also:
    Constant Field Values

### PARAMETER_HIBERNATE_FILTER_COLLECTION

    public static final java.lang.String PARAMETER_HIBERNATE_FILTER_COLLECTION

  Built-in parameter used for collection filter queries.

  The value of this paramter will be used as the collection to filter using the query.

  See Also:
    Constant Field Values

### PROPERTY_HIBERNATE_QUERY_RUN_TYPE

    public static final java.lang.String PROPERTY_HIBERNATE_QUERY_RUN_TYPE

  Property specifying the query execution type.

  Possible values are:
  - list (default) - the query will be run by calling `org.hibernate.Query.list()`
  - iterate - the query will be run by calling `org.hibernate.Query.iterate()`
  - scroll - the query will be run by calling `org.hibernate.Query.scroll()`

  See Also:
    Constant Field Values

### PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE

    public static final java.lang.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.

  Result pagination is implemented by `org.hibernate.Query.setFirstResult()` and `org.hibernate.Query.setMaxResults()`.

  By default, all the rows are retrieved (no result pagination is performed).

  See Also:
    Constant Field Values

### PROPERTY_HIBERNATE_CLEAR_CACHE

    public static final java.lang.String PROPERTY_HIBERNATE_CLEAR_CACHE

  Property specifying whether hibernate session cache should be cleared between two consecutive fetches when using pagination.

  By default, the cache cleanup is not performed.

  See Also:
    `PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE`, Constant Field Values

### PROPERTY_HIBERNATE_FIELD_MAPPING_DESCRIPTIONS

    public static final java.lang.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.

  See Also:
    Constant Field Values

### VALUE_HIBERNATE_QUERY_RUN_TYPE_LIST

    public static final java.lang.String VALUE_HIBERNATE_QUERY_RUN_TYPE_LIST

  Value of the `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` property corresponding to list execution type.

  See Also:
    Constant Field Values

### VALUE_HIBERNATE_QUERY_RUN_TYPE_ITERATE

    public static final java.lang.String VALUE_HIBERNATE_QUERY_RUN_TYPE_ITERATE

  Value of the `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` property corresponding to iterate execution type.

  See Also:
    Constant Field Values

### VALUE_HIBERNATE_QUERY_RUN_TYPE_SCROLL

    public static final java.lang.String VALUE_HIBERNATE_QUERY_RUN_TYPE_SCROLL

  Value of the `PROPERTY_HIBERNATE_QUERY_RUN_TYPE` property corresponding to scroll execution type.

  See Also:
    Constant Field Values

Constructor Detail

### JRHibernateQueryExecuterFactory

    public JRHibernateQueryExecuterFactory()

Method Detail

### getBuiltinParameters

    public java.lang.Object[] getBuiltinParameters()

  Returns an array containing the `PARAMETER_HIBERNATE_SESSION` and `PARAMETER_HIBERNATE_FILTER_COLLECTION` paramters.

  Specified by:
    `getBuiltinParameters` in interface `JRQueryExecuterFactory`
  Returns:
    array of built-in parameter names and types associated with this query type

### createQueryExecuter

    public JRQueryExecuter createQueryExecuter(JRDataset dataset,
                                               java.util.Map parameters)
                                        throws JRException

  Description copied from interface: `JRQueryExecuterFactory`
  Creates a query executer.

  This method is called at fill time for reports/datasets having a query supported by this factory.

  Specified by:
    `createQueryExecuter` in interface `JRQueryExecuterFactory`
  Parameters:
    `dataset` - the dataset containing the query, fields, etc
    `parameters` - map of value parameters (instances of `JRValueParameter`) indexed by name
  Returns:
    a query executer
  Throws:
    `JRException`

### supportsQueryParameterType

    public boolean supportsQueryParameterType(java.lang.String className)

  Returns `true` for all parameter types.

  Specified by:
    `supportsQueryParameterType` in interface `JRQueryExecuterFactory`
  Parameters:
    `className` - the value class name of the parameter
  Returns:
    whether the parameter value type is supported

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com