diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java index 1d126041c..e537b7389 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java @@ -32,18 +32,21 @@ import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; /** - * {@link ItemReader} for reading database records built on top of Hibernate. - * It executes the HQL query when initialized iterates over the result set as + * {@link ItemReader} for reading database records built on top of Hibernate. It + * executes the HQL query when initialized iterates over the result set as * {@link #read()} method is called, returning an object corresponding to * current row. The query can be set directly using * {@link #setQueryString(String)} or a named query can be used by * {@link #setQueryName(String)}. * - *

The reader can be configured to use either {@link StatelessSession} + *

+ * The reader can be configured to use either {@link StatelessSession} * sufficient for simple mappings without the need to cascade to associated * objects or standard hibernate {@link Session} for more advanced mappings or - * when caching is desired. When stateful session is used it will be cleared after successful commit - * without being flushed (no inserts or updates are expected).

+ * when caching is desired. When stateful session is used it will be cleared in + * the {@link #update(ExecutionContext)} method without being flushed (no data + * modifications are expected). + *

* * The implementation is not thread-safe. *