Class PropertyCodec<T>

  • Type Parameters:
    T - the property type
    All Implemented Interfaces:
    org.bson.codecs.Codec<T>, org.bson.codecs.Decoder<T>, org.bson.codecs.Encoder<T>
    Direct Known Subclasses:
    MorphiaReferenceCodec, ReferenceCodec

    public abstract class PropertyCodec<T>
    extends Object
    implements org.bson.codecs.Codec<T>
    Defines codecs for properties
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Detail

      • PropertyCodec

        public PropertyCodec​(Datastore datastore,
                             Field field,
                             morphia.org.bson.codecs.pojo.TypeData typeData)
        Creates a codec
        Parameters:
        datastore - the datastore
        field - the reference field
        typeData - the field type data
    • Method Detail

      • getDatastore

        public Datastore getDatastore()
        Returns:
        the datastore
      • getField

        public Field getField()
        Returns:
        the field
      • getTypeData

        public morphia.org.bson.codecs.pojo.TypeData getTypeData()
        Returns:
        the type data
      • getFieldMappedClass

        protected MappedClass getFieldMappedClass()