public class BasicMongoPersistentProperty extends org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<MongoPersistentProperty> implements MongoPersistentProperty
org.springframework.data.mapping.MongoPersistentProperty
implementation.Type | Property and Description |
---|---|
boolean |
isExplicitId
Gets the value of the property explicitIdProperty.
|
boolean |
isId
Gets the value of the property idProperty.
|
MongoPersistentProperty.PropertyToFieldNameConverter
Constructor and Description |
---|
BasicMongoPersistentProperty(Field field,
PropertyDescriptor propertyDescriptor,
MongoPersistentEntity<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder,
FieldNamingStrategy fieldNamingStrategy)
Creates a new
BasicMongoPersistentProperty . |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.data.mapping.Association<MongoPersistentProperty> |
createAssociation() |
DBRef |
getDBRef()
Returns the
DBRef if the property is a reference. |
String |
getFieldName()
Returns the key to be used to store the value of the property inside a Mongo
DBObject . |
int |
getFieldOrder()
Returns the order of the field if defined.
|
boolean |
isDbReference()
Returns whether the propert is a
DBRef . |
boolean |
isExplicitIdProperty()
Gets the value of the property explicitIdProperty.
|
boolean |
isIdProperty()
Gets the value of the property idProperty.
|
findAnnotation, findPropertyOrOwnerAnnotation, getSpelExpression, isAnnotationPresent, isAssociation, isTransient, isVersionProperty, toString, usePropertyAccess
equals, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityType, getRawType, getSetter, getType, getTypeInformation, hashCode, isArray, isCollectionLike, isEntity, isMap, shallBePersisted
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
usePropertyAccess
findAnnotation, findPropertyOrOwnerAnnotation, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityType, getRawType, getSetter, getSpelExpression, getType, getTypeInformation, isAnnotationPresent, isArray, isAssociation, isCollectionLike, isEntity, isMap, isTransient, isVersionProperty, shallBePersisted
public boolean isIdProperty
isIdProperty
in interface org.springframework.data.mapping.PersistentProperty<MongoPersistentProperty>
isIdProperty
in class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<MongoPersistentProperty>
public boolean isExplicitIdProperty
isExplicitIdProperty
in interface MongoPersistentProperty
public BasicMongoPersistentProperty(Field field, PropertyDescriptor propertyDescriptor, MongoPersistentEntity<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder, FieldNamingStrategy fieldNamingStrategy)
BasicMongoPersistentProperty
.field
- propertyDescriptor
- owner
- simpleTypeHolder
- fieldNamingStrategy
- public boolean isIdProperty()
isIdProperty
in interface org.springframework.data.mapping.PersistentProperty<MongoPersistentProperty>
isIdProperty
in class org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<MongoPersistentProperty>
public boolean isExplicitIdProperty()
isExplicitIdProperty
in interface MongoPersistentProperty
public String getFieldName()
DBObject
.getFieldName
in interface MongoPersistentProperty
public int getFieldOrder()
MongoPersistentProperty
getFieldOrder
in interface MongoPersistentProperty
protected org.springframework.data.mapping.Association<MongoPersistentProperty> createAssociation()
createAssociation
in class org.springframework.data.mapping.model.AbstractPersistentProperty<MongoPersistentProperty>
public boolean isDbReference()
MongoPersistentProperty
DBRef
. If this returns true you can expect
MongoPersistentProperty.getDBRef()
to return an non-null value.isDbReference
in interface MongoPersistentProperty
public DBRef getDBRef()
MongoPersistentProperty
DBRef
if the property is a reference.getDBRef
in interface MongoPersistentProperty
MongoPersistentProperty.isDbReference()
Copyright © 2015. All rights reserved.