|
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.PersonBDO
PersonBDO contains the same set and get methods as the PersonDO 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 PersonDO |
DO
The PersonDO object upon which the set and get methods operate. |
Constructor Summary | |
PersonBDO()
Constructor required by PersonBDO.create methods. |
|
PersonBDO(PersonDO DO)
Constructor for use by classes derived from PersonBDO . |
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 PersonBDO |
createExisting(PersonDO DO)
The createExisting method is used to create a PersonBDO
from a PersonDO that was returned by
the PersonQuery class. |
static PersonBDO |
createVirgin()
Like the class PersonDO ,
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. |
AdressDO |
getAdress()
Get Adress of the PersonDO |
AdressBDO |
getAdressBDO()
Get BDO-wrapped Adress of the PersonDO |
static PersonBDO[] |
getBDOarray()
The getBDOarray method performs a database query to return an array of PersonBDO objects
representing all the rows in the Person table. |
Date |
getBirthdate()
Get Birthdate of the PersonDO |
PersonDO |
getDO()
Note: This method is intended for use only by other BDO classes. |
String |
getEmail()
Get Email of the PersonDO |
String |
getFax()
Get Fax of the PersonDO |
String |
getFname()
Get Fname of the PersonDO |
String |
getHandle()
The methods
getHandle
hasMatchingHandle
are used by Presentation Objects that need to populate
HTML select lists with PersonBDO objects as options. |
String |
getLname()
Get Lname of the PersonDO |
String |
getNatel()
Get Natel of the PersonDO |
CountryDO |
getNationality()
Get Nationality of the PersonDO |
CountryBDO |
getNationalityBDO()
Get BDO-wrapped Nationality of the PersonDO |
String |
getPhone()
Get Phone of the PersonDO |
PictureDO |
getPicture()
Get Picture of the PersonDO |
PictureBDO |
getPictureBDO()
Get BDO-wrapped Picture of the PersonDO |
String |
getResidence()
Get Residence of the PersonDO |
String |
getSex()
Get Sex of the PersonDO |
String |
getURL()
Get URL of the PersonDO |
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 |
okToCommitNationality(CountryDO member)
A stub method for implementing pre-commit assertions for the Nationality data member. |
protected void |
okToCommitPicture(PictureDO member)
A stub method for implementing pre-commit assertions for the Picture data member. |
protected void |
okToDeleteAdress(AdressDO member)
A stub method for implementing pre-delete assertions for the Adress data member. |
protected void |
okToDeleteNationality(CountryDO member)
A stub method for implementing pre-delete assertions for the Nationality data member. |
protected void |
okToDeletePicture(PictureDO member)
A stub method for implementing pre-delete assertions for the Picture data member. |
void |
setAdress(AdressBDO Adress)
Set Adress of the PersonDO |
void |
setAdress(AdressDO Adress)
Set Adress of the PersonDO |
void |
setBirthdate(Date Birthdate)
Set Birthdate of the PersonDO |
void |
setEmail(String Email)
Set Email of the PersonDO |
void |
setFax(String Fax)
Set Fax of the PersonDO |
void |
setFname(String Fname)
Set Fname of the PersonDO |
void |
setLname(String Lname)
Set Lname of the PersonDO |
void |
setNatel(String Natel)
Set Natel of the PersonDO |
void |
setNationality(CountryBDO Nationality)
Set Nationality of the PersonDO |
void |
setNationality(CountryDO Nationality)
Set Nationality of the PersonDO |
void |
setPhone(String Phone)
Set Phone of the PersonDO |
void |
setPicture(PictureBDO Picture)
Set Picture of the PersonDO |
void |
setPicture(PictureDO Picture)
Set Picture of the PersonDO |
void |
setResidence(String Residence)
Set Residence of the PersonDO |
void |
setSex(String Sex)
Set Sex of the PersonDO |
void |
setURL(String URL)
Set URL of the PersonDO |
String |
toString()
for debugging |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected PersonDO DO
Constructor Detail |
public PersonBDO(PersonDO DO)
PersonBDO
.
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 PersonBDO() throws Exception
PersonBDO.create
methods.Method Detail |
public PersonDO getDO()
public static PersonBDO createVirgin() throws Exception
PersonDO
,
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 PersonBDO createExisting(PersonDO DO)
PersonBDO
from a PersonDO
that was returned by
the PersonQuery
class.public static PersonBDO[] getBDOarray() throws jobmatch.data.DataObjectException
PersonBDO
objects
representing all the rows in the Person
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 PersonDO
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 PersonBDO
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 PersonBDO object holds a reference to a PersonDO object.
The id of this PersonBDO is the id of its PersonDO.
- 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 BDOgetHandle
public String toString()
public PictureDO getPicture() throws jobmatch.data.DataObjectException
public void setPicture(PictureDO Picture) throws jobmatch.data.DataObjectException
Picture
- of the PersonDOpublic PictureBDO getPictureBDO() throws jobmatch.data.DataObjectException
public void setPicture(PictureBDO Picture) throws jobmatch.data.DataObjectException
BDO-wrapped
- Picture of the PersonDOpublic String getEmail() throws jobmatch.data.DataObjectException
public void setEmail(String Email) throws jobmatch.data.DataObjectException
Email
- of the PersonDOpublic String getFax() throws jobmatch.data.DataObjectException
public void setFax(String Fax) throws jobmatch.data.DataObjectException
Fax
- of the PersonDOpublic AdressDO getAdress() throws jobmatch.data.DataObjectException
public void setAdress(AdressDO Adress) throws jobmatch.data.DataObjectException
Adress
- of the PersonDOpublic AdressBDO getAdressBDO() throws jobmatch.data.DataObjectException
public void setAdress(AdressBDO Adress) throws jobmatch.data.DataObjectException
BDO-wrapped
- Adress of the PersonDOpublic String getFname() throws jobmatch.data.DataObjectException
public void setFname(String Fname) throws jobmatch.data.DataObjectException
Fname
- of the PersonDOpublic String getLname() throws jobmatch.data.DataObjectException
public void setLname(String Lname) throws jobmatch.data.DataObjectException
Lname
- of the PersonDOpublic String getNatel() throws jobmatch.data.DataObjectException
public void setNatel(String Natel) throws jobmatch.data.DataObjectException
Natel
- of the PersonDOpublic String getPhone() throws jobmatch.data.DataObjectException
public void setPhone(String Phone) throws jobmatch.data.DataObjectException
Phone
- of the PersonDOpublic String getResidence() throws jobmatch.data.DataObjectException
public void setResidence(String Residence) throws jobmatch.data.DataObjectException
Residence
- of the PersonDOpublic String getSex() throws jobmatch.data.DataObjectException
public void setSex(String Sex) throws jobmatch.data.DataObjectException
Sex
- of the PersonDOpublic Date getBirthdate() throws jobmatch.data.DataObjectException
public void setBirthdate(Date Birthdate) throws jobmatch.data.DataObjectException
Birthdate
- of the PersonDOpublic CountryDO getNationality() throws jobmatch.data.DataObjectException
public void setNationality(CountryDO Nationality) throws jobmatch.data.DataObjectException
Nationality
- of the PersonDOpublic CountryBDO getNationalityBDO() throws jobmatch.data.DataObjectException
public void setNationality(CountryBDO Nationality) throws jobmatch.data.DataObjectException
BDO-wrapped
- Nationality of the PersonDOpublic String getURL() throws jobmatch.data.DataObjectException
public void setURL(String URL) throws jobmatch.data.DataObjectException
URL
- of the PersonDOpublic 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 okToCommitPicture(PictureDO member) throws jobmatch.data.RefAssertionException
protected void okToDeletePicture(PictureDO member) throws jobmatch.data.RefAssertionException
protected void okToCommitAdress(AdressDO member) throws jobmatch.data.RefAssertionException
protected void okToDeleteAdress(AdressDO member) throws jobmatch.data.RefAssertionException
protected void okToCommitNationality(CountryDO member) throws jobmatch.data.RefAssertionException
protected void okToDeleteNationality(CountryDO 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 |