Class BasicMongoPersistentEntity<T>

java.lang.Object
org.springframework.data.mapping.model.BasicPersistentEntity<T,MongoPersistentProperty>
org.springframework.data.mongodb.core.mapping.BasicMongoPersistentEntity<T>
All Implemented Interfaces:
Iterable<MongoPersistentProperty>, org.springframework.data.mapping.model.MutablePersistentEntity<T,MongoPersistentProperty>, org.springframework.data.mapping.PersistentEntity<T,MongoPersistentProperty>, MongoPersistentEntity<T>

public class BasicMongoPersistentEntity<T> extends org.springframework.data.mapping.model.BasicPersistentEntity<T,MongoPersistentProperty> implements MongoPersistentEntity<T>
MongoDB specific MongoPersistentEntity implementation that adds Mongo specific meta-data such as the collection name and the like.
Author:
Jon Brisbin, Oliver Gierke, Thomas Darimont, Christoph Strobl, Mark Paluch
  • Constructor Summary

    Constructors
    Constructor
    Description
    BasicMongoPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
    Creates a new BasicMongoPersistentEntity with the given TypeInformation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the collation of the entity evaluating a potential SpEL expression within the current context.
    Returns the collection the entity shall be persisted to.
     
    org.springframework.expression.EvaluationContext
     
    org.springframework.expression.EvaluationContext
    getEvaluationContext(Object rootObject, org.springframework.data.spel.ExpressionDependencies dependencies)
     
    Returns the default language to be used for this entity.
    Get the entities shard key if defined.
    Returns the property holding text score value.
    boolean
    Returns whether the entity has a TextScore property.
    As a general note: An implicit id property has a name that matches "id" or "_id".
    void
     

    Methods inherited from class org.springframework.data.mapping.model.BasicPersistentEntity

    addAssociation, addPersistentProperty, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getFallbackIsNewStrategy, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, setEvaluationContextProvider, setPersistentPropertyAccessorFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator

    Methods inherited from interface org.springframework.data.mongodb.core.mapping.MongoPersistentEntity

    hasCollation, isSharded, isUnwrapped

    Methods inherited from interface org.springframework.data.mapping.model.MutablePersistentEntity

    addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory

    Methods 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
  • Constructor Details

    • BasicMongoPersistentEntity

      public BasicMongoPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
      Creates a new BasicMongoPersistentEntity with the given TypeInformation. Will default the collection name to the entities simple type name.
      Parameters:
      typeInformation - must not be null.
  • Method Details