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 JRJpaQueryExecuterFactory

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

All Implemented Interfaces:
  JRQueryExecuterFactory

    public class JRJpaQueryExecuterFactory

extends java.lang.Object
implements JRQueryExecuterFactory

Java Persistence API query executer factory for EJBQL queries.

The factory creates `JRJpaQueryExecuter` query executers.

Version:
  $Id: JRJpaQueryExecuterFactory.java 3778 2010-05-03 16:17:18Z lucianc $
Author:
  Marcel Overdijk (marceloverdijk@hotmail.com)

Field Summary
`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.

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

Constructor Summary
`JRJpaQueryExecuterFactory()`

Method Summary
`JRQueryExecuter` | `createQueryExecuter(JRDataset dataset, java.util.Map 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.

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

Field Detail

### QUERY_LANGUAGE_EJBQL

    public static final java.lang.String QUERY_LANGUAGE_EJBQL

  EJBQL query language.

  See Also:
    Constant Field Values

### PARAMETER_JPA_ENTITY_MANAGER

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

  See Also:
    Constant Field Values

### PARAMETER_JPA_QUERY_HINTS_MAP

    public static final java.lang.String PARAMETER_JPA_QUERY_HINTS_MAP

  Built-in parameter (optional) holding the value of the query hints map. Each named/value pair will be set as query hint against the query.

  See Also:
    Constant Field Values

### PROPERTY_JPA_QUERY_PAGE_SIZE

    public static final java.lang.String PROPERTY_JPA_QUERY_PAGE_SIZE

  Property specifying the number of result rows to be retrieved at once.

  Result pagination is implemented by `javax.persistence.Query.setFirstResult()` and `javax.persistence.Query.setMaxResults()`.

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

  See Also:
    Constant Field Values

### PROPERTY_JPA_QUERY_HINT_PREFIX

    public static final java.lang.String PROPERTY_JPA_QUERY_HINT_PREFIX

  Property specifying the prefix for EJBQL query hints.

  See Also:
    Constant Field Values

Constructor Detail

### JRJpaQueryExecuterFactory

    public JRJpaQueryExecuterFactory()

Method Detail

### getBuiltinParameters

    public java.lang.Object[] getBuiltinParameters()

  Description copied from interface: `JRQueryExecuterFactory`
  Returns the built-in parameters associated with this query type.

  These parameters will be created as system-defined parameters for each report/dataset having a query of this type.

  The returned array should contain consecutive pairs of parameter names and parameter classes (e.g. `{"Param1", String.class, "Param2", "List.class"}`).

  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