public class PersistentFieldDynaBeanImpl extends PersistentFieldBase
PersistentField
implementation accesses a property
from a DynaBean
.
Note that because of the way that PersistentField works,
at run time the type of the field could actually be different, since
it depends on the DynaClass of the DynaBean that is given at runtime.
This implementation does not support nested fields.
PATH_TOKEN
Constructor and Description |
---|
PersistentFieldDynaBeanImpl() |
PersistentFieldDynaBeanImpl(java.lang.Class aPropertyType,
java.lang.String aPropertyName) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object anObject)
Returns the value of the field represented by this PersistentField, on the specified object.
|
java.lang.Class |
getType() |
void |
set(java.lang.Object anObject,
java.lang.Object aValue)
Sets the field represented by this PersistentField object on the specified object argument to the specified new value.
|
boolean |
usesAccessorsAndMutators() |
getDeclaringClass, getName, toString
public PersistentFieldDynaBeanImpl()
public PersistentFieldDynaBeanImpl(java.lang.Class aPropertyType, java.lang.String aPropertyName)
public void set(java.lang.Object anObject, java.lang.Object aValue) throws MetadataException
PersistentField
anObject
- The target object (no proxy objects allowed).aValue
- The value to set.MetadataException
- if there is an error setting this field value on objField
public java.lang.Object get(java.lang.Object anObject) throws MetadataException
PersistentField
anObject
- - 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 java.lang.Class getType()
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