T - the type of objects this reader will read.public class HibernateRecordReader<T> extends java.lang.Object implements RecordReader
GenericRecord instances with domain objects as payload.| Constructor and Description |
|---|
HibernateRecordReader(org.hibernate.SessionFactory sessionFactory,
java.lang.String query)
Create a new
HibernateRecordReader. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
open() |
GenericRecord<T> |
readRecord() |
void |
setFetchSize(int fetchSize)
Set the fetch size
|
void |
setMaxResults(int maxResults)
Set the max results to fetch.
|
public HibernateRecordReader(org.hibernate.SessionFactory sessionFactory,
java.lang.String query)
HibernateRecordReader.sessionFactory - a pre-configured hibernate session factoryquery - the HQL query to use to fetch datapublic void open()
open in interface RecordReaderpublic GenericRecord<T> readRecord()
readRecord in interface RecordReaderpublic void close()
close in interface RecordReaderpublic void setMaxResults(int maxResults)
maxResults - the maximum results to fetchpublic void setFetchSize(int fetchSize)
fetchSize - the fetch sizeCopyright © 2020. All Rights Reserved.