Spring Data Document

org.springframework.data.mongodb.core.mapping
Interface MongoPersistentProperty

All Superinterfaces:
org.springframework.data.mapping.PersistentProperty<MongoPersistentProperty>
All Known Implementing Classes:
BasicMongoPersistentProperty, CachingMongoPersistentProperty

public interface MongoPersistentProperty
extends org.springframework.data.mapping.PersistentProperty<MongoPersistentProperty>

Mongo specific PersistentProperty implementation.

Author:
Oliver Gierke

Nested Class Summary
static class MongoPersistentProperty.PropertyToFieldNameConverter
          Simple Converter implementation to transform a MongoPersistentProperty into its field name.
 
Method Summary
 DBRef getDBRef()
          Returns the DBRef if the property is a reference.
 String getFieldName()
          Returns the name of the field a property is persisted to.
 int getFieldOrder()
          Returns the order of the field if defined.
 boolean isDbReference()
          Returns whether the propert is a DBRef.
 
Methods inherited from interface org.springframework.data.mapping.PersistentProperty
getAssociation, getComponentType, getField, getMapValueType, getName, getOwner, getPersistentEntityType, getPropertyDescriptor, getRawType, getSpelExpression, getType, getTypeInformation, isArray, isAssociation, isCollectionLike, isIdProperty, isMap, isTransient, shallBePersisted
 

Method Detail

getFieldName

String getFieldName()
Returns the name of the field a property is persisted to.

Returns:

getFieldOrder

int getFieldOrder()
Returns the order of the field if defined. Will return -1 if undefined.

Returns:

isDbReference

boolean isDbReference()
Returns whether the propert is a DBRef. If this returns true you can expect getDBRef() to return an non-null value.

Returns:

getDBRef

DBRef getDBRef()
Returns the DBRef if the property is a reference.

Returns:
See Also:
isDbReference()

Spring Data Document

Copyright © 2012. All Rights Reserved.