Class ExpressionCodec<T extends Expression>

  • java.lang.Object
    • dev.morphia.aggregation.experimental.codecs.ExpressionCodec<T>
  • All Implemented Interfaces:
    org.bson.codecs.Codec<T>, org.bson.codecs.Decoder<T>, org.bson.codecs.Encoder<T>

    public class ExpressionCodec<T extends Expression>
    extends Object
    implements org.bson.codecs.Codec<T>
    • Constructor Detail

      • ExpressionCodec

        public ExpressionCodec​(Mapper mapper)
    • Method Detail

      • writeNamedExpression

        public static void writeNamedExpression​(Mapper mapper,
                                                org.bson.BsonWriter writer,
                                                String name,
                                                Expression expression,
                                                org.bson.codecs.EncoderContext encoderContext)
        Parameters:
        mapper -
        writer -
        name -
        expression -
        encoderContext -
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • writeNamedValue

        public static void writeNamedValue​(Mapper mapper,
                                           org.bson.BsonWriter writer,
                                           String name,
                                           Object value,
                                           org.bson.codecs.EncoderContext encoderContext)
        Parameters:
        mapper -
        writer -
        name -
        value -
        encoderContext -
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • writeUnnamedValue

        public static void writeUnnamedValue​(Mapper mapper,
                                             org.bson.BsonWriter writer,
                                             Object value,
                                             org.bson.codecs.EncoderContext encoderContext)
        Parameters:
        mapper -
        writer -
        value -
        encoderContext -
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • writeUnnamedExpression

        public static void writeUnnamedExpression​(Mapper mapper,
                                                  org.bson.BsonWriter writer,
                                                  Expression expression,
                                                  org.bson.codecs.EncoderContext encoderContext)
        Parameters:
        mapper -
        writer -
        expression -
        encoderContext -
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • decode

        public final T decode​(org.bson.BsonReader reader,
                              org.bson.codecs.DecoderContext decoderContext)
        Specified by:
        decode in interface org.bson.codecs.Decoder<T extends Expression>
      • encode

        public void encode​(org.bson.BsonWriter writer,
                           T expression,
                           org.bson.codecs.EncoderContext encoderContext)
        Specified by:
        encode in interface org.bson.codecs.Encoder<T extends Expression>
      • getEncoderClass

        public final Class<T> getEncoderClass()
        Specified by:
        getEncoderClass in interface org.bson.codecs.Encoder<T extends Expression>
      • getCodecRegistry

        protected org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
      • getMapper

        protected Mapper getMapper()