Class JRHibernateListDataSource

java.lang.Object
net.sf.jasperreports.hibernate.JRHibernateAbstractDataSource
net.sf.jasperreports.hibernate.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.

Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
  • Constructor Details

    • JRHibernateListDataSource

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

    • 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