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