Class EntityDecoder<T>

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

    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 <S> void decodeModel​(org.bson.BsonReader reader,
                                       org.bson.codecs.DecoderContext decoderContext,
                                       MorphiaInstanceCreator<T> instanceCreator,
                                       FieldModel<S> model)
      • decodeProperties

        protected void decodeProperties​(org.bson.BsonReader reader,
                                        org.bson.codecs.DecoderContext decoderContext,
                                        MorphiaInstanceCreator<T> instanceCreator)
      • 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)