|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.instantbank.component.job.ejb.JobDAO
This class has JDBC calls required by EJB job for implementing its services
Field Summary | |
private javax.sql.DataSource |
datasource
datasource corresponding to the database |
private java.sql.Connection |
dbConnection
connection with the database |
private Debug |
debug
debug utility |
private boolean |
jobMasterchanged
signales if job master data must be updated in the DB |
private JobModel |
jobModel
model of Job |
private boolean |
jobORDERchanged
signales if jobORDER details must be updated in the DB |
private boolean |
jobSELECTchanged
signales if jobSELECT details must be updated in the DB |
private boolean |
jobWHEREchanged
signales if jobWHERE details must be updated in the DB |
Constructor Summary | |
JobDAO()
Constructor: searchs the DataSource in the InitialContext |
Method Summary | |
private void |
deleteJob()
Deletes the current Job (master part) in the database, in table: DatabaseNames.LETT_JOB |
private void |
deleteJobLogs()
Deletes log data of the current Job in the database, in tables: DatabaseNames.LETT_JOB_LOG, LETT_JOB_FTP_LOG |
private void |
deleteJobORDER()
Deletes ORDER elements of the current Job in the database, in table: DatabaseNames.LETT_JOB_ORDER |
private void |
deleteJobSELECT()
Deletes SELECT elements of the current Job in the database, in table: DatabaseNames.LETT_JOB_SELECT |
private void |
deleteJobWHERE()
Deletes WHERE elements of the current Job in the database, in table: DatabaseNames.LETT_JOB_WHERE |
void |
ejbCreate(JobModel jobModel)
Supports ejbCreate() method of Job EJB: stores state of new ejb instance in the database (inserting master and details of jobModel attribute); updates jobId, with value assigned by DB; updates jobModel with state master value of the database. |
java.lang.Long |
ejbFindByName(java.lang.String companyId,
java.lang.String name)
Supports ejbFindByName() method of Job EJB: checks existence of ejb instance in the database |
java.lang.Long |
ejbFindByPrimaryKey(java.lang.Long jobId)
Supports ejbFindByPrimaryKey() method of Job EJB: checks existence of ejb instance in the database |
void |
ejbLoad(java.lang.Long jobId)
Supports ejbLoad() method of Job EJB: loads from database master and details of instance |
boolean |
ejbRemove(java.lang.Long jobId)
Supports ejbRemove() method of Job EJB: removes from database master and details of ejb instance |
void |
ejbStore(JobModel jobModel)
Supports ejbStore() method of Job EJB: updates in database master and details of instance |
private java.lang.Long |
existsJobByName(java.lang.String companyId,
java.lang.String name)
Checks existence of a Job in the database, from DatabaseNames.LETT_JOB |
private boolean |
existsJobLogs()
Checks if it exists log data of the current Job in the database, in table: DatabaseNames.LETT_JOB_LOG |
private boolean |
existsKey(java.lang.Long jobId)
Checks existence of a Job in the database, from DatabaseNames.LETT_JOB |
java.lang.Long |
getJobId()
Getter method for jobId |
JobModel |
getModel()
Getter method for jobModel attribute |
private void |
insertJob()
Inserts the current Job (master part) in the database, in table: DatabaseNames.LETT_JOB |
private void |
insertJobORDER()
Inserts ORDER elements of the current Job in the database, in table: DatabaseNames.LETT_JOB_ORDER |
private void |
insertJobSELECT()
Inserts SELECT elements of the current Job in the database, in table: DatabaseNames.LETT_JOB_SELECT |
private void |
insertJobWHERE()
Inserts WHERE elements of the current Job in the database, in table: DatabaseNames.LETT_JOB_WHERE |
private void |
selectJob()
Selects the current Job (master part) from the database, table: DatabaseNames.LETT_JOB |
private java.lang.Long |
selectJobId()
Gets Id assigned by the database to the current job (jobId), in table DatabaseNames.LETT_JOB |
private void |
selectJobORDER()
Selects ORDER elements of the current Job from the database, in table: DatabaseNames.LETT_JOB_ORDER |
private void |
selectJobSELECT()
Selects SELECT elements of the current Job from the database, in table: DatabaseNames.LETT_JOB_SELECT |
private void |
selectJobWHERE()
Selects WHERE elements of the current Job from the database, in table: DatabaseNames.LETT_JOB_WHERE |
private java.sql.Date |
selectVersion()
Gets version (last_changed_date) of the current job, in table DatabaseNames.LETT_JOB |
void |
setJobId(java.lang.Long jobId)
Setter method on jobId |
void |
setJobMasterchanged(boolean jobMasterchanged)
Setter method on jobMasterchanged |
void |
setJobORDERchanged(boolean jobORDERchanged)
Setter method on jobORDERchanged |
void |
setJobSELECTchanged(boolean jobSELECTchanged)
Setter method on jobSELECTchanged |
void |
setJobWHEREchanged(boolean jobWHEREchanged)
Setter method on jobWHEREchanged |
void |
setVersion(java.sql.Date version)
Setter method on version |
private void |
updateJob()
Updates the current Job (master part) in the database, in table: DatabaseNames.LETT_JOB |
Methods inherited from class java.lang.Object |
|
Field Detail |
private JobModel jobModel
private boolean jobMasterchanged
private boolean jobSELECTchanged
private boolean jobWHEREchanged
private boolean jobORDERchanged
private java.sql.Connection dbConnection
private javax.sql.DataSource datasource
private Debug debug
Constructor Detail |
public JobDAO() throws DAOException
DAOException
- Description of the ExceptionMethod Detail |
public JobModel getModel()
public java.lang.Long getJobId()
public void setJobId(java.lang.Long jobId)
jobId
- The new jobId value (attribute of jobModel)public void setVersion(java.sql.Date version)
version
- The new version value (attribute of jobModel)public void setJobMasterchanged(boolean jobMasterchanged)
jobMasterchanged
- The new jobMasterchanged valuepublic void setJobSELECTchanged(boolean jobSELECTchanged)
jobSELECTchanged
- The new jobSELECTchanged valuepublic void setJobWHEREchanged(boolean jobWHEREchanged)
jobWHEREchanged
- The new jobWHEREchanged valuepublic void setJobORDERchanged(boolean jobORDERchanged)
jobORDERchanged
- The new jobORDERchanged valuepublic void ejbCreate(JobModel jobModel) throws DAOException
jobModel
- state value of Job EJBDAOException
- public java.lang.Long ejbFindByPrimaryKey(java.lang.Long jobId) throws DAOException
jobId
- key value of instanceDAOException
- public java.lang.Long ejbFindByName(java.lang.String companyId, java.lang.String name) throws DAOException
companyId
- current companyname
- job nameDAOException
- public boolean ejbRemove(java.lang.Long jobId) throws DAOException
jobId
- key value of instanceDAOException
- public void ejbLoad(java.lang.Long jobId) throws DAOException
jobId
- key value of instanceDAOException
- public void ejbStore(JobModel jobModel) throws DAOException
jobModel
- state value of Job EJBDAOException
- private boolean existsKey(java.lang.Long jobId) throws DAOException
jobId
- identifier of the jobDAOException
- private java.lang.Long existsJobByName(java.lang.String companyId, java.lang.String name) throws DAOException
companyId
- current companyname
- job nameDAOException
- private void insertJob() throws DAOException
DAOException
- private java.lang.Long selectJobId() throws DAOException
DAOException
- private java.sql.Date selectVersion() throws DAOException
DAOException
- private void insertJobSELECT() throws DAOException
DAOException
- private void insertJobWHERE() throws DAOException
DAOException
- private void insertJobORDER() throws DAOException
DAOException
- private void deleteJob() throws DAOException
DAOException
- private void deleteJobSELECT() throws DAOException
DAOException
- private void deleteJobWHERE() throws DAOException
DAOException
- private void deleteJobORDER() throws DAOException
DAOException
- private boolean existsJobLogs() throws DAOException
DAOException
- private void deleteJobLogs() throws DAOException
DAOException
- private void selectJob() throws DAOException
DAOException
- private void selectJobSELECT() throws DAOException
DAOException
- private void selectJobWHERE() throws DAOException
DAOException
- private void selectJobORDER() throws DAOException
DAOException
- private void updateJob() throws DAOException
DAOException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |