public class JpaCursorItemReaderBuilder<T>
extends java.lang.Object
JpaCursorItemReader
.Constructor and Description |
---|
JpaCursorItemReaderBuilder() |
Modifier and Type | Method and Description |
---|---|
JpaCursorItemReader<T> |
build()
Returns a fully constructed
JpaCursorItemReader . |
JpaCursorItemReaderBuilder<T> |
currentItemCount(int currentItemCount)
Index for the current item.
|
JpaCursorItemReaderBuilder<T> |
entityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
The
EntityManagerFactory to be used for executing the configured
queryString . |
JpaCursorItemReaderBuilder<T> |
maxItemCount(int maxItemCount)
Configure the max number of items to be read.
|
JpaCursorItemReaderBuilder<T> |
name(java.lang.String name)
The name used to calculate the key within the
ExecutionContext . |
JpaCursorItemReaderBuilder<T> |
parameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)
A map of parameter values to be set on the query.
|
JpaCursorItemReaderBuilder<T> |
queryProvider(JpaQueryProvider queryProvider)
A query provider.
|
JpaCursorItemReaderBuilder<T> |
queryString(java.lang.String queryString)
The JPQL query string to execute.
|
JpaCursorItemReaderBuilder<T> |
saveState(boolean saveState)
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
public JpaCursorItemReaderBuilder<T> saveState(boolean saveState)
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes.saveState
- defaults to truepublic JpaCursorItemReaderBuilder<T> name(java.lang.String name)
ExecutionContext
.
Required if saveState(boolean)
is set to true.name
- name of the reader instanceItemStreamSupport.setName(String)
public JpaCursorItemReaderBuilder<T> maxItemCount(int maxItemCount)
maxItemCount
- the max items to be readAbstractItemCountingItemStreamItemReader.setMaxItemCount(int)
public JpaCursorItemReaderBuilder<T> currentItemCount(int currentItemCount)
currentItemCount
- current indexAbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)
public JpaCursorItemReaderBuilder<T> parameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)
parameterValues
- map of valuesJpaCursorItemReader.setParameterValues(Map)
public JpaCursorItemReaderBuilder<T> queryProvider(JpaQueryProvider queryProvider)
queryString(String)
have not been set.queryProvider
- the query providerJpaCursorItemReader.setQueryProvider(JpaQueryProvider)
public JpaCursorItemReaderBuilder<T> queryString(java.lang.String queryString)
queryProvider(JpaQueryProvider)
has not been set.queryString
- the JPQL queryJpaCursorItemReader.setQueryString(String)
public JpaCursorItemReaderBuilder<T> entityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
EntityManagerFactory
to be used for executing the configured
queryString
.entityManagerFactory
- EntityManagerFactory
used to create
EntityManager
public JpaCursorItemReader<T> build()
JpaCursorItemReader
.JpaCursorItemReader