Class MapReference<T>

  • Type Parameters:
    T -

    public class MapReference<T>
    extends MorphiaReference<java.util.Map<java.lang.String,​T>>
    Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • get

        public java.util.Map<java.lang.String,​T> get()
        Specified by:
        get in class MorphiaReference<java.util.Map<java.lang.String,​T>>
        Returns:
        returns the referenced entity if it exists. May return null.
      • isResolved

        public boolean isResolved()
        Specified by:
        isResolved in class MorphiaReference<java.util.Map<java.lang.String,​T>>
        Returns:
        true if this reference has already been resolved
      • encode

        public java.lang.Object encode​(Mapper mapper,
                                       java.lang.Object value,
                                       MappedField field)
        Specified by:
        encode in class MorphiaReference<java.util.Map<java.lang.String,​T>>
        Parameters:
        mapper - the mapper
        value - the value
        field - the MappedField
        Returns:
        the encoded vale
      • decode

        public static MapReference decode​(Datastore datastore,
                                          Mapper mapper,
                                          MappedField mappedField,
                                          com.mongodb.DBObject dbObject)
        Decodes a document in to entities
        Parameters:
        datastore - the datastore
        mapper - the mapper
        mappedField - the MappedField
        dbObject - the DBObject to decode
        Returns:
        the entities