BATCH-1057: removed references to AbstractItemWriter

This commit is contained in:
dhgarrette
2009-02-03 14:55:56 +00:00
parent 6b16b86eb4
commit b4fcc457c5
3 changed files with 16 additions and 28 deletions

View File

@@ -189,17 +189,6 @@
<classname>ItemWriter</classname> interfaces.</entry>
</row>
<row>
<entry align="left">AbstractItemWriter</entry>
<entry align="left">java.lang.Object</entry>
<entry align="left">Abstract base class of the
<classname>ItemWriter</classname> interface with default
implmentations of the <methodname>flush</methodname> and
<methodname>clear</methodname> methods.</entry>
</row>
<row>
<entry align="left">BatchSqlUpdateItemWriter</entry>
@@ -262,7 +251,7 @@
<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. </entry>
to another item writer to do the actual writing.</entry>
</row>
<row>
@@ -273,8 +262,7 @@
<entry align="left">This item writer is JPA EntityManager aware
and handles some transaction-related work that a non-"jpa aware"
<classname>ItemWriter</classname> would not need to know about and
then delegates to another writer to do the actual writing.
</entry>
then delegates to another writer to do the actual writing.</entry>
</row>
<row>
@@ -291,4 +279,4 @@
</tgroup>
</table>
</section>
</appendix>
</appendix>

View File

@@ -80,9 +80,9 @@
isn't retried indefinitely or skipped), For example, a custom exception
type could be used, as in the example below:</para>
<programlisting>public class PoisonPillItemWriter extends AbstractItemWriter {
<programlisting>public class PoisonPillItemWriter implements ItemWriter&lt;T&gt; {
public void write(Object item) throws Exception {
public void write(T item) throws Exception {
if (isPoisonPill(item)) {
throw new PoisonPillException("Posion pill detected: "+item);
@@ -178,7 +178,7 @@
accumulating state that should not be lost if the job aborts, the
<classname>ItemStream</classname> interface should be implemented:</para>
<programlisting>public class CustomItemWriter extends AbstractItemWriter implements
<programlisting>public class CustomItemWriter implements ItemWriter&lt;Trade&gt;,
ItemStream, StepListener
{
@@ -205,10 +205,10 @@
executionContext.setDouble(TOTAL_AMOUNT_KEY, totalAmount);
}
public void write(Object item) {
public void write(Trade item) {
delegate.write(item);
totalAmount += ((Trade) item).getAmount();
totalAmount += item.getAmount();
}
@@ -314,7 +314,7 @@
how many lines there are, the <classname>ItemReader</classname> must be
careful to always read an entire record. In order to do this, a custom
<classname>ItemReader</classname> should be implemented as a wrapper for
the <classname>FlatFileItemReader</classname>. </para>
the <classname>FlatFileItemReader</classname>.</para>
<programlisting> &lt;bean id="itemReader"
class="org.springframework.batch.sample.iosample.internal.MultiLineTradeItemReader"&gt;
@@ -400,7 +400,7 @@
within the batch job. Such a process could be kicked off separately by the
scheduler, but the advantage of common meta-data about the run would be
lost. Furthermore, a multi-step job would also need to be split up into
multiple jobs as well. </para>
multiple jobs as well.</para>
<para>Because the need is so common, Spring Batch provides a
<classname>Tasklet</classname> implementation for calling system

View File

@@ -1619,9 +1619,9 @@
isn't retried indefinitely or skipped), For example, a custom exception
type could be used, as in the example below:</para>
<programlisting>public class PoisonPillItemWriter extends AbstractItemWriter {
<programlisting>public class PoisonPillItemWriter implements ItemWriter&lt;T&gt; {
public void write(Object item) throws Exception {
public void write(T item) throws Exception {
if (isPoisonPill(item)) {
throw new PoisonPillException("Posion pill detected: "+item);
@@ -1719,7 +1719,7 @@
<classname>ItemStream</classname> interface should be
implemented:</para>
<programlisting>public class CustomItemWriter extends AbstractItemWriter implements
<programlisting>public class CustomItemWriter implements ItemWriter&lt;Trade&gt;
ItemStream, StepListener
{
@@ -1746,10 +1746,10 @@
executionContext.setDouble(TOTAL_AMOUNT_KEY, totalAmount);
}
public void write(Object item) {
public void write(Trade item) {
delegate.write(item);
totalAmount += ((Trade) item).getAmount();
totalAmount += item.getAmount();
}
@@ -1768,4 +1768,4 @@
itself.</para>
</section>
</section>
</chapter>
</chapter>