org.apache.ojb.broker.metadata.fieldaccess
Class PersistentFieldPrivilegedImpl
java.lang.Object
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl
- All Implemented Interfaces:
- PersistentField, java.io.Serializable
- public class PersistentFieldPrivilegedImpl
- extends PersistentFieldDirectAccessImpl
A PersistentField
implementation using
reflection to access but does cooperate with
AccessController and do not suppress the java
language access check.
- Version:
- $Id: PersistentFieldPrivilegedImpl.java,v 1.8 2004/01/07 19:11:10 arminw Exp $
- Author:
- Thomas Mahler, Armin Waibel
- See Also:
PersistentFieldDirectAccessImpl
,
Serialized Form
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. |
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 |
PersistentFieldPrivilegedImpl
public PersistentFieldPrivilegedImpl()
PersistentFieldPrivilegedImpl
public PersistentFieldPrivilegedImpl(java.lang.Class type,
java.lang.String fieldname)
doSet
public void doSet(java.lang.Object obj,
java.lang.Object value)
throws MetadataException
- Description copied from class:
PersistentFieldDirectAccessImpl
- 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.
- Overrides:
doSet
in class PersistentFieldDirectAccessImpl
- Throws:
MetadataException
- if there is an error setting this field value on obj- See Also:
Field
doGet
public java.lang.Object doGet(java.lang.Object obj)
throws MetadataException
- Description copied from class:
PersistentFieldDirectAccessImpl
- Returns the value of the field represented by this PersistentField, on the specified object.
This implementation invokes get() on its underlying Field object.
- Overrides:
doGet
in class PersistentFieldDirectAccessImpl
- Parameters:
obj
- - 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
makeAccessible
public boolean makeAccessible()
- This implementation returns always 'false'.
- Overrides:
makeAccessible
in class PersistentFieldDirectAccessImpl
- See Also:
AbstractPersistentField.makeAccessible()
usesAccessorsAndMutators
public boolean usesAccessorsAndMutators()
- Always returns 'false'.
- Specified by:
usesAccessorsAndMutators
in interface PersistentField
- Overrides:
usesAccessorsAndMutators
in class PersistentFieldDirectAccessImpl
- See Also:
PersistentField.usesAccessorsAndMutators()
Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14