com.ashridgetech.prevdb.test
Class TestClassC

java.lang.Object
  |
  +--com.ashridgetech.prevdb.client.AbstractPersistentObject
        |
        +--com.ashridgetech.prevdb.test.TestClassC
All Implemented Interfaces:
Persistent

public class TestClassC
extends AbstractPersistentObject

Persistent test class for use in unit tests.


Field Summary
static PersistentField DESCRIPTION
           
protected static PersistentField[] PERSISTENT_FIELDS
           
 
Fields inherited from class com.ashridgetech.prevdb.client.AbstractPersistentObject
oid, OID
 
Constructor Summary
TestClassC(PrevDb prevDb)
           
TestClassC(PrevDb prevDb, String description)
           
 
Method Summary
 String getDescription()
          Get the description
protected  Object getJavaField(Field javaField)
          Get the value of a Java field.
protected  PersistentField[] getPersistentFields()
          Provide an array of PersistentFields for this object.
 void setDescription(String description)
          Set the description
protected  void setJavaField(Field javaField, Object value)
          Set the value of a Java field.
 String toString()
           
 
Methods inherited from class com.ashridgetech.prevdb.client.AbstractPersistentObject
getField, getFields, getManager, getOid, getPersistentField, notifyUpdate, notifyUpdate, notifyUpdate, setField, setFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DESCRIPTION

public static final PersistentField DESCRIPTION

PERSISTENT_FIELDS

protected static final PersistentField[] PERSISTENT_FIELDS
Constructor Detail

TestClassC

public TestClassC(PrevDb prevDb)

TestClassC

public TestClassC(PrevDb prevDb,
                  String description)
Method Detail

getPersistentFields

protected PersistentField[] getPersistentFields()
Description copied from class: AbstractPersistentObject
Provide an array of PersistentFields for this object. Must include the persistent fields of the superclass, if any

Overrides:
getPersistentFields in class AbstractPersistentObject
Returns:
the array of PersistentFields

getJavaField

protected Object getJavaField(Field javaField)
                       throws IllegalAccessException
Get the value of a Java field. Must be duplicated in each subclass to avoid access restrictions. The code required is simply return javaField.get( this );

Overrides:
getJavaField in class AbstractPersistentObject
Parameters:
javaField - the Field to get the value of
Returns:
the value
IllegalAccessException

setJavaField

protected void setJavaField(Field javaField,
                            Object value)
                     throws IllegalAccessException
Set the value of a Java field. Must be duplicated in each subclass to avoid access restrictions. The code required is simply javaField.set( this, value );

Overrides:
setJavaField in class AbstractPersistentObject
Parameters:
javaField - the Field to set the value of
value - the value to set
IllegalAccessException

getDescription

public String getDescription()
Get the description

Returns:
the description

setDescription

public void setDescription(String description)
Set the description

Parameters:
description -

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.