public class MyBatisPagingItemReaderBuilder<T> extends Object
MyBatisPagingItemReader.MyBatisPagingItemReader| Constructor and Description |
|---|
MyBatisPagingItemReaderBuilder() |
| Modifier and Type | Method and Description |
|---|---|
MyBatisPagingItemReader<T> |
build()
Returns a fully built
MyBatisPagingItemReader. |
MyBatisPagingItemReaderBuilder<T> |
maxItemCount(int maxItemCount)
Configure the max number of items to be read.
|
MyBatisPagingItemReaderBuilder<T> |
pageSize(int pageSize)
The number of records to request per page/query.
|
MyBatisPagingItemReaderBuilder<T> |
parameterValues(Map<String,Object> parameterValues)
Set the parameter values to be used for the query execution.
|
MyBatisPagingItemReaderBuilder<T> |
queryId(String queryId)
Set the query id identifying the statement in the SqlMap configuration file.
|
MyBatisPagingItemReaderBuilder<T> |
saveState(boolean saveState)
Configure if the state of the
ItemStreamSupport should
be persisted within the ExecutionContext for restart
purposes. |
MyBatisPagingItemReaderBuilder<T> |
sqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
Set the
SqlSessionFactory to be used by writer for database access. |
public MyBatisPagingItemReaderBuilder<T> sqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
SqlSessionFactory to be used by writer for database access.sqlSessionFactory - the SqlSessionFactory to be used by writer for database accessMyBatisPagingItemReader.setSqlSessionFactory(SqlSessionFactory)public MyBatisPagingItemReaderBuilder<T> queryId(String queryId)
queryId - the id for the queryMyBatisPagingItemReader.setQueryId(String)public MyBatisPagingItemReaderBuilder<T> parameterValues(Map<String,Object> parameterValues)
parameterValues - the parameter values to be used for the query executionMyBatisPagingItemReader.setParameterValues(Map)public MyBatisPagingItemReaderBuilder<T> pageSize(int pageSize)
pageSize - number of itemsAbstractPagingItemReader.setPageSize(int)public MyBatisPagingItemReaderBuilder<T> saveState(boolean saveState)
ItemStreamSupport should
be persisted within the ExecutionContext for restart
purposes.saveState - defaults to trueAbstractItemCountingItemStreamItemReader.setSaveState(boolean)public MyBatisPagingItemReaderBuilder<T> maxItemCount(int maxItemCount)
maxItemCount - the max items to be readAbstractItemCountingItemStreamItemReader.setMaxItemCount(int)public MyBatisPagingItemReader<T> build()
MyBatisPagingItemReader.Copyright © 2010–2019 MyBatis.org. All rights reserved.