org.gjt.tw.dbobjects.test.generic
Class Address

java.lang.Object
  |
  +--org.gjt.tw.dbobjects.StorableObject
        |
        +--org.gjt.tw.dbobjects.test.generic.Address

public class Address
extends StorableObject

Test class containing data of an address. ID is the primary key of this object. The id is genericly generated.


Fields inherited from class org.gjt.tw.dbobjects.StorableObject
isStoredInDatabase
 
Constructor Summary
Address()
          Address constructor comment.
 
Method Summary
static Address getById(long addressId)
          This method was created in VisualAge.
 java.lang.String getCity()
          Returns name of the city.
 java.lang.String getCountry()
          Returns name of the country.
 long getId()
          Returns values of id.
protected  ObjectMapping getMapping()
          Returns object mapping.
 java.lang.String getZip()
          Returns zip code as string.
static void init()
          Initialization of object mapping.
 void setCity(java.lang.String newValue)
          Sets name of the city.
 void setCountry(java.lang.String newValue)
          Sets name of the city.
 void setId(long newValue)
          Sets value of id.
 void setZip(java.lang.String newValue)
          Sets the value of the zip code.
 
Methods inherited from class org.gjt.tw.dbobjects.StorableObject
delete, getDomTree, print, store, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Address

public Address()
Address constructor comment.
Method Detail

setCity

public void setCity(java.lang.String newValue)
Sets name of the city.
Parameters:
newValue - java.lang.String

setCountry

public void setCountry(java.lang.String newValue)
Sets name of the city.
Parameters:
newValue - java.lang.String

setId

public void setId(long newValue)
Sets value of id. This is called automatically when the object is inserted into the databse for the first time.
Parameters:
newValue - long

setZip

public void setZip(java.lang.String newValue)
Sets the value of the zip code.
Parameters:
newValue - java.lang.String

getCity

public java.lang.String getCity()
Returns name of the city.
Returns:
java.lang.String

getCountry

public java.lang.String getCountry()
Returns name of the country.
Returns:
java.lang.String

getId

public long getId()
Returns values of id.
Returns:
long

getZip

public java.lang.String getZip()
Returns zip code as string.
Returns:
java.lang.String

getMapping

protected ObjectMapping getMapping()
Returns object mapping.
Overrides:
getMapping in class StorableObject
Returns:
databasemanagement.ObjectMapping

getById

public static Address getById(long addressId)
                       throws DatabaseException,
                              ObjectException
This method was created in VisualAge.
Parameters:
addressId - long
Returns:
databasemanagement.test.Address
Throws:
DatabaseException - Description of Exception
ObjectException - Description of Exception

init

public static void init()
                 throws ObjectException,
                        IncompleteDefinitionException
Initialization of object mapping. Has to be called once before first use.
Throws:
ObjectException - Description of Exception
IncompleteDefinitionException - Description of Exception