public class MappedField extends Object
Modifier and Type | Field and Description |
---|---|
static List<Class<? extends Annotation>> |
interestingAnnotations |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(Class<? extends Annotation> clazz)
Adds the annotation, if it exists on the field.
|
void |
addAnnotation(Class<? extends Annotation> clazz,
Annotation ann)
Adds the annotation, if it exists on the field.
|
<T extends Annotation> |
getAnnotation(Class<T> clazz)
returns the annotation instance if it exists on this field
|
Map<Class<? extends Annotation>,Annotation> |
getAnnotations() |
Class |
getConcreteType() |
Constructor |
getCTor()
returns a constructor for the type represented by the field
|
Object |
getDbObjectValue(com.mongodb.DBObject dbObj) |
Class |
getDeclaringClass()
returns the declaring class of the java field
|
Field |
getField()
returned the underlying java field
|
Object |
getFieldValue(Object classInst)
Returns the value stored in the java field
|
String |
getFirstFieldName(com.mongodb.DBObject dbObj) |
String |
getFullName()
returns the full name of the class plus java field name
|
String |
getJavaFieldName()
Returns the name of the java field, as declared on the class
|
List<String> |
getLoadNames()
Returns the name of the field's (key)name for mongodb, in order of loading.
|
Class |
getMapKeyClass()
If the underlying java type is a map then it returns T from Map
|
String |
getNameToStore()
Returns the name of the field's (key)name for mongodb
|
Class |
getSubClass()
If the java field is a list/array/map then the sub-type T is returned (ex.
|
Type |
getSubType() |
Class |
getType()
returns the type of the underlying java field
|
boolean |
hasAnnotation(Class ann)
Indicates whether the annotation is present in the mapping (does not check the java field annotations, just the ones discovered)
|
boolean |
isMap() |
boolean |
isMultipleValues() |
boolean |
isSet() |
boolean |
isSingleValue() |
boolean |
isTypeMongoCompatible() |
Annotation |
putAnnotation(Annotation ann)
Adds the annotation even if not on the declared class/field.
|
void |
setFieldValue(Object classInst,
Object value)
Sets the value for the java field
|
String |
toString() |
public static final List<Class<? extends Annotation>> interestingAnnotations
public String getNameToStore()
public List<String> getLoadNames()
public String getFirstFieldName(com.mongodb.DBObject dbObj)
public Object getDbObjectValue(com.mongodb.DBObject dbObj)
public String getJavaFieldName()
public <T extends Annotation> T getAnnotation(Class<T> clazz)
public Map<Class<? extends Annotation>,Annotation> getAnnotations()
public boolean hasAnnotation(Class ann)
public void addAnnotation(Class<? extends Annotation> clazz)
public void addAnnotation(Class<? extends Annotation> clazz, Annotation ann)
public Annotation putAnnotation(Annotation ann)
public String getFullName()
public Class getType()
public Class getDeclaringClass()
public Class getMapKeyClass()
public Class getSubClass()
public Type getSubType()
public boolean isSingleValue()
public boolean isMultipleValues()
public boolean isTypeMongoCompatible()
public boolean isMap()
public boolean isSet()
public Constructor getCTor()
public Object getFieldValue(Object classInst) throws IllegalArgumentException
IllegalArgumentException
public void setFieldValue(Object classInst, Object value) throws IllegalArgumentException
IllegalArgumentException
public Field getField()
public Class getConcreteType()
Copyright © 2015. All rights reserved.