com.objectwave.persist.xml.test
Class Person

java.lang.Object
  |
  +--com.objectwave.persist.examples.DomainObject
        |
        +--com.objectwave.persist.xml.test.Person
All Implemented Interfaces:
Persistence, java.io.Serializable, TransactionalObjectIF

public class Person
extends DomainObject

A simple persistent object defined by the Person.xml file.

Version:
$Id: Person.java,v 1.2 2002/03/09 17:13:47 dave_hoag Exp $
Author:
cson
See Also:
Serialized Form

Nested Class Summary
static class Person.Test
           
 
Nested classes inherited from class com.objectwave.persist.examples.DomainObject
DomainObject.Test
 
Field Summary
static java.lang.reflect.Field _age
           
static java.lang.reflect.Field _firstname
           
static java.lang.reflect.Field _lastname
           
static java.lang.reflect.Field _personPhone
           
static java.lang.reflect.Field _personPhone2
           
 
Fields inherited from class com.objectwave.persist.examples.DomainObject
adapt, editor, objectIdentifier, tableMap
 
Constructor Summary
Person()
          Constructor for the Person object
 
Method Summary
 int getAge()
          Gets the Age attribute of the Person object
protected  java.util.Vector getClassDescriptor()
          Use an instance method to access a static variable.
 java.lang.String getFirstName()
          Gets the FirstName attribute of the Person object
 java.lang.String getLastName()
          Gets the LastName attribute of the Person object
 java.util.Vector getPersonPhone()
          Gets the PersonPhone attribute of the Person object
 PersonPhone getPersonPhone2()
          Gets the PersonPhone2 attribute of the Person object
protected  java.lang.String getTableName()
          Use an instance method to access a static variable.
 void setAge(int aValue)
          Sets the Age attribute of the Person object
protected  void setClassDescriptor(java.util.Vector v)
          Use an instance method to access a static variable.
 void setFirstName(java.lang.String aValue)
          Sets the FirstName attribute of the Person object
 void setLastName(java.lang.String aValue)
          Sets the LastName attribute of the Person object
 void setPersonPhone(java.util.Vector aValue)
          Sets the PersonPhone attribute of the Person object
 void setPersonPhone2(PersonPhone aValue)
          Sets the PersonPhone2 attribute of the Person object
protected  void setTableName(java.lang.String table)
          Use an instance method to access a static variable.
 void update(boolean get, java.lang.Object[] data, java.lang.reflect.Field[] fields)
          Method no longer does anything since setAccessible solves our need for this behavior.
 
Methods inherited from class com.objectwave.persist.examples.DomainObject
addDefaultPrimaryAttribute, createAdapter, delete, getAdapter, getBrokerName, getEntry, getObjectEditor, getObjectIdentifier, getPrimaryKeyField, getPrimaryKeyFields, getSuperDescriptor, getXmlDefinition, initDescription, initDescriptor, initializeObjectEditor, initializeObjectEditor, insert, isDirty, isRetrievedFromDatabase, isTransient, locateXmlMap, lock, markForDelete, save, setAsTransient, setBrokerName, setEntry, setObjectEditor, setObjectIdentifier, setPrimaryKeyField, setPrintString, setRetrievedFromDatabase, toString, unlock, usesAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_age

public static java.lang.reflect.Field _age

_firstname

public static java.lang.reflect.Field _firstname

_lastname

public static java.lang.reflect.Field _lastname

_personPhone

public static java.lang.reflect.Field _personPhone

_personPhone2

public static java.lang.reflect.Field _personPhone2
Constructor Detail

Person

public Person()
       throws java.lang.Exception
Constructor for the Person object

Throws:
java.lang.Exception
Method Detail

getAge

public int getAge()
Gets the Age attribute of the Person object

Returns:
The Age value

getClassDescriptor

protected java.util.Vector getClassDescriptor()
Use an instance method to access a static variable. This method MUST be duplicated in each and every subclass. This allows our generic logic in this super class to modify static state in a subclass.

Overrides:
getClassDescriptor in class DomainObject
Returns:
The ClassDescriptor value

getFirstName

public java.lang.String getFirstName()
Gets the FirstName attribute of the Person object

Returns:
The FirstName value

getLastName

public java.lang.String getLastName()
Gets the LastName attribute of the Person object

Returns:
The LastName value

getPersonPhone

public java.util.Vector getPersonPhone()
Gets the PersonPhone attribute of the Person object

Returns:
The PersonPhone value

getPersonPhone2

public PersonPhone getPersonPhone2()
Gets the PersonPhone2 attribute of the Person object

Returns:
The PersonPhone2 value

getTableName

protected java.lang.String getTableName()
Use an instance method to access a static variable. This method MUST be duplicated in each and every subclass. This allows our generic logic in this super class to modify static state in a subclass.

Overrides:
getTableName in class DomainObject
Returns:
The TableName value

setAge

public void setAge(int aValue)
Sets the Age attribute of the Person object

Parameters:
aValue - The new Age value

setClassDescriptor

protected void setClassDescriptor(java.util.Vector v)
Use an instance method to access a static variable. This method MUST be duplicated in each and every subclass. This allows our generic logic in this super class to modify static state in a subclass.

Overrides:
setClassDescriptor in class DomainObject
Parameters:
v - The new ClassDescriptor value

setFirstName

public void setFirstName(java.lang.String aValue)
Sets the FirstName attribute of the Person object

Parameters:
aValue - The new FirstName value

setLastName

public void setLastName(java.lang.String aValue)
Sets the LastName attribute of the Person object

Parameters:
aValue - The new LastName value

setPersonPhone

public void setPersonPhone(java.util.Vector aValue)
Sets the PersonPhone attribute of the Person object

Parameters:
aValue - The new PersonPhone value

setPersonPhone2

public void setPersonPhone2(PersonPhone aValue)
Sets the PersonPhone2 attribute of the Person object

Parameters:
aValue - The new PersonPhone2 value

setTableName

protected void setTableName(java.lang.String table)
Use an instance method to access a static variable. This method MUST be duplicated in each and every subclass. This allows our generic logic in this super class to modify static state in a subclass.

Overrides:
setTableName in class DomainObject
Parameters:
table - The new TableName value

update

public void update(boolean get,
                   java.lang.Object[] data,
                   java.lang.reflect.Field[] fields)
Description copied from class: DomainObject
Method no longer does anything since setAccessible solves our need for this behavior.

Specified by:
update in interface TransactionalObjectIF
Overrides:
update in class DomainObject
Parameters:
get -
data -
fields -