Went through ItemWriters this evening and in the process added the catalog of ItemWriters to the appendix. I also opened a minor jira issue for questions I had on a few points I found.

This commit is contained in:
wxlund
2008-03-06 07:41:39 +00:00
parent eb744db9f4
commit efe07a3096

View File

@@ -6,6 +6,7 @@
<section>
<title>Item Readers</title>
<table>
<title>Available Item Readers</title>
@@ -138,4 +139,106 @@
</tgroup>
</table>
</section>
<section>
<title>Item Writers</title>
<table>
<title>Available Item Writers</title>
<tgroup cols="3">
<colspec align="center" />
<thead>
<row>
<entry align="center">Item Writer</entry>
<entry align="center">Type of Item Written</entry>
<entry align="center">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry align="left">CompositeItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry align="left">Passes an item to the process method of each
in an injected <emphasis role="bold">List</emphasis> of <emphasis
role="bold">ItemWriter</emphasis> objects</entry>
</row>
<row>
<entry align="left">DelegatingItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry align="left">Wraps ItemWriter and is BeanAware allowing it
to respond to Spring Bean events like
afterPropertiesSet().</entry>
</row>
<row>
<entry align="left">PropertyExtractingDelegatingItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry 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</entry>
</row>
<row>
<entry align="left">ItemTransformerItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry align="left">Extends <emphasis
role="bold">ItemWriterItemWriter</emphasis> by defining its
<emphasis role="bold">doProcess</emphasis> method to call an
injected <emphasis role="bold">ItemTransformer</emphasis></entry>
</row>
<row>
<entry align="left">FlatFileItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry align="left">Attempts to convert the item to a <emphasis
role="bold">String</emphasis>, <emphasis
role="bold">Collection</emphasis> or array using an injected
<emphasis role="bold">Coverter</emphasis> and then recurses. See
[HOWTO - Write to a File]</entry>
</row>
<row>
<entry align="left">HibernateAwareItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry 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. See [HOWTO -
Write to a Database]</entry>
</row>
<row>
<entry align="left">StaxEventWriterItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry align="left">Uses an <emphasis
role="bold">ObjectToXmlSerializer</emphasis> implementation to
convert each item to XML and then writes it to an XML file using
StAX. See [HOWTO - Write to a File]</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
</appendix>