PSE 2000 Group 4

jobmatch.data
Class CompanyBDO

java.lang.Object
  |
  +--jobmatch.data.CompanyBDO
Direct Known Subclasses:
Company

public class CompanyBDO
extends Object
implements Serializable

CompanyBDO contains the same set and get methods as the CompanyDO 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.7 $
See Also:
Serialized Form

Field Summary
protected  CompanyDO DO
          The CompanyDO object upon which the set and get methods operate.
 
Constructor Summary
CompanyBDO()
          Constructor required by CompanyBDO.create methods.
CompanyBDO(CompanyDO DO)
          Constructor for use by classes derived from CompanyBDO.
 
Method Summary
 void addCompanyAccountBDO(CompanyAccountBDO rbdo)
          Add (set & commit) a CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
 void addCompanyAccountBDO(CompanyAccountBDO rbdo, jobmatch.data.DBTransaction tran)
          Add (set & commit) a CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
 void addProfileBDO(ProfileBDO rbdo)
          Add (set & commit) a ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
 void addProfileBDO(ProfileBDO rbdo, jobmatch.data.DBTransaction tran)
          Add (set & commit) a ProfileBDO object whose ProfileDO 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 CompanyBDO createExisting(CompanyDO DO)
          The createExisting method is used to create a CompanyBDO from a CompanyDO that was returned by the CompanyQuery class.
static CompanyBDO createVirgin()
          Like the class CompanyDO, 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.
 boolean getActive()
          Get Active of the CompanyDO
 AdressDO getAdress()
          Get Adress of the CompanyDO
 AdressBDO getAdressBDO()
          Get BDO-wrapped Adress of the CompanyDO
static CompanyBDO[] getBDOarray()
          The getBDOarray method performs a database query to return an array of CompanyBDO objects representing all the rows in the Company table.
 CompanyAccountBDO getCompanyAccountBDO()
          Get the single CompanyAccountBDO object holding a CompanyAccountDO object that refers to the DO held by this BDO.
 CompanyAccountBDO[] getCompanyAccountBDOArray()
          Get array of CompanyAccountBDO objects holding CompanyAccountDO objects that refer to the DO held by this BDO.
 CompanyAccountDO getCompanyAccountDO()
          Get the single CompanyAccountDO object that refers to the DO held by this BDO.
 CompanyAccountDO[] getCompanyAccountDOArray()
          Get array of CompanyAccountDO objects that refer to the DO held by this BDO.
 PersonDO getContact()
          Get Contact of the CompanyDO
 PersonBDO getContactBDO()
          Get BDO-wrapped Contact of the CompanyDO
 CompanyDO getDO()
          Note: This method is intended for use only by other BDO classes.
 int getEarnings()
          Get Earnings of the CompanyDO
 int getGraduatesPerYear()
          Get GraduatesPerYear of the CompanyDO
 String getHandle()
          The methods getHandle hasMatchingHandle are used by Presentation Objects that need to populate HTML select lists with CompanyBDO objects as options.
 IndustryDO getIndustry()
          Get Industry of the CompanyDO
 IndustryBDO getIndustryBDO()
          Get BDO-wrapped Industry of the CompanyDO
 String getName()
          Get Name of the CompanyDO
 int getNumberEmployees()
          Get NumberEmployees of the CompanyDO
 String getPresence()
          Get Presence of the CompanyDO
 ProfileBDO getProfileBDO()
          Get the single ProfileBDO object holding a ProfileDO object that refers to the DO held by this BDO.
 ProfileBDO[] getProfileBDOArray()
          Get array of ProfileBDO objects holding ProfileDO objects that refer to the DO held by this BDO.
 ProfileDO getProfileDO()
          Get the single ProfileDO object that refers to the DO held by this BDO.
 ProfileDO[] getProfileDOArray()
          Get array of ProfileDO objects that refer to the DO held by this BDO.
 String getShortDescription()
          Get ShortDescription of the CompanyDO
 String getURL()
          Get URL of the CompanyDO
 boolean hasMatchingHandle(String handle)
           
protected  void modifyDO(jobmatch.data.DBTransaction dbt, boolean delete)
          Modifies the DO within its table.
protected  void okToCommitAdress(AdressDO member)
          A stub method for implementing pre-commit assertions for the Adress data member.
protected  void okToCommitContact(PersonDO member)
          A stub method for implementing pre-commit assertions for the Contact data member.
protected  void okToCommitIndustry(IndustryDO member)
          A stub method for implementing pre-commit assertions for the Industry data member.
protected  void okToDeleteAdress(AdressDO member)
          A stub method for implementing pre-delete assertions for the Adress data member.
protected  void okToDeleteContact(PersonDO member)
          A stub method for implementing pre-delete assertions for the Contact data member.
