org.apache.ojb.broker.metadata.fieldaccess
Class PersistentFieldDirectAccessImplNew

java.lang.Object
  extended byorg.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase
      extended byorg.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImplNew
All Implemented Interfaces:
PersistentField, java.io.Serializable
Direct Known Subclasses:
PersistentFieldPrivilegedImplNew

public class PersistentFieldDirectAccessImplNew
extends PersistentFieldBase

This PersistentField implementation is the 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. Only the the metadata field names have to match the class fields.

Version:
$Id: PersistentFieldDirectAccessImplNew.java,v 1.3 2004/06/27 13:48:32 arminw Exp $
Author:
Armin Waibel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase
PATH_TOKEN
 
Constructor Summary
PersistentFieldDirectAccessImplNew()
           
PersistentFieldDirectAccessImplNew(java.lang.Class type, java.lang.String fieldname)
           
 
Method Summary
 java.lang.Object get(java.lang.Object target)
          do not override this method, have a look at #getValueFrom(java.lang.reflect.Field, java.lang.Object)
 java.lang.Class getType()
           
 void set(java.lang.Object target, java.lang.Object value)
          do not override this method, have a look at #setValueFor(java.lang.reflect.Field, java.lang.Object, java.lang.Object)
 boolean usesAccessorsAndMutators()
          Always returns 'false'.
 
Methods inherited from class org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldBase
getDeclaringClass, getName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentFieldDirectAccessImplNew

public PersistentFieldDirectAccessImplNew()

PersistentFieldDirectAccessImplNew

public PersistentFieldDirectAccessImplNew(java.lang.Class type,
                                          java.lang.String fieldname)
Method Detail

getType

public java.lang.Class getType()

set

public void set(java.lang.Object target,
                java.lang.Object value)
         throws MetadataException
do not override this method, have a look at #setValueFor(java.lang.reflect.Field, java.lang.Object, java.lang.Object)

Throws:
MetadataException - if there is an error setting this field value on obj
See Also:
Field

get

public java.lang.Object get(java.lang.Object target)
                     throws MetadataException
do not override this method, have a look at #getValueFrom(java.lang.reflect.Field, java.lang.Object)

Parameters:
target - - 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

usesAccessorsAndMutators

public boolean usesAccessorsAndMutators()
Always returns 'false'.

See Also:
PersistentField.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