Class BasicMongoPersistentProperty

java.lang.Object
org.springframework.data.mapping.model.AbstractPersistentProperty<P>
org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<MongoPersistentProperty>
org.springframework.data.mongodb.core.mapping.BasicMongoPersistentProperty
All Implemented Interfaces:
org.springframework.data.mapping.PersistentProperty<MongoPersistentProperty>, MongoPersistentProperty
Direct Known Subclasses:
CachingMongoPersistentProperty

public class BasicMongoPersistentProperty extends org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<MongoPersistentProperty> implements MongoPersistentProperty
MongoDB specific PersistentProperty implementation.
Author:
Oliver Gierke, Patryk Wasik, Thomas Darimont, Christoph Strobl, Mark Paluch, Divya Srivastava
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.mapping.MongoPersistentProperty

    MongoPersistentProperty.PropertyToFieldNameConverter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BasicMongoPersistentProperty(org.springframework.data.mapping.model.Property property, MongoPersistentEntity<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder, org.springframework.data.mapping.model.FieldNamingStrategy fieldNamingStrategy)
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.data.mapping.Association<MongoPersistentProperty>
     
    Returns the DBRef if the property is a reference.
    Returns the DocumentReference if the property is a reference.
     
    org.springframework.expression.EvaluationContext
    Obtain the EvaluationContext for a specific root object.
    Returns the key to be used to store the value of the property inside a Mongo Document.
    int
    Returns the order of the field if defined.
    Returns the Java FieldType of the field a property is persisted to.
    boolean
    Returns whether the property uses an annotated field name through Field.
    boolean
    Returns whether the property is a DBRef.
    boolean
    Returns whether the property is a DocumentReference.
    boolean
    Returns whether the property is explicitly marked as an identifier property of the owning PersistentEntity.
    boolean
    Returns true when property being annotated with Language.
    boolean
    Also considers fields as id that are of supported id type and name.
    boolean
    Returns true whether the property indicates the documents language either by having a MongoPersistentProperty.getFieldName() equal to language or being annotated with Language.
    boolean
    Returns whether the property holds the documents score calculated by text search.
    boolean
    Returns whether the property should be written to the database if its value is null.

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

    findAnnotation, findPropertyOrOwnerAnnotation, getAssociationTargetTypeInformation, getSpelExpression, isAnnotationPresent, isAssociation, isTransient, isVersionProperty, isWritable, toString, usePropertyAccess

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

    equals, getActualType, getActualTypeInformation, getAssociation, getAssociationTargetType, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityTypeInformation, getProperty, getRawType, getSetter, getType, getTypeInformation, getWither, hashCode, isArray, isCollectionLike, isEntity, isImmutable, isMap

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

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

    hasExplicitWriteTarget, isUnwrapped, usePropertyAccess

    Methods inherited from interface org.springframework.data.mapping.PersistentProperty

    findAnnotation, findPropertyOrOwnerAnnotation, getAccessorForOwner, getActualType, getAssociation, getAssociationTargetType, getAssociationTargetTypeInformation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityTypeInformation, getRawType, getRequiredAnnotation, getRequiredAssociation, getRequiredField, getRequiredGetter, getRequiredSetter, getRequiredWither, getSetter, getSpelExpression, getType, getTypeInformation, getWither, hasActualTypeAnnotation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isImmutable, isMap, isTransient, isVersionProperty, isWritable