org.apache.ojb.broker.metadata.fieldaccess
Class PersistentFieldAutoProxyImplNew
java.lang.Object
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImplNew
- All Implemented Interfaces:
- PersistentField, java.io.Serializable
- public class PersistentFieldAutoProxyImplNew
- extends PersistentFieldBase
PeristentField implementation that attempts to detect the nature of
the field it is persisting.
First checks to see if it is a Field, then Property, then DynaBean
It will match in that order.
- See Also:
- Serialized Form
Method Summary |
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 obj,
java.lang.Object value)
Sets the field represented by this PersistentField object on the specified object argument to the specified new value. |
boolean |
usesAccessorsAndMutators()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PersistentFieldAutoProxyImplNew
public PersistentFieldAutoProxyImplNew()
PersistentFieldAutoProxyImplNew
public PersistentFieldAutoProxyImplNew(java.lang.Class clazz,
java.lang.String fieldname)
get
public java.lang.Object get(java.lang.Object anObject)
throws MetadataException
- Description copied from interface:
PersistentField
- Returns the value of the field represented by this PersistentField, on the specified object.
This implementation invokes get() on its underlying Field object.
- Parameters:
anObject
- - the object instance which we are trying to get the field value from
- Throws:
MetadataException
- if there is an error getting this field value from obj- See Also:
Field
set
public void set(java.lang.Object obj,
java.lang.Object value)
throws MetadataException
- Description copied from interface:
PersistentField
- Sets the field represented by this PersistentField object on the specified object argument to the specified new value.
The new value is automatically unwrapped if the underlying field has a primitive type.
This implementation invokes set() on its underlying Field object if the argument is not null.
OBS IllegalArgumentExceptions are wrapped as PersistenceBrokerExceptions.
- Throws:
MetadataException
- if there is an error setting this field value on obj- See Also:
Field
getType
public java.lang.Class getType()
usesAccessorsAndMutators
public boolean usesAccessorsAndMutators()
(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2