@Override public SecurityType getSecurityType() { return mInstrument == null? null: mInstrument.getSecurityType(); }
/** * Sets the security type field on the instrument if the FIX version is * greater than 4.0. * * @param inInstrument the instrument * @param inBeginString the begin string (fix version) value of the FIX message * @param inMessage the FIX message. */ protected static void setSecurityType(Instrument inInstrument, String inBeginString, FieldMap inMessage) { if((!FIXVersion.FIX40.equals(FIXVersion.getFIXVersion(inBeginString))) && inInstrument.getSecurityType() != null && org.marketcetera.trade.SecurityType.Unknown != inInstrument.getSecurityType()) { inMessage.setField(new SecurityType(inInstrument.getSecurityType().getFIXValue())); } }
/** * Sets the security type on the message from the instrument if the FIX * dictionary supports the security type field and the specific value for * that field in the instrument. * * @param inInstrument the instrument. * @param inDictionary the FIX dictionary * @param inMsgType the FIX message type * @param inMessage the FIX message */ protected static void setSecurityType(Instrument inInstrument, DataDictionary inDictionary, String inMsgType, FieldMap inMessage) { if(inInstrument.getSecurityType() != null && inDictionary.isMsgField(inMsgType,SecurityType.FIELD)) { String fixValue = inInstrument.getSecurityType().getFIXValue(); if(inDictionary.isFieldValue(SecurityType.FIELD, fixValue)) { inMessage.setField(new SecurityType(fixValue)); } } } /**