Class MappedDocument

java.lang.Object
org.springframework.data.mongodb.core.MappedDocument

public class MappedDocument extends Object
A MongoDB document in its mapped state. I.e. after a source document has been mapped using mapping information of the entity the source document was supposed to represent.
Since:
2.1
Author:
Oliver Gierke
  • Method Details

    • of

      public static MappedDocument of(org.bson.Document document)
    • getIdOnlyProjection

      public static org.bson.Document getIdOnlyProjection()
    • getIdIn

      public static org.bson.Document getIdIn(Collection<?> ids)
    • toIds

      public static List<Object> toIds(Collection<org.bson.Document> documents)
    • hasId

      public boolean hasId()
    • hasNonNullId

      public boolean hasNonNullId()
    • getId

      public Object getId()
    • getId

      public <T> T getId(Class<T> type)
    • isIdPresent

      public boolean isIdPresent(Class<?> type)
    • getIdFilter

      public org.bson.conversions.Bson getIdFilter()
    • get

      public Object get(String key)
    • updateWithoutId

      public UpdateDefinition updateWithoutId()
    • getDocument

      public org.bson.Document getDocument()
    • updateId

      public void updateId(Object value)
      Updates the documents ID_FIELD.
      Parameters:
      value - the _id value to set.
      Since:
      3.4.3