public class EphemeralMappedField extends MappedField
| Constructor and Description |
|---|
EphemeralMappedField(ParameterizedType t,
MappedField mf,
Mapper mapper)
Creates an EphemeralMappedField.
|
EphemeralMappedField(Type t,
MappedField mf,
Mapper mapper)
Creates an EphemeralMappedField.
|
| 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.
|
Object |
getDbObjectValue(DBObject dbObj) |
Object |
getFieldValue(Object instance)
Gets the value of the field mapped on the instance given.
|
Class |
getMapKeyClass()
If the underlying java type is a map then it returns T from Map
|
protected String |
getMappedFieldName() |
String |
getNameToStore() |
MappedField |
getParent() |
Class |
getSubClass()
If the java field is a list/array/map then the sub-type T is returned (ex.
|
Type |
getSubType()
If the java field is a list/array/map then the sub-type T is returned (ex.
|
Class |
getType() |
Object |
getValue() |
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 |
isSingleValue() |
void |
setFieldValue(Object instance,
Object val)
Sets the value for the java field
|
String |
toString() |
addInterestingAnnotation, discover, discoverType, getAnnotation, getAnnotations, getConcreteType, getCTor, getDeclaringClass, getField, getFirstFieldName, getFullName, getJavaFieldName, getLoadNames, getTypeParameters, isArray, isMap, isMultipleValues, isReference, isSet, isTransient, isTypeMongoCompatible, putAnnotation, toClasspublic EphemeralMappedField(ParameterizedType t, MappedField mf, Mapper mapper)
t - the parameterized type of the fieldmf - the parent MappedFieldmapper - the Mapper to usepublic EphemeralMappedField(Type t, MappedField mf, Mapper mapper)
t - the type of the fieldmf - the parent MappedFieldmapper - the Mapper to usepublic void addAnnotation(Class<? extends Annotation> clazz)
MappedFieldaddAnnotation in class MappedFieldclazz - the annotation to addpublic void addAnnotation(Class<? extends Annotation> clazz, Annotation ann)
MappedFieldaddAnnotation in class MappedFieldclazz - type of the annotationann - the annotationpublic Object getDbObjectValue(DBObject dbObj)
getDbObjectValue in class MappedFielddbObj - the DBObject get the value frompublic Object getFieldValue(Object instance)
MappedFieldgetFieldValue in class MappedFieldinstance - the instance to usepublic Class getMapKeyClass()
MappedFieldgetMapKeyClass in class MappedFieldpublic String getNameToStore()
getNameToStore in class MappedFieldpublic Class getSubClass()
MappedFieldgetSubClass in class MappedFieldpublic Type getSubType()
MappedFieldgetSubType in class MappedFieldpublic Class getType()
getType in class MappedFieldpublic boolean hasAnnotation(Class ann)
MappedFieldhasAnnotation in class MappedFieldann - the annotation to search forpublic boolean isSingleValue()
isSingleValue in class MappedFieldpublic void setFieldValue(Object instance, Object val)
MappedFieldsetFieldValue in class MappedFieldinstance - the instance to updateval - the value to setpublic String toString()
toString in class MappedFieldprotected String getMappedFieldName()
getMappedFieldName in class MappedFieldpublic MappedField getParent()
public Object getValue()