Class HibernateCursorItemReaderBuilder<T>
java.lang.Object
org.springframework.batch.item.database.builder.HibernateCursorItemReaderBuilder<T>
@Deprecated(since="5.0",
forRemoval=true)
public class HibernateCursorItemReaderBuilder<T>
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
This is a builder for the
HibernateCursorItemReader
. When configuring, one of
the following should be provided (listed in order of precedence):
- Since:
- 4.0
- Author:
- Michael Minella, Glenn Renfro, Mahmoud Ben Hassine
- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a fully constructedHibernateCursorItemReader
.currentItemCount
(int currentItemCount) Deprecated, for removal: This API element is subject to removal in a future version.Index for the current item.entityClass
(Class<T> nativeClass) Deprecated, for removal: This API element is subject to removal in a future version.fetchSize
(int fetchSize) Deprecated, for removal: This API element is subject to removal in a future version.The number of items to be returned with each round trip to the database.maxItemCount
(int maxItemCount) Deprecated, for removal: This API element is subject to removal in a future version.Configure the max number of items to be read.Deprecated, for removal: This API element is subject to removal in a future version.The name used to calculate the key within theExecutionContext
.nativeQuery
(String nativeQuery) Deprecated, for removal: This API element is subject to removal in a future version.Used to configure aHibernateNativeQueryProvider
.parameterValues
(Map<String, Object> parameterValues) Deprecated, for removal: This API element is subject to removal in a future version.A map of parameter values to be set on the query.Deprecated, for removal: This API element is subject to removal in a future version.The name of the Hibernate named query to be executed for this reader.queryProvider
(HibernateQueryProvider<T> queryProvider) Deprecated, for removal: This API element is subject to removal in a future version.A query provider.queryString
(String queryString) Deprecated, for removal: This API element is subject to removal in a future version.The HQL query string to execute.saveState
(boolean saveState) Deprecated, for removal: This API element is subject to removal in a future version.Configure if the state of theItemStreamSupport
should be persisted within theExecutionContext
for restart purposes.sessionFactory
(org.hibernate.SessionFactory sessionFactory) Deprecated, for removal: This API element is subject to removal in a future version.The HibernateSessionFactory
to execute the query against.useStatelessSession
(boolean useStatelessSession) Deprecated, for removal: This API element is subject to removal in a future version.Indicator for whether to use aStatelessSession
(true
) or aSession
(false
).
-
Constructor Details
-
HibernateCursorItemReaderBuilder
public HibernateCursorItemReaderBuilder()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
saveState
Deprecated, for removal: This API element is subject to removal in a future version.Configure if the state of theItemStreamSupport
should be persisted within theExecutionContext
for restart purposes.- Parameters:
saveState
- defaults to true- Returns:
- The current instance of the builder.
-
name
Deprecated, for removal: This API element is subject to removal in a future version.The name used to calculate the key within theExecutionContext
. Required ifsaveState(boolean)
is set to true.- Parameters:
name
- name of the reader instance- Returns:
- The current instance of the builder.
- See Also:
-
maxItemCount
Deprecated, for removal: This API element is subject to removal in a future version.Configure the max number of items to be read.- Parameters:
maxItemCount
- the max items to be read- Returns:
- The current instance of the builder.
- See Also:
-
currentItemCount
Deprecated, for removal: This API element is subject to removal in a future version.Index for the current item. Used on restarts to indicate where to start from.- Parameters:
currentItemCount
- current index- Returns:
- this instance for method chaining
- See Also:
-
parameterValues
Deprecated, for removal: This API element is subject to removal in a future version.A map of parameter values to be set on the query. The key of the map is the name of the parameter to be set with the value being the value to be set.- Parameters:
parameterValues
- map of values- Returns:
- this instance for method chaining
- See Also:
-
queryName
Deprecated, for removal: This API element is subject to removal in a future version.The name of the Hibernate named query to be executed for this reader.- Parameters:
queryName
- name of the query to execute- Returns:
- this instance for method chaining
- See Also:
-
fetchSize
Deprecated, for removal: This API element is subject to removal in a future version.The number of items to be returned with each round trip to the database. Used internally by Hibernate.- Parameters:
fetchSize
- number of records to return per fetch- Returns:
- this instance for method chaining
- See Also:
-
queryProvider
Deprecated, for removal: This API element is subject to removal in a future version.A query provider. This should be set only ifqueryString(String)
andqueryName(String)
have not been set.- Parameters:
queryProvider
- the query provider- Returns:
- this instance for method chaining
- See Also:
-
queryString
Deprecated, for removal: This API element is subject to removal in a future version.The HQL query string to execute. This should only be set ifqueryProvider(HibernateQueryProvider)
andqueryName(String)
have not been set.- Parameters:
queryString
- the HQL query- Returns:
- this instance for method chaining
- See Also:
-
sessionFactory
public HibernateCursorItemReaderBuilder<T> sessionFactory(org.hibernate.SessionFactory sessionFactory) Deprecated, for removal: This API element is subject to removal in a future version.The HibernateSessionFactory
to execute the query against.- Parameters:
sessionFactory
- the session factory- Returns:
- this instance for method chaining
- See Also:
-
useStatelessSession
Deprecated, for removal: This API element is subject to removal in a future version.Indicator for whether to use aStatelessSession
(true
) or aSession
(false
).- Parameters:
useStatelessSession
- Defaults to false- Returns:
- this instance for method chaining
- See Also:
-
nativeQuery
Deprecated, for removal: This API element is subject to removal in a future version.Used to configure aHibernateNativeQueryProvider
. This is ignored if- Parameters:
nativeQuery
-String
containing the native query.- Returns:
- this instance for method chaining
-
entityClass
Deprecated, for removal: This API element is subject to removal in a future version. -
build
Deprecated, for removal: This API element is subject to removal in a future version.Returns a fully constructedHibernateCursorItemReader
.- Returns:
- a new
HibernateCursorItemReader
-
JpaCursorItemReaderBuilder
instead.