Package org.fudgemsg

Examples of org.fudgemsg.FudgeField


    return ret;
  }

  public static ManageableCurveSnapshot fromFudgeMsg(final FudgeDeserializer deserializer, final FudgeMsg msg) {
    final ManageableCurveSnapshot ret = new ManageableCurveSnapshot();
    FudgeField field = msg.getByName("values");
    if (field != null) {
      ret.setValues(deserializer.fieldValueToObject(ManageableUnstructuredMarketDataSnapshot.class, field));
    }
    field = msg.getByName("valuationTime");
    if (field != null) {
View Full Code Here


      }
    }
  }

  private static SimplePortfolioNode buildObjectImpl(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final FudgeField idField = message.getByName(IDENTIFIER_FIELD_NAME);
    final UniqueId id = idField != null ? deserializer.fieldValueToObject(UniqueId.class, idField) : null;
    final String name = message.getFieldValue(String.class, message.getByName(NAME_FIELD_NAME));
    final SimplePortfolioNode node = new SimplePortfolioNode(name);
    if (id != null) {
      node.setUniqueId(id);
View Full Code Here

  }

  @Override
  public PortfolioNode buildObject(FudgeDeserializer deserializer, FudgeMsg message) {
    final SimplePortfolioNode node = buildObjectImpl(deserializer, message);
    final FudgeField parentField = message.getByName(PARENT_FIELD_NAME);
    final UniqueId parentId = (parentField != null) ? deserializer.fieldValueToObject(UniqueId.class, parentField) : null;
    if (parentId != null) {
      node.setParentNodeId(parentId);
    }
    return node;
View Full Code Here

    return ret;
  }

  public static ManageableYieldCurveSnapshot fromFudgeMsg(final FudgeDeserializer deserializer, final FudgeMsg msg) {
    final ManageableYieldCurveSnapshot ret = new ManageableYieldCurveSnapshot();
    FudgeField field = msg.getByName("values");
    if (field != null) {
      ret.setValues(deserializer.fieldValueToObject(ManageableUnstructuredMarketDataSnapshot.class, field));
    }
    field = msg.getByName("valuationTime");
    if (field != null) {
View Full Code Here

        if (!labelTypes.isEmpty() && !labelValues.isEmpty()) {
          // Have a type and a value, which can be consumed
          final String labelType = labelTypes.remove();
          final Class<?> labelClass = getClass(labelType);
          final FudgeField labelValue = labelValues.remove();
          final Object label = deserializer.fieldValueToObject(labelClass, labelValue);
          labels.add(label);
        }
      }
View Full Code Here

      final StubType stubTypeLeg = StubType.valueOf(message.getString(STUB_TYPE_LEG_FIELD));
      final boolean exchangeNotional = message.getBoolean(EXCHANGE_NOTIONAL_FIELD);
      final int paymentLag = message.getInt(PAYMENT_LAG_FIELD);
      final CompoundingIborLegConvention convention = new CompoundingIborLegConvention(name, externalIdBundle, swapIndexConvention, paymentTenor,
          compoundingType, compositionTenor, stubTypeCompound, settlementDays, isEOM, stubTypeLeg, exchangeNotional, paymentLag);
      final FudgeField uniqueIdMsg = message.getByName(UNIQUE_ID_FIELD);
      if (uniqueIdMsg != null) {
        convention.setUniqueId(deserializer.fieldValueToObject(UniqueId.class, uniqueIdMsg));
      }
      return convention;
    }
View Full Code Here

  public ConfigItemTarget() {
  }

  protected ConfigItemTarget(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final FudgeField field = message.getByName("uid");
    if (field != null) {
      _uid = deserializer.fieldValueToObject(UniqueId.class, field);
    }
  }
View Full Code Here

      final int settlementDays = message.getInt(SETTLEMENT_DAYS_FIELD);
      final boolean isEOM = message.getBoolean(IS_EOM_FIELD);
      final Currency currency = Currency.of(message.getString(CURRENCY_FIELD));
      final ExternalId regionCalendar = deserializer.fieldValueToObject(ExternalId.class, message.getByName(REGION_FIELD));
      final DepositConvention convention = new DepositConvention(name, externalIdBundle, dayCount, businessDayConvention, settlementDays, isEOM, currency, regionCalendar);
      final FudgeField uniqueIdMsg = message.getByName(UNIQUE_ID_FIELD);
      if (uniqueIdMsg != null) {
        convention.setUniqueId(deserializer.fieldValueToObject(UniqueId.class, uniqueIdMsg));
      }
      return convention;
    }
View Full Code Here

  protected TempTarget(UniqueId uid) {
    _uid = uid;
  }

  protected TempTarget(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final FudgeField field = message.getByName("uid");
    if (field != null) {
      _uid = deserializer.fieldValueToObject(UniqueId.class, field);
    } else {
      _uid = null;
    }
View Full Code Here

      final ExternalId spotConvention = deserializer.fieldValueToObject(ExternalId.class, message.getByName(SPOT_CONVENTION_FIELD));
      final BusinessDayConvention businessDayConvention = BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention(message.getString(BUSINESS_DAY_CONVENTION_FIELD));
      final boolean isEOM = message.getBoolean(IS_EOM_FIELD);
      final ExternalId settlementRegion = deserializer.fieldValueToObject(ExternalId.class, message.getByName(SETTLEMENT_REGION_FIELD));
      final FXForwardAndSwapConvention convention = new FXForwardAndSwapConvention(name, externalIdBundle, spotConvention, businessDayConvention, isEOM, settlementRegion);
      final FudgeField uniqueIdMsg = message.getByName(UNIQUE_ID_FIELD);
      if (uniqueIdMsg != null) {
        convention.setUniqueId(deserializer.fieldValueToObject(UniqueId.class, uniqueIdMsg));
      }
      return convention;
    }
View Full Code Here

TOP

Related Classes of org.fudgemsg.FudgeField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.