Interface MongoEntityInformation<T,ID>

All Superinterfaces:
org.springframework.data.repository.core.EntityInformation<T,ID>, org.springframework.data.repository.core.EntityMetadata<T>
All Known Implementing Classes:
MappingMongoEntityInformation

public interface MongoEntityInformation<T,ID> extends org.springframework.data.repository.core.EntityInformation<T,ID>
Mongo specific EntityInformation.
Author:
Oliver Gierke, Mark Paluch
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the collation for the entity or null if not 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 not versioned.
    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

      @Nullable default Object getVersion(T entity)
      Returns the version value for the entity or null if the entity is not versioned.
      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

      @Nullable Collation getCollation()
      Return the collation for the entity or null if not defined.
      Returns:
      can be null.
      Since:
      2.2