org.gjt.tw.dbobjects.test.mysql
Class CustomerAddress

java.lang.Object
  |
  +--org.gjt.tw.dbobjects.StorableObject
        |
        +--org.gjt.tw.dbobjects.test.mysql.CustomerAddress

public class CustomerAddress
extends StorableObject

This class represents a n-m relation between customers and addresses. It doesn't have any attributes of its own right now, but could easily be enhanced.


Fields inherited from class org.gjt.tw.dbobjects.StorableObject
isStoredInDatabase
 
Constructor Summary
CustomerAddress()
          CustomerAddress constructor comment.
CustomerAddress(Customer customer, Address address)
          CustomerAddress constructor comment.
 
Method Summary
 long getAddressId()
          This method was created in VisualAge.
static CustomerAddress[] getByCustomer(Customer customer)
          This method was created in VisualAge.
 java.lang.String getCustomerName()
          This method was created in VisualAge.
protected  ObjectMapping getMapping()
          Returns object mapping.
static void init()
          Initialization of object mapping.
 void setAddressId(long newValue)
          This method was created in VisualAge.
 void setCustomerName(java.lang.String newValue)
          This method was created in VisualAge.
 
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

CustomerAddress

public CustomerAddress()
CustomerAddress constructor comment.

CustomerAddress

public CustomerAddress(Customer customer,
                       Address address)
CustomerAddress constructor comment.
Parameters:
customer - Description of Parameter
address - Description of Parameter
Method Detail

setAddressId

public void setAddressId(long newValue)
This method was created in VisualAge.
Parameters:
newValue - long

setCustomerName

public void setCustomerName(java.lang.String newValue)
This method was created in VisualAge.
Parameters:
newValue - java.lang.String

getAddressId

public long getAddressId()
This method was created in VisualAge.
Returns:
long

getCustomerName

public java.lang.String getCustomerName()
This method was created in VisualAge.
Returns:
java.lang.String

getMapping

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

getByCustomer

public static CustomerAddress[] getByCustomer(Customer customer)
                                       throws DatabaseException,
                                              ObjectException
This method was created in VisualAge.
Parameters:
customer - dbobjects.test.Customer
Returns:
dbobjects.test.CustomerAddress[]
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