public class MyBatisBatchItemWriterBuilder<T> extends Object
MyBatisBatchItemWriter
.MyBatisBatchItemWriter
Constructor and Description |
---|
MyBatisBatchItemWriterBuilder() |
Modifier and Type | Method and Description |
---|---|
MyBatisBatchItemWriterBuilder<T> |
assertUpdates(boolean assertUpdates)
The flag that determines whether an assertion is made that all items cause at least one row to
be updated.
|
MyBatisBatchItemWriter<T> |
build()
Returns a fully built
MyBatisBatchItemWriter . |
MyBatisBatchItemWriterBuilder<T> |
itemToParameterConverter(org.springframework.core.convert.converter.Converter<T,?> itemToParameterConverter)
Set a converter that converting item to parameter object.
|
MyBatisBatchItemWriterBuilder<T> |
sqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
Set the
SqlSessionFactory to be used by writer for database access. |
MyBatisBatchItemWriterBuilder<T> |
sqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate)
Set the
SqlSessionTemplate to be used by writer for database access. |
MyBatisBatchItemWriterBuilder<T> |
statementId(String statementId)
Set the statement id identifying the statement in the SqlMap configuration file.
|
public MyBatisBatchItemWriterBuilder<T> sqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate)
SqlSessionTemplate
to be used by writer for database access.sqlSessionTemplate
- the SqlSessionTemplate
to be used by writer for database accessMyBatisBatchItemWriter.setSqlSessionTemplate(SqlSessionTemplate)
public MyBatisBatchItemWriterBuilder<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 accessMyBatisBatchItemWriter.setSqlSessionFactory(SqlSessionFactory)
public MyBatisBatchItemWriterBuilder<T> statementId(String statementId)
statementId
- the id for the statementMyBatisBatchItemWriter.setStatementId(String)
public MyBatisBatchItemWriterBuilder<T> assertUpdates(boolean assertUpdates)
assertUpdates
- the flag to set. Defaults to trueMyBatisBatchItemWriter.setAssertUpdates(boolean)
public MyBatisBatchItemWriterBuilder<T> itemToParameterConverter(org.springframework.core.convert.converter.Converter<T,?> itemToParameterConverter)
itemToParameterConverter
- a converter that converting item to parameter objectMyBatisBatchItemWriter.setItemToParameterConverter(Converter)
public MyBatisBatchItemWriter<T> build()
MyBatisBatchItemWriter
.Copyright © 2010–2019 MyBatis.org. All rights reserved.