|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.core.instruments.DynamicInstrumentHandler<Row>
org.marketcetera.orderloader.system.InstrumentFromRow
public abstract class InstrumentFromRow
Abstracts out creation of an instrument from a row of fields.
| Field Summary | |
|---|---|
static String |
FIELD_SECURITY_TYPE
The Security Type field header name. |
static String |
FIELD_SYMBOL
The Symbol field header name. |
| Constructor Summary | |
|---|---|
InstrumentFromRow()
|
|
| Method Summary | |
|---|---|
protected abstract boolean |
canProcess(String inHeader,
int inIndex)
Returns true if this handler can handle the field corresponding to the supplied header. |
protected abstract Instrument |
extract(Row inRow)
Extracts the instrument value from the supplied row. |
protected SecurityType |
getSecurityType(String[] inRow)
Returns the security type value from the supplied row, if available. |
protected String |
getSymbol(String[] inRow)
Returns the symbol value for the supplied row. |
| Methods inherited from class org.marketcetera.core.instruments.DynamicInstrumentHandler |
|---|
isHandled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FIELD_SYMBOL
public static final String FIELD_SECURITY_TYPE
| Constructor Detail |
|---|
public InstrumentFromRow()
| Method Detail |
|---|
protected abstract boolean canProcess(String inHeader,
int inIndex)
Subclasses override this method to setup any state needed to handle the headers that they care about.
inHeader - the header value.inIndex - the header index.
protected final String getSymbol(String[] inRow)
inRow - the row
protected final SecurityType getSecurityType(String[] inRow)
throws OrderParsingException
inRow - the row
OrderParsingException - if there were errors parsing the
security type value.
protected abstract Instrument extract(Row inRow)
throws OrderParsingException
inRow - the row
OrderParsingException - if there were errors extracting
the instrument value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||