PSE 2000 Group 4

jobmatch.data
Class AdressBDO

java.lang.Object
  |
  +--jobmatch.data.AdressBDO
Direct Known Subclasses:
Address

public class AdressBDO
extends Object
implements Serializable

AdressBDO contains the same set and get methods as the AdressDO class. Business Object (BO) classes typically need these set and get methods. So by deriving a BO from a BDO, or by implementing a BO that contains a BDO, the developer of the BO is spared some work.

Version:
$Revision: 1.2 $
See Also:
Serialized Form

Field Summary
protected  AdressDO DO
          The AdressDO object upon which the set and get methods operate.
 
Constructor Summary
AdressBDO()
          Constructor required by AdressBDO.create methods.
AdressBDO(AdressDO DO)
          Constructor for use by classes derived from AdressBDO.
 
Method Summary
 void addCandidateBDO(CandidateBDO rbdo)
          Add (set & commit) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
 void addCandidateBDO(CandidateBDO rbdo, jobmatch.data.DBTransaction tran)
          Add (set & commit) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
 void addCompanyBDO(CompanyBDO rbdo)
          Add (set & commit) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
 void addCompanyBDO(CompanyBDO rbdo, jobmatch.data.DBTransaction tran)
          Add (set & commit) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
 void addEmployerBDO(EmployerBDO rbdo)
          Add (set & commit) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
 void addEmployerBDO(EmployerBDO rbdo, jobmatch.data.DBTransaction tran)
          Add (set & commit) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
 void addPersonBDO(PersonBDO rbdo)
          Add (set & commit) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
 void addPersonBDO(PersonBDO rbdo, jobmatch.data.DBTransaction tran)
          Add (set & commit) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
protected  void afterAnySet()
           
protected  void beforeAnyGet()
          The developer of a Business Object that derives from this class can override the methods: beforeAnyGet beforeAnySet afterAnySet to handle any general assertions or cleanup needed for get and set methods.
protected  void beforeAnySet()
           
 void commit()
          Inserts/Updates the DO into its table.
 void commit(jobmatch.data.DBTransaction dbt)
          Inserts/Updates the DO into its table.
static AdressBDO createExisting(AdressDO DO)
          The createExisting method is used to create a AdressBDO from a AdressDO that was returned by the AdressQuery class.
static AdressBDO createVirgin()
          Like the class AdressDO, this class acts as a factory.
 void delete()
          Deletes the DO from its table.
 void delete(jobmatch.data.DBTransaction dbt)
          Deletes the DO from its table.
static AdressBDO[] getBDOarray()
          The getBDOarray method performs a database query to return an array of AdressBDO objects representing all the rows in the Adress table.
 CandidateBDO getCandidateBDO()
          Get the single CandidateBDO object holding a CandidateDO object that refers to the DO held by this BDO.
 CandidateBDO[] getCandidateBDOArray()
          Get array of CandidateBDO objects holding CandidateDO objects that refer to the DO held by this BDO.
 CandidateDO getCandidateDO()
          Get the single CandidateDO object that refers to the DO held by this BDO.
 CandidateDO[] getCandidateDOArray()
          Get array of CandidateDO objects that refer to the DO held by this BDO.
 String getCity()
          Get City of the AdressDO
 CompanyBDO getCompanyBDO()
          Get the single CompanyBDO object holding a CompanyDO object that refers to the DO held by this BDO.
 CompanyBDO[] getCompanyBDOArray()
          Get array of CompanyBDO objects holding CompanyDO objects that refer to the DO held by this BDO.
 CompanyDO getCompanyDO()
          Get the single CompanyDO object that refers to the DO held by this BDO.
 CompanyDO[] getCompanyDOArray()
          Get array of CompanyDO objects that refer to the DO held by this BDO.
 CountryDO getCountry()
          Get Country of the AdressDO
 CountryBDO getCountryBDO()
          Get BDO-wrapped Country of the AdressDO
 AdressDO getDO()
          Note: This method is intended for use only by other BDO classes.
 EmployerBDO getEmployerBDO()
          Get the single EmployerBDO object holding a EmployerDO object that refers to the DO held by this BDO.
 EmployerBDO[] getEmployerBDOArray()
          Get array of EmployerBDO objects holding EmployerDO objects that refer to the DO held by this BDO.
 EmployerDO getEmployerDO()
          Get the single EmployerDO object that refers to the DO held by this BDO.
 EmployerDO[] getEmployerDOArray()
          Get array of EmployerDO objects that refer to the DO held by this BDO.
 String getHandle()
          The methods getHandle hasMatchingHandle are used by Presentation Objects that need to populate HTML select lists with AdressBDO objects as options.
 String getHouseNumber()
          Get HouseNumber of the AdressDO
 IndustryDO[] getIndustryDOArray_via_Company()
          From the many-to-many relationship expressed by CompanyDO, get array of IndustryDO objects that indirectly refer to the DO held by this BDO.
 PersonBDO getPersonBDO()
          Get the single PersonBDO object holding a PersonDO object that refers to the DO held by this BDO.
 PersonBDO[] getPersonBDOArray()
          Get array of PersonBDO objects holding PersonDO objects that refer to the DO held by this BDO.
 PersonDO getPersonDO()
          Get the single PersonDO object that refers to the DO held by this BDO.
 PersonDO[] getPersonDOArray()
          Get array of PersonDO objects that refer to the DO held by this BDO.
 String getStreet()
          Get Street of the AdressDO
 String getZIP()
          Get ZIP of the AdressDO
 boolean hasMatchingHandle(String handle)
           
 void mapIndustry_via_CompanyBDO(IndustryBDO b)
          To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
 void mapIndustry_via_CompanyBDO(IndustryBDO b, jobmatch.data.DBTransaction tran)
          To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
 void mapIndustry_via_CompanyDO(IndustryDO d)
          To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
 void mapIndustry_via_CompanyDO(IndustryDO d, jobmatch.data.DBTransaction tran)
          To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
