|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.item.support.DelegatingItemWriter
public class DelegatingItemWriter
Simple wrapper around ItemWriter
.
The implementation is thread-safe if the delegate is thread-safe.
Constructor Summary | |
---|---|
DelegatingItemWriter()
Default constructor. |
|
DelegatingItemWriter(ItemWriter itemWriter)
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
clear()
Delegates to ItemWriter.clear() |
protected Object |
doProcess(Object item)
By default returns the argument. |
void |
flush()
Delegates to ItemWriter.flush() |
void |
setDelegate(ItemWriter writer)
Setter for ItemWriter . |
void |
write(Object item)
Calls doProcess(Object) and then writes the result to the
delegate ItemWriter . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingItemWriter()
public DelegatingItemWriter(ItemWriter itemWriter)
itemWriter
- Method Detail |
---|
public void write(Object item) throws Exception
doProcess(Object)
and then writes the result to the
delegate ItemWriter
.
write
in interface ItemWriter
Exception
ItemWriter.write(Object)
protected Object doProcess(Object item) throws Exception
Exception
public void setDelegate(ItemWriter writer)
ItemWriter
.
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void clear() throws ClearFailedException
ItemWriter.clear()
clear
in interface ItemWriter
ClearFailedException
- in case of an error. If this exception is
thrown the writer may be in an inconsistent state and manual intervention
might be required to reconcile the data with persistent output.public void flush() throws FlushFailedException
ItemWriter.flush()
flush
in interface ItemWriter
FlushFailedException
- in case of an error. If this exception is
thrown the writer may be in an inconsistent state and manual intervention
might be required to reconcile the data with persistent output.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |