@Override
 public MutableFudgeMsg buildMessage(FudgeSerializationContext context, ZonedDateTime object) {
   final MutableFudgeMsg msg = context.newMessage();
   msg.add(ODT_FIELD_NAME, object.toOffsetDateTime());
   msg.add(ZONE_FIELD_NAME, object.getZone().getID());
   return msg;
 }
 @Override
 public MutableFudgeMsg buildMessage(
     FudgeSerializationContext context, CycleExecutionFailedCall object) {
   MutableFudgeMsg msg = context.newMessage();
   context.addToMessage(msg, EXECUTION_OPTIONS_FIELD, null, object.getExecutionOptions());
   context.addToMessage(msg, EXCEPTION_FIELD, null, object.getException());
   return msg;
 }
 public org.fudgemsg.FudgeMsg toFudgeMsg(
     final org.fudgemsg.mapping.FudgeSerializationContext fudgeContext) {
   if (fudgeContext == null) throw new NullPointerException("fudgeContext must not be null");
   final org.fudgemsg.MutableFudgeMsg msg = fudgeContext.newMessage();
   toFudgeMsg(fudgeContext, msg);
   return msg;
 }
 public void toFudgeMsg(
     final org.fudgemsg.mapping.FudgeSerializationContext fudgeContext,
     final org.fudgemsg.MutableFudgeMsg msg) {
   super.toFudgeMsg(fudgeContext, msg);
   if (_chooseDate != null) {
     fudgeContext.addToMessage(msg, CHOOSE_DATE_KEY, null, _chooseDate);
   }
   msg.add(UNDERLYING_STRIKE_KEY, null, _underlyingStrike);
   if (_underlyingExpiry != null) {
     final org.fudgemsg.MutableFudgeMsg fudge1 =
         org.fudgemsg.mapping.FudgeSerializationContext.addClassHeader(
             fudgeContext.newMessage(),
             _underlyingExpiry.getClass(),
             com.opengamma.util.time.Expiry.class);
     _underlyingExpiry.toFudgeMsg(fudgeContext, fudge1);
     msg.add(UNDERLYING_EXPIRY_KEY, null, fudge1);
   }
 }
Ejemplo n.º 5
0
 public void toFudgeMsg(
     final org.fudgemsg.mapping.FudgeSerializationContext fudgeContext,
     final org.fudgemsg.MutableFudgeMsg msg) {
   super.toFudgeMsg(fudgeContext, msg);
   if (_result != null) {
     fudgeContext.addToMessageWithClassHeaders(
         msg,
         RESULT_KEY,
         null,
         _result,
         com.opengamma.engine.view.calcnode.CalculationJobResult.class);
   }
   if (_ready != null) {
     final org.fudgemsg.MutableFudgeMsg fudge1 =
         org.fudgemsg.mapping.FudgeSerializationContext.addClassHeader(
             fudgeContext.newMessage(),
             _ready.getClass(),
             com.opengamma.engine.view.calcnode.msg.Ready.class);
     _ready.toFudgeMsg(fudgeContext, fudge1);
     msg.add(READY_KEY, null, fudge1);
   }
 }
 @Override
 public MutableFudgeMsg buildMessage(
     FudgeSerializationContext context, FixedIncomeStripWithSecurity object) {
   MutableFudgeMsg message = context.newMessage();
   context.addToMessage(message, "type", null, object.getInstrumentType());
   context.addToMessage(message, "tenor", null, object.getTenor());
   context.addToMessage(message, "resolvedTenor", null, object.getResolvedTenor());
   ZonedDateTimeBuilder zonedDateTimeBuilder = new ZonedDateTimeBuilder();
   MutableFudgeMsg subMessage = zonedDateTimeBuilder.buildMessage(context, object.getMaturity());
   context.addToMessage(message, "maturity", null, subMessage);
   context.addToMessage(message, "identifier", null, object.getSecurityIdentifier());
   context.addToMessageWithClassHeaders(message, "security", null, object.getSecurity());
   if (object.getInstrumentType() == StripInstrumentType.FUTURE) {
     message.add("numFutures", object.getNumberOfFuturesAfterTenor());
   }
   return message;
 }