message.add(null, FudgeSerializer.TYPES_HEADER_ORDINAL, FudgeWireType.STRING, Trade.class.getName());
return message;
}
protected static SimpleTrade buildObjectImpl(final FudgeDeserializer deserializer, final FudgeMsg message) {
SimpleSecurityLink secLink = new SimpleSecurityLink();
if (message.hasField(SECURITY_KEY_FIELD_NAME)) {
FudgeField secKeyField = message.getByName(SECURITY_KEY_FIELD_NAME);
if (secKeyField != null) {
secLink.setExternalId(deserializer.fieldValueToObject(ExternalIdBundle.class, secKeyField));
}
}
if (message.hasField(SECURITY_ID_FIELD_NAME)) {
FudgeField secIdField = message.getByName(SECURITY_ID_FIELD_NAME);
if (secIdField != null) {
secLink.setObjectId(deserializer.fieldValueToObject(ObjectId.class, secIdField));
}
}
SimpleTrade trade = new SimpleTrade();
trade.setSecurityLink(secLink);