db4o 5.0

com.db4o.ext
Interface StoredField


public interface StoredField

the internal representation of a field on a stored class.


Method Summary
 java.lang.Object get(java.lang.Object onObject)
          returns the field value on the passed object.
 java.lang.String getName()
          returns the name of the field.
 ReflectClass getStoredType()
          returns the Class (Java) / Type (.NET) of the field.
 boolean isArray()
          returns true if the field is an array.
 void rename(java.lang.String name)
          modifies the name of this stored field.
 

Method Detail

get

java.lang.Object get(java.lang.Object onObject)
returns the field value on the passed object.

This method will also work, if the field is not present in the current version of the class.

It is recommended to use this method for refactoring purposes, if fields are removed and the field values need to be copied to other fields.


getName

java.lang.String getName()
returns the name of the field.


getStoredType

ReflectClass getStoredType()
returns the Class (Java) / Type (.NET) of the field.

For array fields this method will return the type of the array. Use {link #isArray()} to detect arrays.


isArray

boolean isArray()
returns true if the field is an array.


rename

void rename(java.lang.String name)
modifies the name of this stored field.

After renaming one or multiple fields the ObjectContainer has to be closed and reopened to allow internal caches to be refreshed.

Parameters:
name - the new name

db4o 5.0