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, setName
public static final String TOTAL_AMOUNT_KEY
public void write(List<? extends Trade> trades)
ItemWriter
write
in interface ItemWriter<Trade>
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)
Copyright © 2014 Pivotal. All rights reserved.