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

java.lang.Object
  extended by org.apache.ojb.broker.metadata.fieldaccess.AnonymousPersistentField
All Implemented Interfaces:
Serializable, PersistentField
Direct Known Subclasses:
SuperReferenceDescriptor.SuperReferenceField

public class AnonymousPersistentField
extends Object
implements PersistentField

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

Version:
$Id: AnonymousPersistentField.java,v 1.1 2007-08-24 22:17:35 ewestfal Exp $
Author:
Houar TINE
See Also:
Serialized Form

Constructor Summary
AnonymousPersistentField(String fieldname)
           
 
Method Summary
 Object get(Object anObject)
          Returns the value of the field represented by this PersistentField, on the specified object.
 Class getDeclaringClass()
          Always returns null.
protected  Object getFromFieldCache(Object key)
           
 String getName()
           
 Class getType()
          Always returns null.
protected  void putToFieldCache(Object key, Object value)
           
 void set(Object obj, 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(String fieldname)
Method Detail

set

public void set(Object obj,
                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
Parameters:
obj - The target object (no proxy objects allowed).
value - The value to set.
Throws:
MetadataException - if there is an error setting this field value on obj
See Also:
Field

get

public Object get(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 (proxy objects are not allowed here) 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(Object key,
                               Object value)

getFromFieldCache

protected Object getFromFieldCache(Object key)

getDeclaringClass

public Class getDeclaringClass()
Always returns null.

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

getName

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

getType

public 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()


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.