protected  void okToDeleteIndustry(IndustryDO member)
          A stub method for implementing pre-delete assertions for the Industry data member.
 void removeCompanyAccountBDO(CompanyAccountBDO rbdo)
          Remove (delete) a CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
 void removeCompanyAccountBDO(CompanyAccountBDO rbdo, jobmatch.data.DBTransaction tran)
          Remove (delete) a CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
 void removeProfileBDO(ProfileBDO rbdo)
          Remove (delete) a ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
 void removeProfileBDO(ProfileBDO rbdo, jobmatch.data.DBTransaction tran)
          Remove (delete) a ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
 void setActive(boolean Active)
          Set Active of the CompanyDO
 void setAdress(AdressBDO Adress)
          Set Adress of the CompanyDO
 void setAdress(AdressDO Adress)
          Set Adress of the CompanyDO
 void setContact(PersonBDO Contact)
          Set Contact of the CompanyDO
 void setContact(PersonDO Contact)
          Set Contact of the CompanyDO
 void setEarnings(int Earnings)
          Set Earnings of the CompanyDO
 void setGraduatesPerYear(int GraduatesPerYear)
          Set GraduatesPerYear of the CompanyDO
 void setIndustry(IndustryBDO Industry)
          Set Industry of the CompanyDO
 void setIndustry(IndustryDO Industry)
          Set Industry of the CompanyDO
 void setName(String Name)
          Set Name of the CompanyDO
 void setNumberEmployees(int NumberEmployees)
          Set NumberEmployees of the CompanyDO
 void setPresence(String Presence)
          Set Presence of the CompanyDO
 void setShortDescription(String ShortDescription)
          Set ShortDescription of the CompanyDO
 void setURL(String URL)
          Set URL of the CompanyDO
 String toString()
          for debugging
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DO

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

CompanyBDO

public CompanyBDO(CompanyDO DO)
Constructor for use by classes derived from CompanyBDO. 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 ); } }

CompanyBDO

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

getDO

public CompanyDO 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 CompanyBDO createVirgin()
                               throws Exception
Like the class CompanyDO, 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 CompanyBDO createExisting(CompanyDO DO)
The createExisting method is used to create a CompanyBDO from a CompanyDO that was returned by the CompanyQuery class.

getBDOarray

public static CompanyBDO[] getBDOarray()
                                throws jobmatch.data.DataObjectException
The getBDOarray method performs a database query to return an array of CompanyBDO objects representing all the rows in the Company 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 CompanyDO 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 CompanyBDO 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 CompanyBDO object holds a reference to a CompanyDO object. The id of this CompanyBDO is the id of its CompanyDO.
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

getName

public String getName()
               throws jobmatch.data.DataObjectException
Get Name of the CompanyDO
Returns:
Name of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setName

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

getAdress

public AdressDO getAdress()
                   throws jobmatch.data.DataObjectException
Get Adress of the CompanyDO
Returns:
Adress of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setAdress

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

getAdressBDO

public AdressBDO getAdressBDO()
                       throws jobmatch.data.DataObjectException
Get BDO-wrapped Adress of the CompanyDO
Returns:
BDO-wrapped Adress of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setAdress

public void setAdress(AdressBDO Adress)
               throws jobmatch.data.DataObjectException
Set Adress of the CompanyDO
Parameters:
BDO-wrapped - Adress of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getActive

public boolean getActive()
                  throws jobmatch.data.DataObjectException
Get Active of the CompanyDO
Returns:
Active of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setActive

public void setActive(boolean Active)
               throws jobmatch.data.DataObjectException
Set Active of the CompanyDO
Parameters:
Active - of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getEarnings

public int getEarnings()
                throws jobmatch.data.DataObjectException
Get Earnings of the CompanyDO
Returns:
Earnings of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setEarnings

public void setEarnings(int Earnings)
                 throws jobmatch.data.DataObjectException
Set Earnings of the CompanyDO
Parameters:
Earnings - of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getGraduatesPerYear

public int getGraduatesPerYear()
                        throws jobmatch.data.DataObjectException
Get GraduatesPerYear of the CompanyDO
Returns:
GraduatesPerYear of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setGraduatesPerYear

public void setGraduatesPerYear(int GraduatesPerYear)
                         throws jobmatch.data.DataObjectException
Set GraduatesPerYear of the CompanyDO
Parameters:
GraduatesPerYear - of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getNumberEmployees

public int getNumberEmployees()
                       throws jobmatch.data.DataObjectException
Get NumberEmployees of the CompanyDO
Returns:
NumberEmployees of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setNumberEmployees

public void setNumberEmployees(int NumberEmployees)
                        throws jobmatch.data.DataObjectException
Set NumberEmployees of the CompanyDO
Parameters:
NumberEmployees - of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getShortDescription

public String getShortDescription()
                           throws jobmatch.data.DataObjectException
Get ShortDescription of the CompanyDO
Returns:
ShortDescription of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setShortDescription

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

getContact

public PersonDO getContact()
                    throws jobmatch.data.DataObjectException
