com.ashridgetech.prevdb.client
Class PersistentField

java.lang.Object
  |
  +--com.ashridgetech.prevdb.client.PersistentField

public final class PersistentField
extends Object

A definition of a persistent field of a Persistent class. Can be used with the Persistent interface to get or set fields.

Version:
1.0
Author:
paulb

Constructor Summary
PersistentField(Class persistentClass, String name, int number)
          Creates new PersistentField.
 
Method Summary
 String getName()
          Get the name of the field
 int getNumber()
          Get the number of the field - unique within the class
 Class getPersistentClass()
          Get the class to which this PersistentField belongs
 String toFullString()
          Get a full description including the class name.
 String toString()
          Get a short description of field name and number only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentField

public PersistentField(Class persistentClass,
                       String name,
                       int number)
Creates new PersistentField.

Parameters:
persistentClass - the class of object to which this PersistentField belongs
name - the name of the field - unique within the class
number - the number of the field - unique within the class. Numbers should start from zero, but do not have to be consecutive.
Method Detail

getPersistentClass

public Class getPersistentClass()
Get the class to which this PersistentField belongs

Returns:
the class to which this PersistentField belongs

getName

public String getName()
Get the name of the field

Returns:
the name of the field

getNumber

public int getNumber()
Get the number of the field - unique within the class

Returns:
the number

toString

public String toString()
Get a short description of field name and number only.

Overrides:
toString in class Object

toFullString

public String toFullString()
Get a full description including the class name.



Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.