Class MappedDocument
java.lang.Object
org.springframework.data.mongodb.core.MappedDocument
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 Summary
Modifier and TypeMethodDescriptionorg.bson.Document
getId()
<T> T
org.bson.conversions.Bson
static org.bson.Document
getIdIn
(Collection<?> ids) static org.bson.Document
boolean
hasId()
boolean
boolean
isIdPresent
(Class<?> type) static MappedDocument
of
(org.bson.Document document) toIds
(Collection<org.bson.Document> documents) void
Updates the documentsID_FIELD
.
-
Method Details
-
of
-
getIdOnlyProjection
public static org.bson.Document getIdOnlyProjection() -
getIdIn
-
toIds
-
hasId
public boolean hasId() -
hasNonNullId
public boolean hasNonNullId() -
getId
-
getId
-
isIdPresent
-
getIdFilter
public org.bson.conversions.Bson getIdFilter() -
get
-
updateWithoutId
-
getDocument
public org.bson.Document getDocument() -
updateId
Updates the documentsID_FIELD
.- Parameters:
value
- the _id value to set.- Since:
- 3.4.3
-