This commit is contained in:
trisberg
2008-08-21 12:30:46 +00:00
parent 0e8c26e943
commit c52b277358
2 changed files with 3 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ import org.springframework.util.ClassUtils;
* The implementation is *not* thread-safe.
*
* @author Thomas Risberg
* @since 2.0
*/
public class JpaPagingItemReader<T> extends AbstractItemReaderItemStream<T> implements InitializingBean {
@@ -102,8 +103,7 @@ public class JpaPagingItemReader<T> extends AbstractItemReaderItemStream<T> impl
/**
* The number of entities to retrieve at a time.
*
* @param pageSize the number of rows to fetch, 10 by default
* @see javax.persistence.Query#setMaxResults(int)
* @param pageSize the number of entities per page
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;

View File

@@ -33,6 +33,7 @@ public class JpaPagingItemReaderIntegrationTests extends AbstractDataSourceItemR
JpaPagingItemReader<Foo> inputSource = new JpaPagingItemReader<Foo>();
inputSource.setQueryString(jpqlQuery);
inputSource.setEntityManagerFactory(entityManagerFactory);
inputSource.setPageSize(3);
inputSource.afterPropertiesSet();
inputSource.setSaveState(true);