Interface MongoEntityInformation<T,ID>

All Superinterfaces:
EntityInformation<T,ID>, EntityMetadata<T>
All Known Implementing Classes:
MappingMongoEntityInformation

public interface MongoEntityInformation<T,ID> extends EntityInformation<T,ID>
Mongo specific EntityInformation.
Author:
Oliver Gierke, Mark Paluch
  • 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