Module spring.data.mongodb
Interface MongoPersistentEntity<T>
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionReturns the collation of the entity evaluating a potential SpEL expression within the current context.Returns the collection the entity shall be persisted to.Returns the default language to be used for this entity.Get the entities shard key if defined.Returns the property holding text score value.default booleanbooleanReturns whether the entity has aTextScoreproperty.default booleandefault booleanMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.mapping.model.MutablePersistentEntity
addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verifyMethods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
-
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
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 aTextScoreproperty.- Returns:
- true if property annotated with
TextScoreis present. - Since:
- 1.6
-
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 keyis sharded. - Since:
- 3.0
-
isUnwrapped
default boolean isUnwrapped()- Returns:
- true if the entity should be unwrapped.
- Since:
- 3.2
-
getEncryptionKeyIds
- Returns:
- the resolved encryption keyIds if applicable. An empty
Collectionif no keyIds specified. null noEncryptedannotation found. - Since:
- 3.3
-