|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.orderloader.RowProcessor
public abstract class RowProcessor
A processor responsible for processing each order row.
| Constructor Summary | |
|---|---|
protected |
RowProcessor(OrderProcessor inProcessor,
BrokerID inBrokerID)
Creates an instance. |
| Method Summary | |
|---|---|
protected BrokerID |
geBrokerID()
The brokerID value to use for each order. |
List<FailedOrderInfo> |
getFailedOrders()
The list of orders that failed to process. |
int |
getNumFailed()
Number of orders that failed to process. |
int |
getNumSuccess()
Number of orders that were successfully processed. |
int |
getTotal()
Returns the total number of orders processed. |
void |
initialize(String... inHeaders)
Initialize the instance with the headers for each column. |
protected abstract Order |
parseOrder(String[] inRow)
Parses the supplied row and creates an order instance from it. |
void |
processOrder(int inIndex,
String... inRow)
Parses the order in the supplied row and processes it using the OrderProcessor. |
protected abstract void |
setHeaders(String[] inHeaders)
Implemented by subclasses to initialize themselves with the supplied headers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RowProcessor(OrderProcessor inProcessor,
BrokerID inBrokerID)
inProcessor - the processor. Cannot be null.inBrokerID - the broker ID.| Method Detail |
|---|
public final void initialize(String... inHeaders)
throws OrderParsingException
inHeaders - the headers for each column. Cannot be null.
OrderParsingException - if the supplied row is not
a valid header row.
public final void processOrder(int inIndex,
String... inRow)
OrderProcessor.
inIndex - the row index.inRow - the row value, cannot be null.public final int getTotal()
getNumFailed() & getNumSuccess().
public final int getNumFailed()
public final int getNumSuccess()
public final List<FailedOrderInfo> getFailedOrders()
protected final BrokerID geBrokerID()
protected abstract void setHeaders(String[] inHeaders)
throws OrderParsingException
inHeaders - the headers specified in the csv file.
OrderParsingException - if there were errors with the supplied
headers.
protected abstract Order parseOrder(String[] inRow)
throws OrderParsingException
inRow - the supplied row.
OrderParsingException - if there were errors parsing the
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||