Class EntityEncoder

  • All Implemented Interfaces:
    Direct Known Subclasses:
    LifecycleEncoder, MergingEncoder

    public class EntityEncoder
    extends Object
    implements org.bson.codecs.Encoder<Object>
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Field Detail


        public static final org.bson.codecs.ObjectIdGenerator OBJECT_ID_GENERATOR
    • Constructor Detail

      • EntityEncoder

        protected EntityEncoder​(MorphiaCodec morphiaCodec)
    • Method Detail

      • encode

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

        public Class<Object> getEncoderClass()
        Specified by:
        getEncoderClass in interface org.bson.codecs.Encoder<Object>
      • encodeDiscriminator

        protected void encodeDiscriminator​(org.bson.BsonWriter writer,
                                           EntityModel model)
      • getMorphiaCodec

        protected MorphiaCodec getMorphiaCodec()
      • encodeIdProperty

        protected void encodeIdProperty​(org.bson.BsonWriter writer,
                                        Object instance,
                                        org.bson.codecs.EncoderContext encoderContext,
                                        PropertyModel idModel)
      • encodeValue

        protected void encodeValue​(org.bson.BsonWriter writer,
                                   org.bson.codecs.EncoderContext encoderContext,
                                   PropertyModel model,
                                   Object value)
      • writeValue

        protected void writeValue​(org.bson.BsonWriter writer,
                                  org.bson.codecs.EncoderContext encoderContext,
                                  PropertyModel model,
                                  Object value)