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.data
Class JRHibernateAbstractDataSource

    java.lang.Object
      net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource

All Implemented Interfaces:
  JRDataSource

Direct Known Subclasses:
  JRHibernateIterateDataSource, JRHibernateListDataSource, JRHibernateScrollDataSource

    public abstract class JRHibernateAbstractDataSource

extends java.lang.Object
implements JRDataSource

Base abstract Hibernate data source.

Version:
  $Id: JRHibernateAbstractDataSource.java 3659 2010-03-31 10:20:49Z shertage $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)

Nested Class Summary
`protected static interface` | `JRHibernateAbstractDataSource.FieldReader` Interface used to get the value of a report field from a result row.
`protected static class` | `JRHibernateAbstractDataSource.IdentityFieldReader`
`protected static class` | `JRHibernateAbstractDataSource.IndexFieldReader`
`protected static class` | `JRHibernateAbstractDataSource.IndexPropertyFieldReader`
`protected static class` | `JRHibernateAbstractDataSource.PropertyFieldReader`

Field Summary
`protected JRHibernateQueryExecuter` | `queryExecuter`

Constructor Summary
`protected` | `JRHibernateAbstractDataSource(JRHibernateQueryExecuter queryExecuter, boolean useFieldDescription, boolean useIndexOnSingleReturn)` Creates a Hibernate data source.

Method Summary
`protected java.util.Map` | `assignReaders(boolean useIndexOnSingleReturn)` Assigns field readers to report fields.
`protected java.lang.String` | `getFieldMapping(JRField field)`
`protected JRHibernateAbstractDataSource.FieldReader` | `getFieldReader(org.hibernate.type.Type[] returnTypes, java.util.Map aliasesMap, JRField field)`
`protected JRHibernateAbstractDataSource.FieldReader` | `getFieldReaderSingleReturn(java.util.Map aliasesMap, JRField field, boolean useIndex)`
`java.lang.Object` | `getFieldValue(JRField jrField)` Gets the field value for the current position.
`protected void` | `setCurrentRowValue(java.lang.Object currentReturnValue)` Sets the current row of the query result.

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

Methods inherited from interface net.sf.jasperreports.engine.JRDataSource
`next`

Field Detail

### queryExecuter

    protected final JRHibernateQueryExecuter queryExecuter

Constructor Detail

### JRHibernateAbstractDataSource

    protected JRHibernateAbstractDataSource(JRHibernateQueryExecuter queryExecuter,
                                            boolean useFieldDescription,
                                            boolean useIndexOnSingleReturn)

  Creates a Hibernate data source.

  Parameters:
    `queryExecuter` - the query executer
    `useFieldDescription` - whether to use field descriptions for fields to results mapping
    `useIndexOnSingleReturn` - whether to use indexed addressing even when the query has only one return column

Method Detail

### assignReaders

    protected java.util.Map assignReaders(boolean useIndexOnSingleReturn)

  Assigns field readers to report fields.

  Parameters:
    `useIndexOnSingleReturn` - whether to use indexed addressing even when the query has only one return column
  Returns:
    a report field name to field reader mapping
  See Also:
    `JRHibernateAbstractDataSource.FieldReader`

### getFieldReaderSingleReturn

    protected JRHibernateAbstractDataSource.FieldReader getFieldReaderSingleReturn(java.util.Map aliasesMap,
                                                                                   JRField field,
                                                                                   boolean useIndex)

### getFieldReader

    protected JRHibernateAbstractDataSource.FieldReader getFieldReader(org.hibernate.type.Type[] returnTypes,
                                                                       java.util.Map aliasesMap,
                                                                       JRField field)

### setCurrentRowValue

    protected void setCurrentRowValue(java.lang.Object currentReturnValue)

  Sets the current row of the query result.

  Parameters:
    `currentReturnValue` - the current row value

### getFieldValue

    public java.lang.Object getFieldValue(JRField jrField)
                                   throws JRException

  Description copied from interface: `JRDataSource`
  Gets the field value for the current position.

  Specified by:
    `getFieldValue` in interface `JRDataSource`
  Returns:
    an object containing the field value. The object type must be the field object type.
  Throws:
    `JRException`

### getFieldMapping

    protected java.lang.String getFieldMapping(JRField field)

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