protected  void modifyDO(jobmatch.data.DBTransaction dbt, boolean delete)
          Modifies the DO within its table.
protected  void okToCommitCountry(CountryDO member)
          A stub method for implementing pre-commit assertions for the Country data member.
protected  void okToDeleteCountry(CountryDO member)
          A stub method for implementing pre-delete assertions for the Country data member.
 void removeCandidateBDO(CandidateBDO rbdo)
          Remove (delete) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
 void removeCandidateBDO(CandidateBDO rbdo, jobmatch.data.DBTransaction tran)
          Remove (delete) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
 void removeCompanyBDO(CompanyBDO rbdo)
          Remove (delete) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
 void removeCompanyBDO(CompanyBDO rbdo, jobmatch.data.DBTransaction tran)
          Remove (delete) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
 void removeEmployerBDO(EmployerBDO rbdo)
          Remove (delete) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
 void removeEmployerBDO(EmployerBDO rbdo, jobmatch.data.DBTransaction tran)
          Remove (delete) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
 void removePersonBDO(PersonBDO rbdo)
          Remove (delete) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
 void removePersonBDO(PersonBDO rbdo, jobmatch.data.DBTransaction tran)
          Remove (delete) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
 void setCity(String City)
          Set City of the AdressDO
 void setCountry(CountryBDO Country)
          Set Country of the AdressDO
 void setCountry(CountryDO Country)
          Set Country of the AdressDO
 void setHouseNumber(String HouseNumber)
          Set HouseNumber of the AdressDO
 void setStreet(String Street)
          Set Street of the AdressDO
 void setZIP(String ZIP)
          Set ZIP of the AdressDO
 String toString()
          for debugging
 void unmapIndustry_via_CompanyBDO(IndustryBDO b)
          From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
 void unmapIndustry_via_CompanyBDO(IndustryBDO b, jobmatch.data.DBTransaction tran)
          From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
 void unmapIndustry_via_CompanyDO(IndustryDO d)
          From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
 void unmapIndustry_via_CompanyDO(IndustryDO d, jobmatch.data.DBTransaction tran)
          From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DO

protected AdressDO DO
The AdressDO object upon which the set and get methods operate. This member is protected so that classes derived from AdressBDO can access the underlying Data Object.
Constructor Detail

AdressBDO

