Spring Data Document

org.springframework.data.mongodb.core.mapping
Class CachingMongoPersistentProperty

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

public class CachingMongoPersistentProperty
extends BasicMongoPersistentProperty

MongoPersistentProperty caching access to isIdProperty() and getFieldName().

Author:
Oliver Gierke

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.mapping.MongoPersistentProperty
MongoPersistentProperty.PropertyToFieldNameConverter
 
Field Summary
 
Fields inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
association, field, information, name, owner, propertyDescriptor, rawType
 
Constructor Summary
CachingMongoPersistentProperty(Field field, PropertyDescriptor propertyDescriptor, MongoPersistentEntity<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
          Creates a new CachingMongoPersistentProperty.
 
Method Summary
 String getFieldName()
          Returns the key to be used to store the value of the property inside a Mongo DBObject.
 boolean isIdProperty()
          Also considers fields as id that are of supported id type and name.
 
Methods inherited from class org.springframework.data.mongodb.core.mapping.BasicMongoPersistentProperty
createAssociation, getDBRef, getFieldOrder, isAssociation, isDbReference
 
Methods inherited from class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty
getSpelExpression, isTransient
 
Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
getAssociation, getComponentType, getField, getMapValueType, getName, getOwner, getPersistentEntityType, getPropertyDescriptor, getRawType, getType, getTypeInformation, isArray, isCollectionLike, isEntity, isMap, shallBePersisted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.mapping.PersistentProperty
getAssociation, getComponentType, getField, getMapValueType, getName, getOwner, getPersistentEntityType, getPropertyDescriptor, getRawType, getSpelExpression, getType, getTypeInformation, isArray, isCollectionLike, isMap, isTransient, shallBePersisted
 

Constructor Detail

CachingMongoPersistentProperty

public CachingMongoPersistentProperty(Field field,
                                      PropertyDescriptor propertyDescriptor,
                                      MongoPersistentEntity<?> owner,
                                      org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
Creates a new CachingMongoPersistentProperty.

Parameters:
field -
propertyDescriptor -
owner -
simpleTypeHolder -
Method Detail

isIdProperty

public boolean isIdProperty()
Description copied from class: BasicMongoPersistentProperty
Also considers fields as id that are of supported id type and name.

Specified by:
isIdProperty in interface org.springframework.data.mapping.PersistentProperty<MongoPersistentProperty>
Overrides:
isIdProperty in class BasicMongoPersistentProperty
See Also:
BasicMongoPersistentProperty.SUPPORTED_ID_PROPERTY_NAMES, BasicMongoPersistentProperty.SUPPORTED_ID_TYPES

getFieldName

public String getFieldName()
Description copied from class: BasicMongoPersistentProperty
Returns the key to be used to store the value of the property inside a Mongo DBObject.

Specified by:
getFieldName in interface MongoPersistentProperty
Overrides:
getFieldName in class BasicMongoPersistentProperty
Returns:

Spring Data Document

Copyright © 2012. All Rights Reserved.