Get Contact of the CompanyDO
Returns:
Contact of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setContact

public void setContact(PersonDO Contact)
                throws jobmatch.data.DataObjectException
Set Contact of the CompanyDO
Parameters:
Contact - of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getContactBDO

public PersonBDO getContactBDO()
                        throws jobmatch.data.DataObjectException
Get BDO-wrapped Contact of the CompanyDO
Returns:
BDO-wrapped Contact of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setContact

public void setContact(PersonBDO Contact)
                throws jobmatch.data.DataObjectException
Set Contact of the CompanyDO
Parameters:
BDO-wrapped - Contact of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getIndustry

public IndustryDO getIndustry()
                       throws jobmatch.data.DataObjectException
Get Industry of the CompanyDO
Returns:
Industry of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setIndustry

public void setIndustry(IndustryDO Industry)
                 throws jobmatch.data.DataObjectException
Set Industry of the CompanyDO
Parameters:
Industry - of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getIndustryBDO

public IndustryBDO getIndustryBDO()
                           throws jobmatch.data.DataObjectException
Get BDO-wrapped Industry of the CompanyDO
Returns:
BDO-wrapped Industry of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setIndustry

public void setIndustry(IndustryBDO Industry)
                 throws jobmatch.data.DataObjectException
Set Industry of the CompanyDO
Parameters:
BDO-wrapped - Industry of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getPresence

public String getPresence()
                   throws jobmatch.data.DataObjectException
Get Presence of the CompanyDO
Returns:
Presence of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setPresence

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

getURL

public String getURL()
              throws jobmatch.data.DataObjectException
Get URL of the CompanyDO
Returns:
URL of the CompanyDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setURL

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

getCompanyAccountDOArray

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

getCompanyAccountDO

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

getCompanyAccountBDOArray

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

getCompanyAccountBDO

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

addCompanyAccountBDO

public void addCompanyAccountBDO(CompanyAccountBDO rbdo)
                          throws SQLException,
                                 jobmatch.data.DatabaseManagerException,
                                 jobmatch.data.DataObjectException,
                                 jobmatch.data.RefAssertionException,
                                 jobmatch.data.DBRowUpdateException,
                                 jobmatch.data.QueryException
Add (set & commit) a CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
Parameters:
rbdo - CompanyAccountBDO 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.

addCompanyAccountBDO

public void addCompanyAccountBDO(CompanyAccountBDO 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 CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
Parameters:
rbdo - CompanyAccountBDO 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.

removeCompanyAccountBDO

public void removeCompanyAccountBDO(CompanyAccountBDO rbdo)
                             throws SQLException,
                                    jobmatch.data.DatabaseManagerException,
                                    jobmatch.data.DataObjectException,
                                    jobmatch.data.RefAssertionException,
                                    jobmatch.data.DBRowUpdateException,
                                    jobmatch.data.QueryException
Remove (delete) a CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
Parameters:
r - CompanyAccountBDO 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.

removeCompanyAccountBDO

public void removeCompanyAccountBDO(CompanyAccountBDO 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 CompanyAccountBDO object whose CompanyAccountDO refers to the DO held by this BDO.
Parameters:
r - CompanyAccountBDO 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.

getProfileDOArray

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

getProfileDO

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

getProfileBDOArray

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

getProfileBDO

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

addProfileBDO

public void addProfileBDO(ProfileBDO rbdo)
                   throws SQLException,
                          jobmatch.data.DatabaseManagerException,
                          jobmatch.data.DataObjectException,
                          jobmatch.data.RefAssertionException,
                          jobmatch.data.DBRowUpdateException,
                          jobmatch.data.QueryException
Add (set & commit) a ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
Parameters:
rbdo - ProfileBDO 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.

addProfileBDO

public void addProfileBDO(ProfileBDO 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 ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
Parameters:
rbdo - ProfileBDO 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.

removeProfileBDO

public void removeProfileBDO(ProfileBDO rbdo)
                      throws SQLException,
                             jobmatch.data.DatabaseManagerException,
                             jobmatch.data.DataObjectException,
                             jobmatch.data.RefAssertionException,
                             jobmatch.data.DBRowUpdateException,
                             jobmatch.data.QueryException
Remove (delete) a ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
Parameters:
r - ProfileBDO 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.

removeProfileBDO

public void removeProfileBDO(ProfileBDO 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 ProfileBDO object whose ProfileDO refers to the DO held by this BDO.
Parameters:
r - ProfileBDO 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.

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.

okToCommitAdress

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

okToDeleteAdress

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

okToCommitContact

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

okToDeleteContact

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

okToCommitIndustry

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

okToDeleteIndustry

protected void okToDeleteIndustry(IndustryDO member)
                           throws jobmatch.data.RefAssertionException
A stub method for implementing pre-delete assertions for the Industry data member. Implement this stub to throw an RefAssertionException for cases where Industry 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