@Override protected boolean isHandled(FieldMap inValue) { try { return (!(inValue.isSetField(CFICode.FIELD))) && ((!inValue.isSetField(SecurityType.FIELD)) || SecurityType.CONVERTIBLE_BOND.equals(inValue.getString(SecurityType.FIELD))); } catch (FieldNotFound ignore) { return false; } } }
@Override protected boolean isHandled(FieldMap inValue) { try { return (!(inValue.isSetField(CFICode.FIELD))) && ((!inValue.isSetField(SecurityType.FIELD)) || SecurityType.COMMON_STOCK.equals(inValue.getString(SecurityType.FIELD))); } catch (FieldNotFound ignore) { return false; } } /**
private static String getFieldOrDefault(FieldMap fields, int tag, String defaultValue) { if (fields.isSetField(tag)) { try { return fields.getString(tag); } catch (final FieldNotFound e) { // ignore, should never happen return null; } } else { return defaultValue; } }
private static String getFieldOrDefault(FieldMap fields, int tag, String defaultValue) { if (fields.isSetField(tag)) { try { return fields.getString(tag); } catch (final FieldNotFound e) { // ignore, should never happen return null; } } else { return defaultValue; } }
public boolean isSetField(Field<?> field) { return isSetField(field.getField()); }
@Override protected boolean isHandled(FieldMap inValue) { try { return (inValue.isSetField(SecurityType.FIELD) && SecurityType.FOREIGN_EXCHANGE_CONTRACT.equals(inValue.getString(SecurityType.FIELD))); } catch (FieldNotFound ignore) { return false; } } /**
private static String getFieldOrDefault(FieldMap fields, int tag, String defaultValue) { if (fields.isSetField(tag)) { try { return fields.getString(tag); } catch (final FieldNotFound e) { // ignore, should never happen return null; } } else { return defaultValue; } }
public boolean isSetField(Field<?> field) { return isSetField(field.getField()); }
public boolean isSetField(Field<?> field) { return isSetField(field.getField()); }
/** * Returns the strike price value for the specified FIX message. * * @param inMessage the FIX message. * * @return the strike price value, if available, null otherwise. */ private static BigDecimal getStrikePrice(FieldMap inMessage) { if (inMessage.isSetField(StrikePrice.FIELD)) { try { return inMessage.getDecimal(StrikePrice.FIELD); } catch (FieldNotFound ignore) { } } return null; } /**
/** * Fetches the symbolSfx field value from the supplied FIX message. * * @param inMessage a <code>FieldMap</code> value * @return the symbolSfx field value or <code>null</code> */ protected static String getSymbolSfx(FieldMap inMessage) { if(inMessage.isSetField(quickfix.field.SymbolSfx.FIELD)) { try { return inMessage.getString(quickfix.field.SymbolSfx.FIELD); } catch (FieldNotFound ignore) { } } return null; } }
@Override protected boolean isHandled(FieldMap inValue) { try { return (inValue.isSetField(SecurityType.FIELD) && SecurityType.OPTION.equals(inValue.getString(SecurityType.FIELD))) || (inValue.isSetField(CFICode.FIELD) && CFICodeUtils.isOption(inValue.getString(CFICode.FIELD))); } catch (FieldNotFound ignore) { return false; } } /**
@Override protected boolean isHandled(FieldMap inValue) { try { return (inValue.isSetField(SecurityType.FIELD) && SecurityType.FUTURE.equals(inValue.getString(SecurityType.FIELD))) || (inValue.isSetField(CFICode.FIELD) && CFICodeUtils.isFuture(inValue.getString(CFICode.FIELD))); } catch (FieldNotFound ignore) { return false; } } }
private void setField(FieldMap fields, StringField field) { if (fields.isSetField(field)) { throw new FieldException(SessionRejectReason.TAG_APPEARS_MORE_THAN_ONCE, field.getTag()); } fields.setField(field); }
private void setField(FieldMap fields, StringField field) { if (fields.isSetField(field)) { throw new FieldException(SessionRejectReason.TAG_APPEARS_MORE_THAN_ONCE, field.getTag()); } fields.setField(field); }
private void setField(FieldMap fields, StringField field) { if (fields.isSetField(field)) { throw new FieldException(SessionRejectReason.TAG_APPEARS_MORE_THAN_ONCE, field.getTag()); } fields.setField(field); }
public static void insertFieldIfMissing(int fieldNumber, String value, FieldMap fieldMap) throws CoreException { if (fieldMap.isSetField(fieldNumber)){ StringField testField = new StringField(fieldNumber); try { fieldMap.getField(testField); if(testField.getValue().equals(value)){ return; } } catch (FieldNotFound ignored) { //Unexpected as isSetField() returned true //Don't do anything so that we set the field before we return. } } fieldMap.setField(new StringField(fieldNumber, value)); }
public void copyFrom(FieldMap fields) { try { for (int componentField : getFields()) { if (fields.isSetField(componentField)) { setField(componentField, fields.getField(componentField)); } } for (int groupField : getGroupFields()) { if (fields.isSetField(groupField)) { setField(groupField, fields.getField(groupField)); setGroups(groupField, fields.getGroups(groupField)); } } } catch (FieldNotFound e) { // should not happen } }
public void copyFrom(FieldMap fields) { try { for (int componentField : getFields()) { if (fields.isSetField(componentField)) { setField(componentField, fields.getField(componentField)); } } for (int groupField : getGroupFields()) { if (fields.isSetField(groupField)) { setField(groupField, fields.getField(groupField)); setGroups(groupField, fields.getGroups(groupField)); } } } catch (FieldNotFound e) { // should not happen } }
public void copyFrom(FieldMap fields) { try { for (int componentField : getFields()) { if (fields.isSetField(componentField)) { setField(componentField, fields.getField(componentField)); } } for (int groupField : getGroupFields()) { if (fields.isSetField(groupField)) { setField(groupField, fields.getField(groupField)); setGroups(groupField, fields.getGroups(groupField)); } } } catch (FieldNotFound e) { // should not happen } }