Interface MongoEntityInformation<T,ID>
- All Superinterfaces:
EntityInformation<T,
,ID> EntityMetadata<T>
- All Known Implementing Classes:
MappingMongoEntityInformation
Mongo specific
EntityInformation
.- Author:
- Oliver Gierke, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionReturn the collation for the entity or null ifnot defined
.Returns the name of the collection the entity shall be persisted to.Returns the attribute that the id will be persisted to.default Object
getVersion
(T entity) Returns the version value for the entity or null if the entity is notversioned
.default boolean
Returns whether the entity defines a specific collation.default boolean
Returns whether the entity uses optimistic locking.Methods inherited from interface org.springframework.data.repository.core.EntityInformation
getId, getIdType, getRequiredId, isNew
Methods inherited from interface org.springframework.data.repository.core.EntityMetadata
getJavaType
-
Method Details
-
getCollectionName
String getCollectionName()Returns the name of the collection the entity shall be persisted to.- Returns:
-
getIdAttribute
String getIdAttribute()Returns the attribute that the id will be persisted to.- Returns:
-
isVersioned
default boolean isVersioned()Returns whether the entity uses optimistic locking.- Returns:
- true if the entity defines a
Version
property. - Since:
- 2.2
-
getVersion
Returns the version value for the entity or null if the entity is notversioned
.- Parameters:
entity
- must not be null- Returns:
- can be null.
- Since:
- 2.2
-
hasCollation
default boolean hasCollation()Returns whether the entity defines a specific collation.- Returns:
- true if the entity defines a collation.
- Since:
- 2.2
-
getCollation
Return the collation for the entity or null ifnot defined
.- Returns:
- can be null.
- Since:
- 2.2
-