net.sf.jasperreports.engine.data
Class JRHibernateListDataSource

java.lang.Object
  extended by net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource
      extended by net.sf.jasperreports.engine.data.JRHibernateListDataSource
All Implemented Interfaces:
JRDataSource, JRRewindableDataSource

public class JRHibernateListDataSource
extends JRHibernateAbstractDataSource
implements JRRewindableDataSource

Hibernate data source that uses org.hibernate.Query.list().

The query result can be paginated by not retrieving all the rows at once.

Version:
$Id: JRHibernateListDataSource.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
JRHibernateQueryExecuterFactory.PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource
JRHibernateAbstractDataSource.FieldReader, JRHibernateAbstractDataSource.IdentityFieldReader, JRHibernateAbstractDataSource.IndexFieldReader, JRHibernateAbstractDataSource.IndexPropertyFieldReader, JRHibernateAbstractDataSource.PropertyFieldReader
 
Field Summary
 
Fields inherited from class net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource
queryExecuter
 
Constructor Summary
JRHibernateListDataSource(JRHibernateQueryExecuter queryExecuter, boolean useFieldDescription, int pageSize)
           
 
Method Summary
protected  void fetchPage()
           
 void moveFirst()
          Moves back to the first element in the data source.
 boolean next()
          Tries to position the cursor on the next element in the data source.
 
Methods inherited from class net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource
assignReaders, getFieldMapping, getFieldReader, getFieldReaderSingleReturn, getFieldValue, setCurrentRowValue
 
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
getFieldValue
 

Constructor Detail

JRHibernateListDataSource

public JRHibernateListDataSource(JRHibernateQueryExecuter queryExecuter,
                                 boolean useFieldDescription,
                                 int pageSize)
Method Detail

fetchPage

protected void fetchPage()

next

public boolean next()
Description copied from interface: JRDataSource
Tries to position the cursor on the next element in the data source.

Specified by:
next in interface JRDataSource
Returns:
true if there is a next record, false otherwise

moveFirst

public void moveFirst()
Description copied from interface: JRRewindableDataSource
Moves back to the first element in the data source.

Specified by:
moveFirst in interface JRRewindableDataSource


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com