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

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

public class AnonymousPersistentField
extends java.lang.Object
implements PersistentField

This class handle an anonymous persistent fiels for 1-1 association, and ojbConcreteClass

Version:
$Id: AnonymousPersistentField.java,v 1.11 2004/01/28 20:04:50 arminw Exp $
Author:
Houar TINE
See Also:
Serialized Form

Constructor Summary
AnonymousPersistentField(java.lang.String fieldname)
           
 
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 getDeclaringClass()
          Always returns null.
protected  java.lang.Object getFromFieldCache(java.lang.Object key)
           
 java.lang.String getName()
           
 java.lang.Class getType()
          Always returns null.
protected  void putToFieldCache(java.lang.Object key, java.lang.Object value)
           
 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()
          Returns false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnonymousPersistentField

public AnonymousPersistentField(java.lang.String fieldname)
Method Detail

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.

Specified by:
set in interface PersistentField
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 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.

Specified by:
get in interface PersistentField
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

putToFieldCache

protected void putToFieldCache(java.lang.Object key,
                               java.lang.Object value)

getFromFieldCache

protected java.lang.Object getFromFieldCache(java.lang.Object key)

getDeclaringClass

public java.lang.Class getDeclaringClass()
Always returns null.

Specified by:
getDeclaringClass in interface PersistentField
See Also:
PersistentField.getDeclaringClass()

getName

public java.lang.String getName()
Specified by:
getName in interface PersistentField
See Also:
PersistentField.getName()

getType

public java.lang.Class getType()
Always returns null.

Specified by:
getType in interface PersistentField
See Also:
PersistentField.getType()

usesAccessorsAndMutators

public boolean usesAccessorsAndMutators()
Returns false.

Specified by:
usesAccessorsAndMutators in interface PersistentField
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