Class COM.odi.Field

java.lang.Object
   |
   +----COM.odi.Field

public class Field
extends Object
The Field class represents a Java field in a persistent object. Normally, you do not need to be concerned with this class. When you run the Class File Postprocessor after you compile your source files, the postprocessor annotates your class files to allow persistent storage. These annotations include references to the Field class.

Under exceptional circumstances, you might annotate your classes yourself. If you do then you must be familiar with the Field class.

The ClassField and ArrayField subtypes represent the reference and array composite types. The Field class provides a create method for each Java data type. There are separate create methods for singleton and array fields of each primitive type.

You should not create subclasses of the Field class.

Additional information about fields is in Chapter 9 of the API User Guide.


Method Index

 o createBoolean(String)
Creates a Field object that can hold a single Boolean value.
 o createBooleanArray(String, int)
Creates a Field object that can hold an array of Boolean values.
 o createByte(String)
Creates a Field object that can hold a single byte.
 o createByteArray(String, int)
Creates a Field object that can hold an array of bytes.
 o createChar(String)
Creates a Field object that can hold a single character.
 o createCharArray(String, int)
Creates a Field object that can hold an array of characters.
 o createClass(String, String)
Creates a Field object that can hold a reference to a class.
 o createClassArray(String, String, int)
Creates a Field object that can hold an array of references to a class.
 o createDouble(String)
Creates a Field object that can hold a single 64-bit floating-point value.
 o createDoubleArray(String, int)
Creates a Field object that can hold an array of 64-bit floating-point values.
 o createFloat(String)
Creates a Field object that can hold a single 32-bit floating-point value.
 o createFloatArray(String, int)
Creates a Field object that can hold an array of 32-bit floating point values.
 o createInt(String)
Creates a Field object that can hold a 32-bit integer.
 o createIntArray(String, int)
Creates a Field object that can hold an array of 32-bit integers.
 o createInterface(String, String)
Creates a Field object that can hold a reference to an interface.
 o createInterfaceArray(String, String, int)
Creates a Field object that can hold an array of references to an interface.
 o createLazyReference(String)
Creates a Field object that can hold a lazy reference to an object.
 o createLong(String)
Creates a Field object that can hold a single 64-bit integer.
 o createLongArray(String, int)
Creates a Field object that can hold an array of 64-bit integers.
 o createShort(String)
Creates a Field object that can hold a 16-bit integer.
 o createShortArray(String, int)
Creates a Field object that can hold an array of 16-bit integers.
 o createString(String)
Creates a Field object that can hold a single string value.
 o createStringArray(String, int)
Creates a Field object that can hold an array of string values.

Methods

 o createByte
  public static Field createByte(String fieldName)
Creates a Field object that can hold a single byte.

Parameters:
fieldName - The name of the field.

Returns:
The byte field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createChar
  public static Field createChar(String fieldName)
Creates a Field object that can hold a single character.

Parameters:
fieldName - The name of the field.

Returns:
The character field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createShort
  public static Field createShort(String fieldName)
Creates a Field object that can hold a 16-bit integer.

Parameters:
fieldName - The name of the field.

Returns:
The short integer field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createInt
  public static Field createInt(String fieldName)
Creates a Field object that can hold a 32-bit integer.

Parameters:
fieldName - The name of the field.

Returns:
The integer field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createLong
  public static Field createLong(String fieldName)
Creates a Field object that can hold a single 64-bit integer.

Parameters:
fieldName - The name of the field.

Returns:
The long integer field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createFloat
  public static Field createFloat(String fieldName)
Creates a Field object that can hold a single 32-bit floating-point value.

Parameters:
fieldName - The name of the field.

Returns:
The floating-point field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createDouble
  public static Field createDouble(String fieldName)
Creates a Field object that can hold a single 64-bit floating-point value.

Parameters:
fieldName - The name of the field.

Returns:
The double floating-point field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createBoolean
  public static Field createBoolean(String fieldName)
Creates a Field object that can hold a single Boolean value.

Parameters:
fieldName - The name of the field.

Returns:
The Boolean field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createString
  public static Field createString(String fieldName)
Creates a Field object that can hold a single string value.

Parameters:
fieldName - The name of the field.

Returns:
The string field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createClass
  public static Field createClass(String fieldName,
                                  String className)
Creates a Field object that can hold a reference to a class.

Parameters:
fieldName - The name of the field.

className - The fully qualified name of the class, including the package, that is referenced.

Returns:
The class reference field object.

Throws: NullPointerException
If the fieldName argument or the className argument is null.
 o createInterface
  public static Field createInterface(String fieldName,
                                      String interfaceName)
Creates a Field object that can hold a reference to an interface.

Parameters:
fieldName - The name of the field.

interfaceName - The fully qualified name of the interface, including the package, that is referenced.

Returns:
The interface reference field object.

Throws: NullPointerException
If the fieldName argument or the interfaceName argument is null.
 o createLazyReference
  public static Field createLazyReference(String fieldName)
Creates a Field object that can hold a lazy reference to an object. A lazy reference is represent as an "int" field in Java.

Parameters:
fieldName - The name of the field.

Returns:
The lazy reference field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createByteArray
  public static Field createByteArray(String fieldName,
                                      int dimensions)
Creates a Field object that can hold an array of bytes.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The byte array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createCharArray
  public static Field createCharArray(String fieldName,
                                      int dimensions)
Creates a Field object that can hold an array of characters.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The character array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createShortArray
  public static Field createShortArray(String fieldName,
                                       int dimensions)
Creates a Field object that can hold an array of 16-bit integers.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The short integer array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createIntArray
  public static Field createIntArray(String fieldName,
                                     int dimensions)
Creates a Field object that can hold an array of 32-bit integers.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The integer array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createLongArray
  public static Field createLongArray(String fieldName,
                                      int dimensions)
Creates a Field object that can hold an array of 64-bit integers.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The long integer array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createFloatArray
  public static Field createFloatArray(String fieldName,
                                       int dimensions)
Creates a Field object that can hold an array of 32-bit floating point values.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The floating-point array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createDoubleArray
  public static Field createDoubleArray(String fieldName,
                                        int dimensions)
Creates a Field object that can hold an array of 64-bit floating-point values.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The double array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createBooleanArray
  public static Field createBooleanArray(String fieldName,
                                         int dimensions)
Creates a Field object that can hold an array of Boolean values.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The Boolean array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createStringArray
  public static Field createStringArray(String fieldName,
                                        int dimensions)
Creates a Field object that can hold an array of string values.

Parameters:
fieldName - The name of the field.

dimensions - The number of array dimensions.

Returns:
The string array field object.

Throws: NullPointerException
If the fieldName argument is null.
 o createClassArray
  public static Field createClassArray(String fieldName,
                                       String className,
                                       int dimensions)
Creates a Field object that can hold an array of references to a class.

Parameters:
fieldName - The name of the field.

className - The fully qualified name of the class, including the package, that is being referenced.

dimensions - The number of array dimensions.

Returns:
The class references array field object.

Throws: NullPointerException
If the fieldName argument or the className argument is null.
 o createInterfaceArray
  public static Field createInterfaceArray(String fieldName,
                                           String interfaceName,
                                           int dimensions)
Creates a Field object that can hold an array of references to an interface.

Parameters:
fieldName - The name of the field.

interfaceName - The fully qualified name of the interface, including the package, that is being referenced.

dimensions - The number of array dimensions.

Returns:
The interface references array field object.

Throws: NullPointerException
If the fieldName argument or the interfaceName argument is null.

Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.