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