|
PSE 2000 Group 4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--jobmatch.data.CompanyBDO
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.
| 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 |
|
| Field Detail |
protected CompanyDO DO
| Constructor Detail |
public CompanyBDO(CompanyDO DO)
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 );
}
}
public CompanyBDO()
throws Exception
CompanyBDO.create methods.| Method Detail |
public CompanyDO getDO()
public static CompanyBDO createVirgin()
throws Exception
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.public static CompanyBDO createExisting(CompanyDO DO)
CompanyBDO
from a CompanyDO that was returned by
the CompanyQuery class.
public static CompanyBDO[] getBDOarray()
throws jobmatch.data.DataObjectException
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.protected void beforeAnyGet()
beforeAnyGet
beforeAnySet
afterAnySet
to handle any general assertions or cleanup needed
for get and set methods.
protected void beforeAnySet()
throws Exception
protected void afterAnySet()
public String getHandle()
throws jobmatch.data.DatabaseManagerException
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.
public boolean hasMatchingHandle(String handle)
handle - String representation of the id for this BDOgetHandlepublic String toString()
public String getName()
throws jobmatch.data.DataObjectException
public void setName(String Name)
throws jobmatch.data.DataObjectException
Name - of the CompanyDO
public AdressDO getAdress()
throws jobmatch.data.DataObjectException
public void setAdress(AdressDO Adress)
throws jobmatch.data.DataObjectException
Adress - of the CompanyDO
public AdressBDO getAdressBDO()
throws jobmatch.data.DataObjectException
public void setAdress(AdressBDO Adress)
throws jobmatch.data.DataObjectException
BDO-wrapped - Adress of the CompanyDO
public boolean getActive()
throws jobmatch.data.DataObjectException
public void setActive(boolean Active)
throws jobmatch.data.DataObjectException
Active - of the CompanyDO
public int getEarnings()
throws jobmatch.data.DataObjectException
public void setEarnings(int Earnings)
throws jobmatch.data.DataObjectException
Earnings - of the CompanyDO
public int getGraduatesPerYear()
throws jobmatch.data.DataObjectException
public void setGraduatesPerYear(int GraduatesPerYear)
throws jobmatch.data.DataObjectException
GraduatesPerYear - of the CompanyDO
public int getNumberEmployees()
throws jobmatch.data.DataObjectException
public void setNumberEmployees(int NumberEmployees)
throws jobmatch.data.DataObjectException
NumberEmployees - of the CompanyDO
public String getShortDescription()
throws jobmatch.data.DataObjectException
public void setShortDescription(String ShortDescription)
throws jobmatch.data.DataObjectException
ShortDescription - of the CompanyDO
public PersonDO getContact()
throws jobmatch.data.DataObjectException
public void setContact(PersonDO Contact)
throws jobmatch.data.DataObjectException
Contact - of the CompanyDO
public PersonBDO getContactBDO()
throws jobmatch.data.DataObjectException
public void setContact(PersonBDO Contact)
throws jobmatch.data.DataObjectException
BDO-wrapped - Contact of the CompanyDO
public IndustryDO getIndustry()
throws jobmatch.data.DataObjectException
public void setIndustry(IndustryDO Industry)
throws jobmatch.data.DataObjectException
Industry - of the CompanyDO
public IndustryBDO getIndustryBDO()
throws jobmatch.data.DataObjectException
public void setIndustry(IndustryBDO Industry)
throws jobmatch.data.DataObjectException
BDO-wrapped - Industry of the CompanyDO
public String getPresence()
throws jobmatch.data.DataObjectException
public void setPresence(String Presence)
throws jobmatch.data.DataObjectException
Presence - of the CompanyDO
public String getURL()
throws jobmatch.data.DataObjectException
public void setURL(String URL)
throws jobmatch.data.DataObjectException
URL - of the CompanyDO
public CompanyAccountDO[] getCompanyAccountDOArray()
throws jobmatch.data.DataObjectException,
jobmatch.data.QueryException
public CompanyAccountDO getCompanyAccountDO()
throws jobmatch.data.DataObjectException,
jobmatch.data.NonUniqueQueryException,
jobmatch.data.QueryException
public CompanyAccountBDO[] getCompanyAccountBDOArray()
throws jobmatch.data.DataObjectException,
jobmatch.data.QueryException
public CompanyAccountBDO getCompanyAccountBDO()
throws jobmatch.data.DataObjectException,
jobmatch.data.NonUniqueQueryException,
jobmatch.data.QueryException
public void addCompanyAccountBDO(CompanyAccountBDO rbdo)
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
rbdo - CompanyAccountBDO to be set to point to this BDO and committed.
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
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.
public void removeCompanyAccountBDO(CompanyAccountBDO rbdo)
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
r - CompanyAccountBDO to be deleted.
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
r - CompanyAccountBDO to be deleted.tran - The transaction to be used for the commit.
If null, a new transaction is created.
public ProfileDO[] getProfileDOArray()
throws jobmatch.data.DataObjectException,
jobmatch.data.QueryException
public ProfileDO getProfileDO()
throws jobmatch.data.DataObjectException,
jobmatch.data.NonUniqueQueryException,
jobmatch.data.QueryException
public ProfileBDO[] getProfileBDOArray()
throws jobmatch.data.DataObjectException,
jobmatch.data.QueryException
public ProfileBDO getProfileBDO()
throws jobmatch.data.DataObjectException,
jobmatch.data.NonUniqueQueryException,
jobmatch.data.QueryException
public void addProfileBDO(ProfileBDO rbdo)
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
rbdo - ProfileBDO to be set to point to this BDO and committed.
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
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.
public void removeProfileBDO(ProfileBDO rbdo)
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
r - ProfileBDO to be deleted.
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
r - ProfileBDO to be deleted.tran - The transaction to be used for the commit.
If null, a new transaction is created.
public void commit()
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
public void commit(jobmatch.data.DBTransaction dbt)
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
dbt - The transaction object to use for this operation.
public void delete()
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
public void delete(jobmatch.data.DBTransaction dbt)
throws SQLException,
jobmatch.data.DatabaseManagerException,
jobmatch.data.DataObjectException,
jobmatch.data.RefAssertionException,
jobmatch.data.DBRowUpdateException,
jobmatch.data.QueryException
dbt - The transaction object to use for this operation.
protected void okToCommitAdress(AdressDO member)
throws jobmatch.data.RefAssertionException
protected void okToDeleteAdress(AdressDO member)
throws jobmatch.data.RefAssertionException
protected void okToCommitContact(PersonDO member)
throws jobmatch.data.RefAssertionException
protected void okToDeleteContact(PersonDO member)
throws jobmatch.data.RefAssertionException
protected void okToCommitIndustry(IndustryDO member)
throws jobmatch.data.RefAssertionException
protected void okToDeleteIndustry(IndustryDO member)
throws jobmatch.data.RefAssertionException
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
dbt - The transaction object to use for this operation.delete - True if doing a delete, otherwise doing insert/update.
|
PSE 2000 Group 4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||