Package net.sf.jasperreports.hibernate
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 usesorg.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:
HibernateConstants.PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.jasperreports.hibernate.JRHibernateAbstractDataSource
JRHibernateAbstractDataSource.FieldReader, JRHibernateAbstractDataSource.IndexFieldReader, JRHibernateAbstractDataSource.IndexPropertyFieldReader
-
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.hibernate.JRHibernateAbstractDataSource
EXCEPTION_MESSAGE_KEY_FIELD_ALIAS_TYPE_MISMATCH, EXCEPTION_MESSAGE_KEY_MANY_FIELDS_DETECTED, EXCEPTION_MESSAGE_KEY_NO_FIELD_ALIAS, EXCEPTION_MESSAGE_KEY_NO_FIELD_READER, EXCEPTION_MESSAGE_KEY_UNKNOWN_RETURN_ALIAS, queryExecuter
-
-
Constructor Summary
Constructors Constructor Description JRHibernateListDataSource(JRHibernateQueryExecuter queryExecuter, boolean useFieldDescription, int pageSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.hibernate.JRHibernateAbstractDataSource
assignReaders, fieldReader, getFieldMapping, getFieldReader, getFieldReaderSingleReturn, getFieldValue, isManagedType, 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 interfaceJRDataSource
- 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 interfaceJRRewindableDataSource
-
-