|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectImpl
public class PersistentFieldDirectImpl
This PersistentField implementation
is the high-speed version of the access strategies.
It does not cooperate with an AccessController,
but accesses the fields directly. This implementation persistent
attributes don't need getters and setters
and don't have to be declared public or protected. Only the the
metadata field names have to match the class fields.
| Field Summary |
|---|
| Fields inherited from class org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase |
|---|
PATH_TOKEN, rootObjectType |
| Constructor Summary | |
|---|---|
PersistentFieldDirectImpl()
|
|
PersistentFieldDirectImpl(Class type,
String fieldname)
|
|
| Method Summary | |
|---|---|
Object |
get(Object target)
do not override this method, have a look at getValueFrom(java.lang.reflect.Field, Object) |
protected Field |
getField()
Returns the underlying field object. |
Class |
getType()
|
protected Object |
getValueFrom(Field field,
Object target)
|
protected boolean |
isNestedField()
|
protected boolean |
makeAccessible()
This implementation returns always 'true'. |
void |
set(Object target,
Object value)
do not override this method, have a look at setValueFor(java.lang.reflect.Field, Object, Object) |
protected void |
setValueFor(Field field,
Object target,
Object value)
|
boolean |
usesAccessorsAndMutators()
Always returns 'false'. |
| Methods inherited from class org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase |
|---|
buildErrorGetMsg, buildErrorSetMsg, getDeclaringClass, getFieldGraph, getLog, getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentFieldDirectImpl()
public PersistentFieldDirectImpl(Class type,
String fieldname)
| Method Detail |
|---|
public Class getType()
protected Field getField()
protected boolean isNestedField()
public void set(Object target,
Object value)
throws MetadataException
setValueFor(java.lang.reflect.Field, Object, Object)
target - The target object (no proxy objects allowed).value - The value to set.
MetadataException - if there is an error setting this field value on objField
public Object get(Object target)
throws MetadataException
getValueFrom(java.lang.reflect.Field, Object)
target - - The object instance (proxy objects are not allowed here) which we are
trying to get the field value from.
MetadataException - if there is an error getting this field value from objField
protected Object getValueFrom(Field field,
Object target)
protected void setValueFor(Field field,
Object target,
Object value)
protected boolean makeAccessible()
makeAccessible in class PersistentFieldBasepublic boolean usesAccessorsAndMutators()
PersistentField.usesAccessorsAndMutators()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||