|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl
A PersistentField
implementation
is a 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
Field Summary |
Fields inherited from class org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField |
field, fieldName, PATH_TOKEN, PERSISTENT_FIELD_IMPL_FOR_NESTED, rootObjectType |
Constructor Summary | |
PersistentFieldDirectAccessImpl()
|
|
PersistentFieldDirectAccessImpl(java.lang.Class type,
java.lang.String fieldname)
|
Method Summary | |
java.lang.Object |
doGet(java.lang.Object obj)
Returns the value of the field represented by this PersistentField, on the specified object. |
void |
doSet(java.lang.Object obj,
java.lang.Object value)
Sets the field represented by this PersistentField object on the specified object argument to the specified new value. |
protected java.lang.reflect.Field |
getFieldRecursive(java.lang.Class c,
java.lang.String fieldname)
try to find a field in class c, recurse through class hierarchy if necessary |
boolean |
makeAccessible()
This implementation returns always 'false'. |
boolean |
usesAccessorsAndMutators()
Always returns 'false'. |
Methods inherited from class org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField |
buildMessageString, get, getDeclaringClass, getField, getLog, getName, getNestedObject, getType, isNestedField, set, setNestedObject, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PersistentFieldDirectAccessImpl()
public PersistentFieldDirectAccessImpl(java.lang.Class type, java.lang.String fieldname)
Method Detail |
public void doSet(java.lang.Object obj, java.lang.Object value) throws MetadataException
doSet
in class AbstractPersistentField
MetadataException
- if there is an error setting this field value on objField
public java.lang.Object doGet(java.lang.Object obj) throws MetadataException
doGet
in class AbstractPersistentField
obj
- - the object instance which we are trying to get the field value from
MetadataException
- if there is an error getting this field value from objField
protected java.lang.reflect.Field getFieldRecursive(java.lang.Class c, java.lang.String fieldname) throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldException
- if no Field was found into the class hierarchypublic boolean makeAccessible()
makeAccessible
in class AbstractPersistentField
AbstractPersistentField.makeAccessible()
public boolean usesAccessorsAndMutators()
PersistentField.usesAccessorsAndMutators()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |