PSE 2000 Group 4

jobmatch.data
Class EmployerCandidateBDO

java.lang.Object
  |
  +--jobmatch.data.EmployerCandidateBDO
Direct Known Subclasses:
WorkingSkill

public class EmployerCandidateBDO
extends Object
implements Serializable

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

Field Summary
protected  EmployerCandidateDO DO
          The EmployerCandidateDO object upon which the set and get methods operate.
 
Constructor Summary
EmployerCandidateBDO()
          Constructor required by EmployerCandidateBDO.create methods.
EmployerCandidateBDO(EmployerCandidateDO DO)
          Constructor for use by classes derived from EmployerCandidateBDO.
 
Method Summary
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 EmployerCandidateBDO createExisting(EmployerCandidateDO DO)
          The createExisting method is used to create a EmployerCandidateBDO from a EmployerCandidateDO that was returned by the EmployerCandidateQuery class.
static EmployerCandidateBDO createVirgin()
          Like the class EmployerCandidateDO, 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 EmployerCandidateBDO[] getBDOarray()
          The getBDOarray method performs a database query to return an array of EmployerCandidateBDO objects representing all the rows in the EmployerCandidate table.
 Date getBeginDate()
          Get BeginDate of the EmployerCandidateDO
 CandidateDO getCandidate()
          Get Candidate of the EmployerCandidateDO
 CandidateBDO getCandidateBDO()
          Get BDO-wrapped Candidate of the EmployerCandidateDO
 EmployerCandidateDO getDO()
          Note: This method is intended for use only by other BDO classes.
 EmployerDO getEmployer()
          Get Employer of the EmployerCandidateDO
 EmployerBDO getEmployerBDO()
          Get BDO-wrapped Employer of the EmployerCandidateDO
 Date getEndDate()
          Get EndDate of the EmployerCandidateDO
 String getFunction()
          Get Function of the EmployerCandidateDO
 String getHandle()
          The methods getHandle hasMatchingHandle are used by Presentation Objects that need to populate HTML select lists with EmployerCandidateBDO objects as options.
 int getPensum()
          Get Pensum of the EmployerCandidateDO
 String getReference()
          Get Reference of the EmployerCandidateDO
 String getRemarks()
          Get Remarks of the EmployerCandidateDO
 boolean hasMatchingHandle(String handle)
           
protected  void modifyDO(jobmatch.data.DBTransaction dbt, boolean delete)
          Modifies the DO within its table.
protected  void okToCommitCandidate(CandidateDO member)
          A stub method for implementing pre-commit assertions for the Candidate data member.
protected  void okToCommitEmployer(EmployerDO member)
          A stub method for implementing pre-commit assertions for the Employer data member.
protected  void okToDeleteCandidate(CandidateDO member)
          A stub method for implementing pre-delete assertions for the Candidate data member.
protected  void okToDeleteEmployer(EmployerDO member)
          A stub method for implementing pre-delete assertions for the Employer data member.
 void setBeginDate(Date BeginDate)
          Set BeginDate of the EmployerCandidateDO
 void setCandidate(CandidateBDO Candidate)
          Set Candidate of the EmployerCandidateDO
 void setCandidate(CandidateDO Candidate)
          Set Candidate of the EmployerCandidateDO
 void setEmployer(EmployerBDO Employer)
          Set Employer of the EmployerCandidateDO
 void setEmployer(EmployerDO Employer)
          Set Employer of the EmployerCandidateDO
 void setEndDate(Date EndDate)
          Set EndDate of the EmployerCandidateDO
 void setFunction(String Function)
          Set Function of the EmployerCandidateDO
 void setPensum(int Pensum)
          Set Pensum of the EmployerCandidateDO
 void setReference(String Reference)
          Set Reference of the EmployerCandidateDO
 void setRemarks(String Remarks)
          Set Remarks of the EmployerCandidateDO
 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 EmployerCandidateDO DO
The EmployerCandidateDO object upon which the set and get methods operate. This member is protected so that classes derived from EmployerCandidateBDO can access the underlying Data Object.
Constructor Detail

EmployerCandidateBDO

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

EmployerCandidateBDO

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

getDO

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

getBDOarray

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

getCandidate

public CandidateDO getCandidate()
                         throws jobmatch.data.DataObjectException
Get Candidate of the EmployerCandidateDO
Returns:
Candidate of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setCandidate

public void setCandidate(CandidateDO Candidate)
                  throws jobmatch.data.DataObjectException
Set Candidate of the EmployerCandidateDO
Parameters:
Candidate - of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getCandidateBDO

public CandidateBDO getCandidateBDO()
                             throws jobmatch.data.DataObjectException
Get BDO-wrapped Candidate of the EmployerCandidateDO
Returns:
BDO-wrapped Candidate of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setCandidate

public void setCandidate(CandidateBDO Candidate)
                  throws jobmatch.data.DataObjectException
Set Candidate of the EmployerCandidateDO
Parameters:
BDO-wrapped - Candidate of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getBeginDate

public Date getBeginDate()
                  throws jobmatch.data.DataObjectException
Get BeginDate of the EmployerCandidateDO
Returns:
BeginDate of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setBeginDate

public void setBeginDate(Date BeginDate)
                  throws jobmatch.data.DataObjectException
Set BeginDate of the EmployerCandidateDO
Parameters:
BeginDate - of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getEndDate

public Date getEndDate()
                throws jobmatch.data.DataObjectException
Get EndDate of the EmployerCandidateDO
Returns:
EndDate of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setEndDate

public void setEndDate(Date EndDate)
                throws jobmatch.data.DataObjectException
Set EndDate of the EmployerCandidateDO
Parameters:
EndDate - of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getEmployer

public EmployerDO getEmployer()
                       throws jobmatch.data.DataObjectException
Get Employer of the EmployerCandidateDO
Returns:
Employer of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setEmployer

public void setEmployer(EmployerDO Employer)
                 throws jobmatch.data.DataObjectException
Set Employer of the EmployerCandidateDO
Parameters:
Employer - of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getEmployerBDO

public EmployerBDO getEmployerBDO()
                           throws jobmatch.data.DataObjectException
Get BDO-wrapped Employer of the EmployerCandidateDO
Returns:
BDO-wrapped Employer of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setEmployer

public void setEmployer(EmployerBDO Employer)
                 throws jobmatch.data.DataObjectException
Set Employer of the EmployerCandidateDO
Parameters:
BDO-wrapped - Employer of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

getRemarks

public String getRemarks()
                  throws jobmatch.data.DataObjectException
Get Remarks of the EmployerCandidateDO
Returns:
Remarks of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setRemarks

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

getReference

public String getReference()
                    throws jobmatch.data.DataObjectException
Get Reference of the EmployerCandidateDO
Returns:
Reference of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setReference

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

getFunction

public String getFunction()
                   throws jobmatch.data.DataObjectException
Get Function of the EmployerCandidateDO
Returns:
Function of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setFunction

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

getPensum

public int getPensum()
              throws jobmatch.data.DataObjectException
Get Pensum of the EmployerCandidateDO
Returns:
Pensum of the EmployerCandidateDO
Throws:
jobmatch.data.DataObjectException - If the object is not found in the database.

setPensum

public void setPensum(int Pensum)
               throws jobmatch.data.DataObjectException
Set Pensum of the EmployerCandidateDO
Parameters:
Pensum - of the EmployerCandidateDO
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.

okToCommitCandidate

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

okToDeleteCandidate

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

okToCommitEmployer

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

okToDeleteEmployer

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