|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.data.document.mongodb.mapping.BasicMongoPersistentProperty
public class BasicMongoPersistentProperty
Mongo specific org.springframework.data.mapping.model.PersistentProperty
implementation.
Field Summary | |
---|---|
private static Log |
LOG
|
private static java.util.Set<java.lang.String> |
SUPPORTED_ID_PROPERTY_NAMES
|
private static java.util.Set<java.lang.Class<?>> |
SUPPORTED_ID_TYPES
|
Constructor Summary | |
---|---|
BasicMongoPersistentProperty(java.lang.reflect.Field field,
java.beans.PropertyDescriptor propertyDescriptor,
MongoPersistentEntity<?> owner)
Creates a new BasicMongoPersistentProperty . |
Method Summary | |
---|---|
protected |
createAssociation()
|
DBRef |
getDBRef()
Returns the DBRef if the property is a reference. |
java.lang.String |
getFieldName()
Returns the key to be used to store the value of the property inside a Mongo DBObject . |
boolean |
isAssociation()
|
boolean |
isDbReference()
Returns whether the propert is a com.mongodb.DBRef . |
boolean |
isIdProperty()
Also considers fields as id that are of supported id type and name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Log LOG
private static final java.util.Set<java.lang.Class<?>> SUPPORTED_ID_TYPES
private static final java.util.Set<java.lang.String> SUPPORTED_ID_PROPERTY_NAMES
Constructor Detail |
---|
public BasicMongoPersistentProperty(java.lang.reflect.Field field, java.beans.PropertyDescriptor propertyDescriptor, MongoPersistentEntity<?> owner)
BasicMongoPersistentProperty
.
field
- propertyDescriptor
- owningTypeInformation
- Method Detail |
---|
public boolean isAssociation()
public boolean isIdProperty()
SUPPORTED_ID_PROPERTY_NAMES
,
SUPPORTED_ID_TYPES
public java.lang.String getFieldName()
DBObject
.
getFieldName
in interface MongoPersistentProperty
protectedcreateAssociation()
public boolean isDbReference()
MongoPersistentProperty
com.mongodb.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |