Interface MongoPersistentEntity<T>

All Superinterfaces:
Aware, EnvironmentAware, Iterable<MongoPersistentProperty>, MutablePersistentEntity<T,MongoPersistentProperty>, PersistentEntity<T,MongoPersistentProperty>
All Known Implementing Classes:
BasicMongoPersistentEntity

public interface MongoPersistentEntity<T> extends MutablePersistentEntity<T,MongoPersistentProperty>
MongoDB specific PersistentEntity abstraction.
Author:
Oliver Gierke, Christoph Strobl
  • Method Details

    • getCollection

      String getCollection()
      Returns the collection the entity shall be persisted to.
      Returns:
    • getLanguage

      String getLanguage()
      Returns the default language to be used for this entity.
      Returns:
      Since:
      1.6
    • getTextScoreProperty

      @Nullable MongoPersistentProperty getTextScoreProperty()
      Returns the property holding text score value.
      Returns:
      null if not present.
      Since:
      1.6
      See Also:
    • hasTextScoreProperty

      boolean hasTextScoreProperty()
      Returns whether the entity has a TextScore property.
      Returns:
      true if property annotated with TextScore is present.
      Since:
      1.6
    • getCollation

      @Nullable Collation getCollation()
      Returns the collation of the entity evaluating a potential SpEL expression within the current context.
      Returns:
      null if not set.
      Since:
      2.2
    • hasCollation

      default boolean hasCollation()
      Returns:
      true if the entity is annotated with Collation.
      Since:
      2.2
    • getShardKey

      ShardKey getShardKey()
      Get the entities shard key if defined.
      Returns:
      ShardKey.none() if not not set.
      Since:
      3.0
    • isSharded

      default boolean isSharded()
      Returns:
      true if the shard key is sharded.
      Since:
      3.0
    • isUnwrapped

      default boolean isUnwrapped()
      Returns:
      true if the entity should be unwrapped.
      Since:
      3.2
    • getEncryptionKeyIds

      @Nullable Collection<Object> getEncryptionKeyIds()
      Returns:
      the resolved encryption keyIds if applicable. An empty Collection if no keyIds specified. null no Encrypted annotation found.
      Since:
      3.3