public class PersistentFieldIntrospectorImpl extends PersistentFieldBase
PersistentField
implementation using
JavaBeans compliant calls only to access persistent attributes.
No Reflection is needed. But for each attribute xxx there must be
public getXxx() and setXxx() methods. In metadata the field name must be
the bean compliant 'xxx'.PATH_TOKEN
Constructor and Description |
---|
PersistentFieldIntrospectorImpl() |
PersistentFieldIntrospectorImpl(java.lang.Class aClass,
java.lang.String aPropertyName) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object target)
Returns the value of the field represented by this PersistentField, on the specified object.
|
java.lang.Class |
getType() |
boolean |
makeAccessible()
This implementation returns always 'false'.
|
void |
set(java.lang.Object target,
java.lang.Object value)
Sets the field represented by this PersistentField object on the specified object argument to the specified new value.
|
boolean |
usesAccessorsAndMutators()
Always returns 'false'.
|
getDeclaringClass, getName, toString
public PersistentFieldIntrospectorImpl()
public PersistentFieldIntrospectorImpl(java.lang.Class aClass, java.lang.String aPropertyName)
public java.lang.Class getType()
public void set(java.lang.Object target, java.lang.Object value) throws MetadataException
PersistentField
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 java.lang.Object get(java.lang.Object target) throws MetadataException
PersistentField
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
public boolean makeAccessible()
public boolean usesAccessorsAndMutators()
(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30