Class CollectionReference<C extends java.util.Collection>

  • Type Parameters:
    C -

    public abstract class CollectionReference<C extends java.util.Collection>
    extends MorphiaReference<C>
    Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • isResolved

        public final boolean isResolved()
        Specified by:
        isResolved in class MorphiaReference<C extends java.util.Collection>
        Returns:
        true if this reference has already been resolved
      • get

        public abstract C get()
        Specified by:
        get in class MorphiaReference<C extends java.util.Collection>
        Returns:
        returns the referenced entity if it exists. May return null.
      • encode

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

        public static MorphiaReference<?> decode​(Datastore datastore,
                                                 Mapper mapper,
                                                 MappedField mappedField,
                                                 java.lang.Class paramType,
                                                 com.mongodb.DBObject dbObject)
        Decodes a document in to entities
        Parameters:
        datastore - the datastore
        mapper - the mapper
        mappedField - the MappedField
        paramType - the type of the underlying entity
        dbObject - the DBObject to decode
        Returns:
        the entities