Class EntityDecoder<T>

  • Type Parameters:
    T - the entity type
    All Implemented Interfaces:
    org.bson.codecs.Decoder<T>
    Direct Known Subclasses:
    LifecycleDecoder

    public class EntityDecoder<T>
    extends Object
    implements org.bson.codecs.Decoder<T>
    Since:
    2.0
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Detail

      • EntityDecoder

        protected EntityDecoder​(MorphiaCodec<T> morphiaCodec)
    • Method Detail

      • decode

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

        protected void decodeModel​(org.bson.BsonReader reader,
                                   org.bson.codecs.DecoderContext decoderContext,
                                   MorphiaInstanceCreator instanceCreator,
                                   @Nullable
                                   PropertyModel model)
      • decodeProperties

        protected void decodeProperties​(org.bson.BsonReader reader,
                                        org.bson.codecs.DecoderContext decoderContext,
                                        MorphiaInstanceCreator instanceCreator,
                                        EntityModel classModel)
      • getCodecFromDocument

        protected org.bson.codecs.Codec<T> getCodecFromDocument​(org.bson.BsonReader reader,
                                                                boolean useDiscriminator,
                                                                String discriminatorKey,
                                                                org.bson.codecs.configuration.CodecRegistry registry,
                                                                DiscriminatorLookup discriminatorLookup,
                                                                org.bson.codecs.Codec<T> defaultCodec)