Class MorphiaCodecProvider

  • All Implemented Interfaces:

    public class MorphiaCodecProvider
    extends Object
    implements CodecProvider
    Provider for codecs for Morphia entities
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Detail

      • MorphiaCodecProvider

        public MorphiaCodecProvider​(Datastore datastore)
        Creates a provider
        datastore -
    • Method Detail

      • getRefreshCodec

        public <T> Codec<T> getRefreshCodec​(T entity,
                                            CodecRegistry registry)
        Creates a codec that uses an existing entity for loading rather than creating a new instance.
        Type Parameters:
        T - the entity type
        entity - the entity to refresh
        registry - the codec registry
        the new codec
      • getMapper

        protected Mapper getMapper()