|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.item.ItemStreamSupport org.springframework.batch.sample.domain.trade.internal.TradeWriter
public class TradeWriter
Delegates the actual writing to custom DAO delegate. Allows configurable exception raising for testing skip and restart.
Constructor Summary | |
---|---|
TradeWriter()
|
Method Summary | |
---|---|
BigDecimal |
getTotalPrice()
|
void |
open(ExecutionContext executionContext)
No-op. |
void |
setDao(TradeDao dao)
|
void |
setFailingCustomers(List<String> failingCustomers)
Public setter for the the customers on which failure should occur. |
void |
update(ExecutionContext executionContext)
Return empty ExecutionContext . |
void |
updateTotalPrice(List<Trade> trades)
|
void |
write(List<? extends Trade> trades)
Process the supplied data element. |
Methods inherited from class org.springframework.batch.item.ItemStreamSupport |
---|
close |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TradeWriter()
Method Detail |
---|
public void write(List<? extends Trade> trades)
ItemWriter
write
in interface ItemWriter<Trade>
public void updateTotalPrice(List<Trade> trades)
public void open(ExecutionContext executionContext) throws ItemStreamException
ItemStreamSupport
open
in interface ItemStream
open
in class ItemStreamSupport
ItemStreamException
ItemStream.open(ExecutionContext)
public void update(ExecutionContext executionContext)
ItemStreamSupport
ExecutionContext
.
update
in interface ItemStream
update
in class ItemStreamSupport
executionContext
- to be updatedItemStream.update(ExecutionContext)
public BigDecimal getTotalPrice()
public void setDao(TradeDao dao)
public void setFailingCustomers(List<String> failingCustomers)
failingCustomers
- The customers to fail on
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |