* Copyright 2006-2008 the original author or authors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
org.springframework.batch.item.ItemReader for reading database
records using iBATIS in a paging fashion.
It executes the query specified as the
retrieve requested data. The query is executed using paged requests of a size
setPageSize(int). Additional pages are requested when
read() method is called, returning an object corresponding
to current position. Some standard query parameters are provided by the
reader and the SQL in the named query must use some or all of these parameters
(depending on the SQL variant) to construct a result set of the required
size. The parameters are:
_page: the page number to be read (starting at 0)
_pagesize: the size of the pages, i.e. the number of rows to return
_skiprows: the product of
The performance of the paging depends on the iBATIS implementation. Setting a fairly large page size and using a commit interval that matches the page size should provide better performance.
The implementation is thread-safe in between calls to
open(ExecutionContext), but remember to use
saveState=false if used in a multi-threaded client (no restart