public class TradeWriter extends ItemStreamSupport implements ItemWriter<Trade>
| Modifier and Type | Field and Description |
|---|---|
static String |
TOTAL_AMOUNT_KEY |
| Constructor and Description |
|---|
TradeWriter() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
close, getExecutionContextKey, setExecutionContextName, setNamepublic static final String TOTAL_AMOUNT_KEY
public void write(List<? extends Trade> trades)
ItemWriterwrite in interface ItemWriter<Trade>public void open(ExecutionContext executionContext) throws ItemStreamException
ItemStreamSupportopen in interface ItemStreamopen in class ItemStreamSupportItemStreamExceptionItemStream.open(ExecutionContext)public void update(ExecutionContext executionContext)
ItemStreamSupportExecutionContext.update in interface ItemStreamupdate in class ItemStreamSupportexecutionContext - to be updatedItemStream.update(ExecutionContext)public BigDecimal getTotalPrice()
public void setDao(TradeDao dao)
Copyright © 2014 Pivotal. All rights reserved.