public AdressBDO(AdressDO DO)
Constructor for use by classes derived from AdressBDO. Example usage: class CustomerBO extends CustomerBDO { // a BDO class is commonly extended in order to implement: public void beforeAnySet() throws Exception { if ( CustomerDO should not be altered ) throw new ApplicationException( "ERROR" ); } public CustomerBO( CustomerDO DO ) { super( DO ); } } class SomePresentationLayerClass { public CustomerBO findCustomer( String name ) { CustomerQuery q = new CustomerQuery(); q.setQueryName( name ); CustomerDO DO = q.getNextDO(); // Here the CustomerBO ctor fires the CustomerBDO ctor. return new CustomerBO( DO ); } }

AdressBDO

public AdressBDO()
          throws Exception
Constructor required by AdressBDO.create methods.
Method Detail

getDO

public AdressDO getDO()
Note: This method is intended for use only by other BDO classes. Presentation Layer classes should (theoretically) always use the Business Layer (BDO) to create/access Data Layer (DO) objects. The overhead for using BDO objects is small (the BDO classes are fairly lightweight.)
Returns:
The DO object held by this BDO object.

createVirgin

public static AdressBDO createVirgin()
                              throws Exception
Like the class AdressDO, this class acts as a factory. Business Object (BO) classes typically need these set and get methods. So by deriving a BO from a BDO, or by implementing a BO that contains one or more BDOs, the developer of the BO is spared some work.
Throws:
Exception - If an error occurs.

createExisting

public static AdressBDO createExisting(AdressDO DO)
The createExisting method is used to create a AdressBDO from a AdressDO that was returned by the AdressQuery class.

getBDOarray

public static AdressBDO[] getBDOarray()
                               throws jobmatch.data.DataObjectException
The getBDOarray method performs a database query to return an array of AdressBDO objects representing all the rows in the Adress table. This method is a minimal example of using a Query class. To restrict the set of objects returned, you could invoke query.setXxx(), where Xxx is an Attribute of AdressDO which was marked as "Can be queried" in the DODS Attribute Editor.
Throws:
jobmatch.data.DataObjectException - If an object is not found in the database.

beforeAnyGet

protected void beforeAnyGet()
The developer of a Business Object that derives from this class can override the methods: beforeAnyGet beforeAnySet afterAnySet to handle any general assertions or cleanup needed for get and set methods.

beforeAnySet

protected void beforeAnySet()
                     throws Exception

afterAnySet

protected void afterAnySet()

getHandle

public String getHandle()
                 throws jobmatch.data.DatabaseManagerException
The methods getHandle hasMatchingHandle are used by Presentation Objects that need to populate HTML select lists with AdressBDO objects as options. The getHandle() method is used to set the value for each option, and the hasMatchingHandle() methods are used to lookup the Data Object when the selection has been made. This AdressBDO object holds a reference to a AdressDO object. The id of this AdressBDO is the id of its AdressDO.
Returns:
id of this BDO as a string If an object id can't be allocated for this object.
Throws:
jobmatch.data.DatabaseManagerException - If a connection to the database cannot be established, etc.

hasMatchingHandle

public boolean hasMatchingHandle(String handle)
Parameters:
handle - String representation of the id for this BDO
Returns:
boolean True if the string version of the id of this DO matches passed handle
See Also:
getHandle

toString

public String toString()
for debugging
Overrides:
toString in class Object

getStreet

public String getStreet()
                 throws jobmatch.data.DataObjectException
Get Street of the AdressDO
Returns:
Street of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setStreet

public void setStreet(String Street)
               throws jobmatch.data.DataObjectException
Set Street of the AdressDO
Parameters:
Street - of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getHouseNumber

public String getHouseNumber()
                      throws jobmatch.data.DataObjectException
Get HouseNumber of the AdressDO
Returns:
HouseNumber of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setHouseNumber

public void setHouseNumber(String HouseNumber)
                    throws jobmatch.data.DataObjectException
Set HouseNumber of the AdressDO
Parameters:
HouseNumber - of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getZIP

public String getZIP()
              throws jobmatch.data.DataObjectException
Get ZIP of the AdressDO
Returns:
ZIP of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setZIP

public void setZIP(String ZIP)
            throws jobmatch.data.DataObjectException
Set ZIP of the AdressDO
Parameters:
ZIP - of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCity

public String getCity()
               throws jobmatch.data.DataObjectException
Get City of the AdressDO
Returns:
City of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setCity

public void setCity(String City)
             throws jobmatch.data.DataObjectException
Set City of the AdressDO
Parameters:
City - of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCountry

public CountryDO getCountry()
                     throws jobmatch.data.DataObjectException
Get Country of the AdressDO
Returns:
Country of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setCountry

public void setCountry(CountryDO Country)
                throws jobmatch.data.DataObjectException
Set Country of the AdressDO
Parameters:
Country - of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCountryBDO

public CountryBDO getCountryBDO()
                         throws jobmatch.data.DataObjectException
Get BDO-wrapped Country of the AdressDO
Returns:
BDO-wrapped Country of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setCountry

public void setCountry(CountryBDO Country)
                throws jobmatch.data.DataObjectException
Set Country of the AdressDO
Parameters:
BDO-wrapped - Country of the AdressDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCandidateDOArray

public CandidateDO[] getCandidateDOArray()
                                  throws jobmatch.data.DataObjectException,
                                         jobmatch.data.QueryException
Get array of CandidateDO objects that refer to the DO held by this BDO.
Returns:
array of CandidateDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCandidateDO

public CandidateDO getCandidateDO()
                           throws jobmatch.data.DataObjectException,
                                  jobmatch.data.NonUniqueQueryException,
                                  jobmatch.data.QueryException
Get the single CandidateDO object that refers to the DO held by this BDO.
Returns:
CandidateDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one CandidateDO object was found.

getCandidateBDOArray

public CandidateBDO[] getCandidateBDOArray()
                                    throws jobmatch.data.DataObjectException,
                                           jobmatch.data.QueryException
Get array of CandidateBDO objects holding CandidateDO objects that refer to the DO held by this BDO.
Returns:
array of CandidateBDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCandidateBDO

public CandidateBDO getCandidateBDO()
                             throws jobmatch.data.DataObjectException,
                                    jobmatch.data.NonUniqueQueryException,
                                    jobmatch.data.QueryException
Get the single CandidateBDO object holding a CandidateDO object that refers to the DO held by this BDO.
Returns:
CandidateBDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one CandidateBDO object was found.

addCandidateBDO

public void addCandidateBDO(CandidateBDO rbdo)
                     throws SQLException,
                            jobmatch.data.DatabaseManagerException,
                            jobmatch.data.DataObjectException,
                            jobmatch.data.RefAssertionException,
                            jobmatch.data.DBRowUpdateException,
                            jobmatch.data.QueryException
Add (set & commit) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
Parameters:
rbdo - CandidateBDO to be set to point to this BDO and committed.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

addCandidateBDO

public void addCandidateBDO(CandidateBDO rbdo,
                            jobmatch.data.DBTransaction tran)
                     throws SQLException,
                            jobmatch.data.DatabaseManagerException,
                            jobmatch.data.DataObjectException,
                            jobmatch.data.RefAssertionException,
                            jobmatch.data.DBRowUpdateException,
                            jobmatch.data.QueryException
Add (set & commit) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
Parameters:
rbdo - CandidateBDO to be set to point to this BDO and committed.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removeCandidateBDO

public void removeCandidateBDO(CandidateBDO rbdo)
                        throws SQLException,
                               jobmatch.data.DatabaseManagerException,
                               jobmatch.data.DataObjectException,
                               jobmatch.data.RefAssertionException,
                               jobmatch.data.DBRowUpdateException,
                               jobmatch.data.QueryException
Remove (delete) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
Parameters:
r - CandidateBDO to be deleted.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removeCandidateBDO

public void removeCandidateBDO(CandidateBDO rbdo,
                               jobmatch.data.DBTransaction tran)
                        throws SQLException,
                               jobmatch.data.DatabaseManagerException,
                               jobmatch.data.DataObjectException,
                               jobmatch.data.RefAssertionException,
                               jobmatch.data.DBRowUpdateException,
                               jobmatch.data.QueryException
Remove (delete) a CandidateBDO object whose CandidateDO refers to the DO held by this BDO.
Parameters:
r - CandidateBDO to be deleted.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

getCompanyDOArray

public CompanyDO[] getCompanyDOArray()
                              throws jobmatch.data.DataObjectException,
                                     jobmatch.data.QueryException
Get array of CompanyDO objects that refer to the DO held by this BDO.
Returns:
array of CompanyDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCompanyDO

public CompanyDO getCompanyDO()
                       throws jobmatch.data.DataObjectException,
                              jobmatch.data.NonUniqueQueryException,
                              jobmatch.data.QueryException
Get the single CompanyDO object that refers to the DO held by this BDO.
Returns:
CompanyDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one CompanyDO object was found.

getCompanyBDOArray

public CompanyBDO[] getCompanyBDOArray()
                                throws jobmatch.data.DataObjectException,
                                       jobmatch.data.QueryException
Get array of CompanyBDO objects holding CompanyDO objects that refer to the DO held by this BDO.
Returns:
array of CompanyBDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCompanyBDO

public CompanyBDO getCompanyBDO()
                         throws jobmatch.data.DataObjectException,
                                jobmatch.data.NonUniqueQueryException,
                                jobmatch.data.QueryException
Get the single CompanyBDO object holding a CompanyDO object that refers to the DO held by this BDO.
Returns:
CompanyBDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one CompanyBDO object was found.

addCompanyBDO

public void addCompanyBDO(CompanyBDO rbdo)
                   throws SQLException,
                          jobmatch.data.DatabaseManagerException,
                          jobmatch.data.DataObjectException,
                          jobmatch.data.RefAssertionException,
                          jobmatch.data.DBRowUpdateException,
                          jobmatch.data.QueryException
Add (set & commit) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
Parameters:
rbdo - CompanyBDO to be set to point to this BDO and committed.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

addCompanyBDO

public void addCompanyBDO(CompanyBDO rbdo,
                          jobmatch.data.DBTransaction tran)
                   throws SQLException,
                          jobmatch.data.DatabaseManagerException,
                          jobmatch.data.DataObjectException,
                          jobmatch.data.RefAssertionException,
                          jobmatch.data.DBRowUpdateException,
                          jobmatch.data.QueryException
Add (set & commit) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
Parameters:
rbdo - CompanyBDO to be set to point to this BDO and committed.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removeCompanyBDO

public void removeCompanyBDO(CompanyBDO rbdo)
                      throws SQLException,
                             jobmatch.data.DatabaseManagerException,
                             jobmatch.data.DataObjectException,
                             jobmatch.data.RefAssertionException,
                             jobmatch.data.DBRowUpdateException,
                             jobmatch.data.QueryException
Remove (delete) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
Parameters:
r - CompanyBDO to be deleted.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removeCompanyBDO

public void removeCompanyBDO(CompanyBDO rbdo,
                             jobmatch.data.DBTransaction tran)
                      throws SQLException,
                             jobmatch.data.DatabaseManagerException,
                             jobmatch.data.DataObjectException,
                             jobmatch.data.RefAssertionException,
                             jobmatch.data.DBRowUpdateException,
                             jobmatch.data.QueryException
Remove (delete) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
Parameters:
r - CompanyBDO to be deleted.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

getEmployerDOArray

public EmployerDO[] getEmployerDOArray()
                                throws jobmatch.data.DataObjectException,
                                       jobmatch.data.QueryException
Get array of EmployerDO objects that refer to the DO held by this BDO.
Returns:
array of EmployerDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getEmployerDO

public EmployerDO getEmployerDO()
                         throws jobmatch.data.DataObjectException,
                                jobmatch.data.NonUniqueQueryException,
                                jobmatch.data.QueryException
Get the single EmployerDO object that refers to the DO held by this BDO.
Returns:
EmployerDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one EmployerDO object was found.

getEmployerBDOArray

public EmployerBDO[] getEmployerBDOArray()
                                  throws jobmatch.data.DataObjectException,
                                         jobmatch.data.QueryException
Get array of EmployerBDO objects holding EmployerDO objects that refer to the DO held by this BDO.
Returns:
array of EmployerBDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getEmployerBDO

public EmployerBDO getEmployerBDO()
                           throws jobmatch.data.DataObjectException,
                                  jobmatch.data.NonUniqueQueryException,
                                  jobmatch.data.QueryException
Get the single EmployerBDO object holding a EmployerDO object that refers to the DO held by this BDO.
Returns:
EmployerBDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one EmployerBDO object was found.

addEmployerBDO

public void addEmployerBDO(EmployerBDO rbdo)
                    throws SQLException,
                           jobmatch.data.DatabaseManagerException,
                           jobmatch.data.DataObjectException,
                           jobmatch.data.RefAssertionException,
                           jobmatch.data.DBRowUpdateException,
                           jobmatch.data.QueryException
Add (set & commit) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
Parameters:
rbdo - EmployerBDO to be set to point to this BDO and committed.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

addEmployerBDO

public void addEmployerBDO(EmployerBDO rbdo,
                           jobmatch.data.DBTransaction tran)
                    throws SQLException,
                           jobmatch.data.DatabaseManagerException,
                           jobmatch.data.DataObjectException,
                           jobmatch.data.RefAssertionException,
                           jobmatch.data.DBRowUpdateException,
                           jobmatch.data.QueryException
Add (set & commit) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
Parameters:
rbdo - EmployerBDO to be set to point to this BDO and committed.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removeEmployerBDO

public void removeEmployerBDO(EmployerBDO rbdo)
                       throws SQLException,
                              jobmatch.data.DatabaseManagerException,
                              jobmatch.data.DataObjectException,
                              jobmatch.data.RefAssertionException,
                              jobmatch.data.DBRowUpdateException,
                              jobmatch.data.QueryException
Remove (delete) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
Parameters:
r - EmployerBDO to be deleted.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removeEmployerBDO

public void removeEmployerBDO(EmployerBDO rbdo,
                              jobmatch.data.DBTransaction tran)
                       throws SQLException,
                              jobmatch.data.DatabaseManagerException,
                              jobmatch.data.DataObjectException,
                              jobmatch.data.RefAssertionException,
                              jobmatch.data.DBRowUpdateException,
                              jobmatch.data.QueryException
Remove (delete) a EmployerBDO object whose EmployerDO refers to the DO held by this BDO.
Parameters:
r - EmployerBDO to be deleted.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

getPersonDOArray

public PersonDO[] getPersonDOArray()
                            throws jobmatch.data.DataObjectException,
                                   jobmatch.data.QueryException
Get array of PersonDO objects that refer to the DO held by this BDO.
Returns:
array of PersonDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getPersonDO

public PersonDO getPersonDO()
                     throws jobmatch.data.DataObjectException,
                            jobmatch.data.NonUniqueQueryException,
                            jobmatch.data.QueryException
Get the single PersonDO object that refers to the DO held by this BDO.
Returns:
PersonDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one PersonDO object was found.

getPersonBDOArray

public PersonBDO[] getPersonBDOArray()
                              throws jobmatch.data.DataObjectException,
                                     jobmatch.data.QueryException
Get array of PersonBDO objects holding PersonDO objects that refer to the DO held by this BDO.
Returns:
array of PersonBDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getPersonBDO

public PersonBDO getPersonBDO()
                       throws jobmatch.data.DataObjectException,
                              jobmatch.data.NonUniqueQueryException,
                              jobmatch.data.QueryException
Get the single PersonBDO object holding a PersonDO object that refers to the DO held by this BDO.
Returns:
PersonBDO object.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.
jobmatch.data.NonUniqueQueryException - If more than one PersonBDO object was found.

addPersonBDO

public void addPersonBDO(PersonBDO rbdo)
                  throws SQLException,
                         jobmatch.data.DatabaseManagerException,
                         jobmatch.data.DataObjectException,
                         jobmatch.data.RefAssertionException,
                         jobmatch.data.DBRowUpdateException,
                         jobmatch.data.QueryException
Add (set & commit) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
Parameters:
rbdo - PersonBDO to be set to point to this BDO and committed.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

addPersonBDO

public void addPersonBDO(PersonBDO rbdo,
                         jobmatch.data.DBTransaction tran)
                  throws SQLException,
                         jobmatch.data.DatabaseManagerException,
                         jobmatch.data.DataObjectException,
                         jobmatch.data.RefAssertionException,
                         jobmatch.data.DBRowUpdateException,
                         jobmatch.data.QueryException
Add (set & commit) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
Parameters:
rbdo - PersonBDO to be set to point to this BDO and committed.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removePersonBDO

public void removePersonBDO(PersonBDO rbdo)
                     throws SQLException,
                            jobmatch.data.DatabaseManagerException,
                            jobmatch.data.DataObjectException,
                            jobmatch.data.RefAssertionException,
                            jobmatch.data.DBRowUpdateException,
                            jobmatch.data.QueryException
Remove (delete) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
Parameters:
r - PersonBDO to be deleted.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

removePersonBDO

public void removePersonBDO(PersonBDO rbdo,
                            jobmatch.data.DBTransaction tran)
                     throws SQLException,
                            jobmatch.data.DatabaseManagerException,
                            jobmatch.data.DataObjectException,
                            jobmatch.data.RefAssertionException,
                            jobmatch.data.DBRowUpdateException,
                            jobmatch.data.QueryException
Remove (delete) a PersonBDO object whose PersonDO refers to the DO held by this BDO.
Parameters:
r - PersonBDO to be deleted.
tran - The transaction to be used for the commit. If null, a new transaction is created.
Throws:
jobmatch.data.DatabaseManagerException - if could not create a transaction
SQLException - if any SQL errors occur.
jobmatch.data.DataObjectException - If object is not found in the database.

getIndustryDOArray_via_Company

public IndustryDO[] getIndustryDOArray_via_Company()
                                            throws jobmatch.data.DataObjectException
From the many-to-many relationship expressed by CompanyDO, get array of IndustryDO objects that indirectly refer to the DO held by this BDO.
Returns:
array of IndustryDO objects.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

mapIndustry_via_CompanyDO

public void mapIndustry_via_CompanyDO(IndustryDO d)
                               throws jobmatch.data.DataObjectException,
                                      jobmatch.data.DatabaseManagerException,
                                      jobmatch.data.RefAssertionException,
                                      SQLException,
                                      jobmatch.data.DBRowUpdateException,
                                      jobmatch.data.QueryException
To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
d - The IndustryDO to add to the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

mapIndustry_via_CompanyDO

public void mapIndustry_via_CompanyDO(IndustryDO d,
                                      jobmatch.data.DBTransaction tran)
                               throws jobmatch.data.DataObjectException,
                                      jobmatch.data.DatabaseManagerException,
                                      jobmatch.data.RefAssertionException,
                                      SQLException,
                                      jobmatch.data.DBRowUpdateException,
                                      jobmatch.data.QueryException
To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
d - The IndustryDO to add to the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

mapIndustry_via_CompanyBDO

public void mapIndustry_via_CompanyBDO(IndustryBDO b)
                                throws jobmatch.data.DataObjectException,
                                       jobmatch.data.DatabaseManagerException,
                                       jobmatch.data.RefAssertionException,
                                       SQLException,
                                       jobmatch.data.DBRowUpdateException,
                                       jobmatch.data.QueryException
To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
b - The IndustryBDO to add to the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

mapIndustry_via_CompanyBDO

public void mapIndustry_via_CompanyBDO(IndustryBDO b,
                                       jobmatch.data.DBTransaction tran)
                                throws jobmatch.data.DataObjectException,
                                       jobmatch.data.DatabaseManagerException,
                                       jobmatch.data.RefAssertionException,
                                       SQLException,
                                       jobmatch.data.DBRowUpdateException,
                                       jobmatch.data.QueryException
To the many-to-many relationship expressed by CompanyDO, add a IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
b - The IndustryBDO to add to the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

unmapIndustry_via_CompanyDO

public void unmapIndustry_via_CompanyDO(IndustryDO d)
                                 throws jobmatch.data.DataObjectException,
                                        jobmatch.data.DatabaseManagerException,
                                        jobmatch.data.RefAssertionException,
                                        SQLException,
                                        jobmatch.data.DBRowUpdateException,
                                        jobmatch.data.QueryException
From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
d - The IndustryDO to remove from the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

unmapIndustry_via_CompanyDO

public void unmapIndustry_via_CompanyDO(IndustryDO d,
                                        jobmatch.data.DBTransaction tran)
                                 throws jobmatch.data.DataObjectException,
                                        jobmatch.data.DatabaseManagerException,
                                        jobmatch.data.RefAssertionException,
                                        SQLException,
                                        jobmatch.data.DBRowUpdateException,
                                        jobmatch.data.QueryException
From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
d - The IndustryDO to remove from the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

unmapIndustry_via_CompanyBDO

public void unmapIndustry_via_CompanyBDO(IndustryBDO b)
                                  throws jobmatch.data.DataObjectException,
                                         jobmatch.data.DatabaseManagerException,
                                         jobmatch.data.RefAssertionException,
                                         SQLException,
                                         jobmatch.data.DBRowUpdateException,
                                         jobmatch.data.QueryException
From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
b - The IndustryBDO to remove from the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

unmapIndustry_via_CompanyBDO

public void unmapIndustry_via_CompanyBDO(IndustryBDO b,
                                         jobmatch.data.DBTransaction tran)
                                  throws jobmatch.data.DataObjectException,
                                         jobmatch.data.DatabaseManagerException,
                                         jobmatch.data.RefAssertionException,
                                         SQLException,
                                         jobmatch.data.DBRowUpdateException,
                                         jobmatch.data.QueryException
From the many-to-many relationship expressed by CompanyDO, remove (delete) the IndustryDO object that indirectly refers to the DO held by this BDO.
Parameters:
b - The IndustryBDO to remove from the CompanyDO mapping for this BDO.
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

commit

public void commit()
            throws SQLException,
                   jobmatch.data.DatabaseManagerException,
                   jobmatch.data.DataObjectException,
                   jobmatch.data.RefAssertionException,
                   jobmatch.data.DBRowUpdateException,
                   jobmatch.data.QueryException
Inserts/Updates the DO into its table.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - if a Transaction can not be created.
jobmatch.data.RefAssertionException - thrown by okTo method.
SQLException - if any SQL errors occur.

commit

public void commit(jobmatch.data.DBTransaction dbt)
            throws SQLException,
                   jobmatch.data.DatabaseManagerException,
                   jobmatch.data.DataObjectException,
                   jobmatch.data.RefAssertionException,
                   jobmatch.data.DBRowUpdateException,
                   jobmatch.data.QueryException
Inserts/Updates the DO into its table. The transaction is likely provided by the commit() method of another BDO whose DO references this DO.
Parameters:
dbt - The transaction object to use for this operation.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - if a Transaction can not be created.
jobmatch.data.RefAssertionException - thrown by okTo method.
SQLException - if any SQL errors occur.

delete

public void delete()
            throws SQLException,
                   jobmatch.data.DatabaseManagerException,
                   jobmatch.data.DataObjectException,
                   jobmatch.data.RefAssertionException,
                   jobmatch.data.DBRowUpdateException,
                   jobmatch.data.QueryException
Deletes the DO from its table.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - if a Transaction can not be created.
jobmatch.data.RefAssertionException - thrown by okTo method.
SQLException - if any SQL errors occur.

delete

public void delete(jobmatch.data.DBTransaction dbt)
            throws SQLException,
                   jobmatch.data.DatabaseManagerException,
                   jobmatch.data.DataObjectException,
                   jobmatch.data.RefAssertionException,
                   jobmatch.data.DBRowUpdateException,
                   jobmatch.data.QueryException
Deletes the DO from its table. The transaction is likely provided by the delete() method of another BDO whose DO references this DO.
Parameters:
dbt - The transaction object to use for this operation.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - if a Transaction can not be created.
jobmatch.data.RefAssertionException - thrown by okTo method.
SQLException - if any SQL errors occur.

okToCommitCountry

protected void okToCommitCountry(CountryDO member)
                          throws jobmatch.data.RefAssertionException
A stub method for implementing pre-commit assertions for the Country data member. Implement this stub to throw an RefAssertionException for cases where Country is not valid for writing to the database.

okToDeleteCountry

protected void okToDeleteCountry(CountryDO member)
                          throws jobmatch.data.RefAssertionException
A stub method for implementing pre-delete assertions for the Country data member. Implement this stub to throw an RefAssertionException for cases where Country is not valid for deletion from the database.

modifyDO

protected void modifyDO(jobmatch.data.DBTransaction dbt,
                        boolean delete)
                 throws SQLException,
                        jobmatch.data.DatabaseManagerException,
                        jobmatch.data.DataObjectException,
                        jobmatch.data.RefAssertionException,
                        jobmatch.data.DBRowUpdateException,
                        jobmatch.data.QueryException
Modifies the DO within its table. Performs recursive commit/delete on referenced DOs; all operations occur within a single transaction to allow rollback in the event of error. Only the creator of the transaction releases it.
Parameters:
dbt - The transaction object to use for this operation.
delete - True if doing a delete, otherwise doing insert/update.
Throws:
com.lutris.appserver.server.sql.DatabaseManagerException - if a Transaction can not be created.
jobmatch.data.RefAssertionException - thrown by okTo method.
SQLException - if any SQL errors occur.

PSE 2000 Group 4