public static void AddAnnotationForNonMap( this EventRepresentationChoice enumValue, EPStatementObjectModel model) { if (enumValue == EventRepresentationChoice.DEFAULT || enumValue == EventRepresentationChoice.MAP) { return; } var part = new AnnotationPart("EventRepresentation"); switch (enumValue) { case EventRepresentationChoice.OBJECTARRAY: part.AddValue("objectarray"); break; case EventRepresentationChoice.AVRO: part.AddValue("avro"); break; case EventRepresentationChoice.JSON: case EventRepresentationChoice.JSONCLASSPROVIDED: part.AddValue("json"); break; } model.Annotations = Collections.SingletonList(part); }
public static void AddAnnotationForNonMap(this EventRepresentationChoice enumValue, EPStatementObjectModel model) { if (enumValue == EventRepresentationChoice.DEFAULT || enumValue == EventRepresentationChoice.MAP) { return; } var part = new AnnotationPart("EventRepresentation"); if (enumValue == EventRepresentationChoice.ARRAY) { part.AddValue("objectarray"); } if (enumValue == EventRepresentationChoice.AVRO) { part.AddValue("avro"); } model.Annotations = Collections.SingletonList(part); }
public static void AddAnnotation(this EventRepresentationEnum value, EPStatementObjectModel model) { if (value == EventRepresentationEnum.DEFAULT) { return; } AnnotationPart part = new AnnotationPart(typeof(EventRepresentation).Name); part.AddValue("Array", value == EventRepresentationEnum.OBJECTARRAY); model.Annotations = Collections.SingletonList(part); }