ItemWriter is a interface for generic output operations. ItemWriter is similar in functionality to an ItemReader, but with inverse operations. An item might represent a line in a file, a row in a database and so on. ![]() ![]() It returns one item or null if no more items are left. The read method defines the most essential contract of the ItemReader. Opens a JDBC cursor and continually retrieves the next row in the ResultSet.Įxecutes a stored procedure and then reads the returned cursor and continually retrieves the next row in the ResultSet.Īll the above implementations override the read() method from the ItemReader interface. Typically read line describe records with fields of data defined by fixed positions in the file or delimited by some special character (e.g. Below are few frequently used implementations of ItemReader. All implementations are expected to be stateful and will be called multiple times for each batch, with each call to read() returning a different value and finally returning null when all input data is exhausted. There are many different implementations of ItemReader interface. ItemReader interface is the means for reading bulk data in a bulk processing system. ItemReader is the means for providing data from many different types of input.
0 Comments
Leave a Reply. |