Files
spring-batch/build/reference/html/listOfReadersAndWriters.html
Michael Minella 75ab909314 update
2017-03-23 10:18:33 -05:00

68 lines
15 KiB
HTML

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Appendix&nbsp;A.&nbsp;List of ItemReaders and ItemWriters</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Spring Batch - Reference Documentation"><link rel="up" href="index.html" title="Spring Batch - Reference Documentation"><link rel="prev" href="springBatchIntegration.html" title="13.&nbsp;Spring Batch Integration"><link rel="next" href="metaDataSchema.html" title="Appendix&nbsp;B.&nbsp;Meta-Data Schema"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix&nbsp;A.&nbsp;List of ItemReaders and ItemWriters</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="springBatchIntegration.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="metaDataSchema.html">Next</a></td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a name="listOfReadersAndWriters" href="#listOfReadersAndWriters"></a>Appendix&nbsp;A.&nbsp;List of ItemReaders and ItemWriters</h1></div></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="itemReadersAppendix" href="#itemReadersAppendix"></a>A.1&nbsp;Item Readers</h2></div></div></div><div class="table"><a name="d5e4408" href="#d5e4408"></a><p class="title"><b>Table&nbsp;A.1.&nbsp;Available Item Readers</b></p><div class="table-contents"><table summary="Available Item Readers" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col align="center"><col></colgroup><thead><tr><th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="center">Item Reader</th><th style="border-bottom: 0.5pt solid ; " align="center">Description</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">AbstractItemCountingItemStreamItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Abstract base class that provides basic
restart capabilities by counting the number of items returned from
an <code class="classname">ItemReader</code>.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">AggregateItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">An ItemReader that delivers a list as its
item, storing up objects from the injected ItemReader until they
are ready to be packed out as a collection. This ItemReader should
mark the beginning and end of records with the constant values in
FieldSetMapper AggregateItemReader#<span class="bold"><strong>BEGIN_RECORD</strong></span> and
AggregateItemReader#<span class="bold"><strong>END_RECORD</strong></span></td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">AmqpItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Spring AmqpTemplate it provides
synchronous receive methods. The receiveAndConvert() method
lets you receive POJO objects. </td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">FlatFileItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Reads from a flat file. Includes ItemStream
and Skippable functionality. See section on Read from a
File</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">HibernateCursorItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Reads from a cursor based on an HQL query. See
section on Reading from a Database</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">HibernatePagingItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Reads from a paginated HQL query</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">IbatisPagingItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Reads via iBATIS based on a query. Pages
through the rows so that large datasets can be read without
running out of memory. See HOWTO - Read from a Database. This
ItemReader is now deprecated as of Spring Batch 3.0.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">ItemReaderAdapter</td><td style="border-bottom: 0.5pt solid ; " align="left">Adapts any class to the
<code class="classname">ItemReader</code> interface.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JdbcCursorItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Reads from a database cursor via JDBC. See
HOWTO - Read from a Database</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JdbcPagingItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a SQL statement, pages through the rows,
such that large datasets can be read without running out of
memory</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JmsItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Spring JmsOperations object and a JMS
Destination or destination name to send errors, provides items
received through the injected JmsOperations receive()
method</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JpaPagingItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a JPQL statement, pages through the
rows, such that large datasets can be read without running out of
memory</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">ListItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Provides the items from a list, one at a
time</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">MongoItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a MongoOperations object and JSON based MongoDB
query, provides items received from the MongoOperations find method</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">Neo4jItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Neo4jOperations object and the components of a
Cyhper query, items are returned as the result of the Neo4jOperations.query
method</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">RepositoryItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Spring Data PagingAndSortingRepository object,
a Sort and the name of method to execute, returns items provided by the
Spring Data repository implementation</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">StoredProcedureItemReader</td><td style="border-bottom: 0.5pt solid ; " align="left">Reads from a database cursor resulting from the
execution of a database stored procedure. See HOWTO - Read from a
Database</td></tr><tr><td style="border-right: 0.5pt solid ; " align="left">StaxEventItemReader</td><td style="" align="left">Reads via StAX. See HOWTO - Read from a
File</td></tr></tbody></table></div></div><br class="table-break"></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="itemWritersAppendix" href="#itemWritersAppendix"></a>A.2&nbsp;Item Writers</h2></div></div></div><div class="table"><a name="d5e4477" href="#d5e4477"></a><p class="title"><b>Table&nbsp;A.2.&nbsp;Available Item Writers</b></p><div class="table-contents"><table summary="Available Item Writers" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col align="center"><col></colgroup><thead><tr><th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="center">Item Writer</th><th style="border-bottom: 0.5pt solid ; " align="center">Description</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">AbstractItemStreamItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Abstract base class that combines the
<code class="classname">ItemStream</code> and
<code class="classname">ItemWriter</code> interfaces.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">AmqpItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Spring AmqpTemplate it provides
for synchronous send method. The convertAndSend(Object)
method lets you send POJO objects. </td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">CompositeItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Passes an item to the process method of each
in an injected <span class="bold"><strong>List</strong></span> of <span class="bold"><strong>ItemWriter</strong></span> objects</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">FlatFileItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Writes to a flat file. Includes ItemStream and
Skippable functionality. See section on Writing to a File</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">GemfireItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Using a GemfireOperations object, items wre either written
or removed from the Gemfire instance based on the configuration of the delete
flag</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">HibernateItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">This item writer is hibernate session aware
and handles some transaction-related work that a non-"hibernate
aware" item writer would not need to know about and then delegates
to another item writer to do the actual writing.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">IbatisBatchItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Writes items in a batch using the iBatis API's
directly. This ItemWriter is deprecated as of Spring Batch 3.0.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">ItemWriterAdapter</td><td style="border-bottom: 0.5pt solid ; " align="left">Adapts any class to the
<code class="classname">ItemWriter</code> interface.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JdbcBatchItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Uses batching features from a
<code class="classname">PreparedStatement</code>, if available, and can
take rudimentary steps to locate a failure during a
<code class="methodname">flush</code>.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JmsItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Using a JmsOperations object, items are written
to the default queue via the JmsOperations.convertAndSend() method</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">JpaItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">This item writer is JPA EntityManager aware
and handles some transaction-related work that a non-"jpa aware"
<code class="classname">ItemWriter</code> would not need to know about and
then delegates to another writer to do the actual writing.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">MimeMessageItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Using Spring's JavaMailSender, items of type <code class="classname">MimeMessage</code>
are sent as mail messages</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">MongoItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a MongoOperations object, items are written
via the MongoOperations.save(Object) method. The actual write is delayed
until the last possible moment before the transaction commits.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">Neo4jItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Neo4jOperations object, items are persisted via the
save(Object) method or deleted via the delete(Object) per the
<code class="classname">ItemWriter</code>'s configuration</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">PropertyExtractingDelegatingItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Extends AbstractMethodInvokingDelegator
creating arguments on the fly. Arguments are created by retrieving
the values from the fields in the item to be processed (via a
SpringBeanWrapper) based on an injected array of field
name</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">RepositoryItemWriter</td><td style="border-bottom: 0.5pt solid ; " align="left">Given a Spring Data CrudRepository implementation,
items are saved via the method specified in the configuration.</td></tr><tr><td style="border-right: 0.5pt solid ; " align="left">StaxEventItemWriter</td><td style="" align="left">Uses an <span class="bold"><strong>ObjectToXmlSerializer</strong></span> implementation to
convert each item to XML and then writes it to an XML file using
StAX.</td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="springBatchIntegration.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="metaDataSchema.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">13.&nbsp;Spring Batch Integration&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;B.&nbsp;Meta-Data Schema</td></tr></table></div></body></html>