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 Summary
Modifier and TypeMethodDescription@Nullable CollationReturns the collation of the entity evaluating a potential SpEL expression within the current context.Returns the collection the entity shall be persisted to.@Nullable Collection<Object> Returns the default language to be used for this entity.Get the entities shard key if defined.@Nullable MongoPersistentPropertyReturns the property holding text score value.default booleanbooleanReturns whether the entity has aTextScoreproperty.default booleandefault booleanMethods inherited from interface EnvironmentAware
setEnvironmentMethods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface MutablePersistentEntity
addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verifyMethods inherited from interface PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
-
Method Details
-
getCollection
-
getLanguage
-
getTextScoreProperty
@Nullable MongoPersistentProperty getTextScoreProperty()Returns the property holding text score value.- Returns:
- null if not present.
- Since:
- 1.6
- See Also:
-
hasTextScoreProperty
-
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 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
@Nullable Collection<Object> getEncryptionKeyIds()- Returns:
- the resolved encryption keyIds if applicable. An empty
Collectionif no keyIds specified. null noEncryptedannotation found. - Since:
- 3.3
-