org.marketcetera.orderloader.system
Class OptionFromRow

java.lang.Object
  extended by org.marketcetera.core.instruments.DynamicInstrumentHandler<Row>
      extended by org.marketcetera.orderloader.system.InstrumentFromRow
          extended by org.marketcetera.orderloader.system.OptionFromRow

public class OptionFromRow
extends InstrumentFromRow

Implements extraction of an equity instrument from a row.

Since:
2.0.0
Version:
$Id: OptionFromRow.java 16154 2012-07-14 16:34:05Z colin $
Author:
anshul@marketcetera.com

Field Summary
static String FIELD_EXPIRY
          The option expiry field header name.
static String FIELD_OPTION_TYPE
          The option type field header name
static String FIELD_STRIKE_PRICE
          The option strike price field header name
 
Fields inherited from class org.marketcetera.orderloader.system.InstrumentFromRow
FIELD_SECURITY_TYPE, FIELD_SYMBOL
 
Constructor Summary
OptionFromRow()
           
 
Method Summary
protected  boolean canProcess(String inHeader, int inIndex)
          Returns true if this handler can handle the field corresponding to the supplied header.
protected  Instrument extract(Row inRow)
          Extracts the instrument value from the supplied row.
protected  boolean isHandled(Row inValue)
           
 
Methods inherited from class org.marketcetera.orderloader.system.InstrumentFromRow
getSecurityType, getSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_EXPIRY

public static final String FIELD_EXPIRY
The option expiry field header name.

See Also:
Constant Field Values

FIELD_STRIKE_PRICE

public static final String FIELD_STRIKE_PRICE
The option strike price field header name

See Also:
Constant Field Values

FIELD_OPTION_TYPE

public static final String FIELD_OPTION_TYPE
The option type field header name

See Also:
Constant Field Values
Constructor Detail

OptionFromRow

public OptionFromRow()
Method Detail

canProcess

protected boolean canProcess(String inHeader,
                             int inIndex)
Description copied from class: InstrumentFromRow
Returns true if this handler can handle the field corresponding to the supplied header.

Subclasses override this method to setup any state needed to handle the headers that they care about.

Specified by:
canProcess in class InstrumentFromRow
Parameters:
inHeader - the header value.
inIndex - the header index.
Returns:
if the handler can process the field, false otherwise.

isHandled

protected boolean isHandled(Row inValue)
Specified by:
isHandled in class DynamicInstrumentHandler<Row>

extract

protected Instrument extract(Row inRow)
                      throws OrderParsingException
Description copied from class: InstrumentFromRow
Extracts the instrument value from the supplied row.

Specified by:
extract in class InstrumentFromRow
Parameters:
inRow - the row
Returns:
the extracted Instrument value.
Throws:
OrderParsingException - if there were errors extracting the instrument value.


Copyright © 2012. All Rights Reserved.