|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldAccessor
This interface is implemented by all classes, that allow access to fileds of an object.
Method Summary | ||
---|---|---|
boolean |
checkMandatory()
Parse all relevant Annotations and try to retrieve a Column
-Annotation and test it's nullable() value. |
|
boolean |
checkUpdatable()
Parse all relevant Annotations and try to retrieve a Column
-Annotation and test it's updatable() value. |
|
|
getAnnotation(java.lang.Class<T> type)
|
|
java.lang.annotation.Annotation[] |
getAnnotations()
|
|
java.lang.Class |
getDeclaringClass()
|
|
FieldAccessor |
getIdAccessor()
Get the accessor used to access the ID-Field of the same POJO this FieldAccessor belongs to. |
|
java.lang.String |
getName()
|
|
java.lang.Class |
getType()
|
|
java.lang.Object |
getValueOf(java.lang.Object pojo)
Gets the associated field value of the given instance of the underlying class. |
|
void |
setIdAccessor(FieldAccessor idAccessor)
Set the accessor used to access the ID-Field of the same POJO this FieldAccessor belongs to. |
|
void |
setValueOn(java.lang.Object pojo,
java.lang.Object value)
Sets the associated field value on the given instance of the underlying class. |
Method Detail |
---|
java.lang.Class getType()
java.lang.Class getDeclaringClass()
<T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> type)
type
- The annotation type to request for.
java.lang.annotation.Annotation[] getAnnotations()
java.lang.String getName()
java.lang.Object getValueOf(java.lang.Object pojo) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
pojo
- The object of which to get the field value.
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
void setValueOn(java.lang.Object pojo, java.lang.Object value) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
pojo
- The object on which to set the field value.value
- The value of the associated field.
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
boolean checkMandatory()
Column
-Annotation and test it's nullable()
value.
true
for primitives,(!Column.nullable())
if a Column
-Annotation could be found,false
otherwise.boolean checkUpdatable()
Column
-Annotation and test it's updatable()
value.
true
for primitives,Column.updatable()
if a Column
-Annotation could be found,true
otherwise.void setIdAccessor(FieldAccessor idAccessor)
FieldAccessor
belongs to.
idAccessor
- The FieldAccessor
for the ID-Field.FieldAccessor getIdAccessor()
FieldAccessor
belongs to.
FieldAccessor
for the ID-Field (may be null).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |