|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.instantbank.component.job.ejb.JobEJB
Entity BMP EJB for modeling a job (master-details)
Field Summary | |
private AuxGenerateSQLtext |
auxSQL
supports SQL sentence generation |
private javax.ejb.EntityContext |
context
entity context |
private Debug |
debug
for debug |
private JobDAO |
jobDao
JobDAO object for interacting with the database |
private JobModel |
jobModel
|
Constructor Summary | |
JobEJB()
Constructor |
Method Summary | |
private java.lang.String |
buildFROM(java.util.ArrayList participantTables)
Generate job sqlText corresponding to FROM part |
private java.lang.String |
buildORDER()
Generate job sqlText corresponding to ORDER part. |
private java.lang.String |
buildSELECT()
Generate job sqlText corresponding to SELECT part |
private java.lang.String |
buildWHERE_CONDITIONS()
Generate job sqlText corresponding to WHERE conditions part |
private java.lang.String |
buildWHERE_JOINS(java.util.ArrayList participantTables)
Generate job sqlText corresponding to WHERE join part |
void |
ejbActivate()
Actions after swapping |
java.lang.Long |
ejbCreate(java.lang.String companyId,
java.lang.Long userId,
java.lang.String name,
long ftpPrimaryId,
long ftpAlternateId)
Assigns value to the state of the new ejb instance, in main memory and in the database. |
java.lang.Long |
ejbFindByName(java.lang.String companyId,
java.lang.String name)
Finds an existent ejb instance in the database |
java.lang.Long |
ejbFindByPrimaryKey(java.lang.Long jobId)
Finds an existentf ejb instance in the database |
void |
ejbLoad()
Loads from database state of ejb instance |
void |
ejbPassivate()
Actions before swapping |
void |
ejbPostCreate(java.lang.String companyId,
java.lang.Long userId,
java.lang.String name,
long ftpPrimaryId,
long ftpAlternateId)
Additional action after ejbCreate() method. |
void |
ejbRemove()
Removes ejb instance from the database. |
void |
ejbStore()
Stores in database the state of ejb instance |
java.lang.String |
generateSQLtext(java.util.Hashtable systemFields,
java.util.Hashtable systemAlias,
java.lang.String rootType)
Generate sqlText associated to the job (updates state of ejb instance: jobModel.sqlText) |
private JobDAO |
getDao()
Obtains a DAO instance assigning it to jobDao attribute |
JobModel |
getState()
Gets state value of ejb instance |
void |
setDescription(java.lang.String description)
Sets value to the description of ejb instance (updates state of ejb instance: jobModel.description) |
void |
setEntityContext(javax.ejb.EntityContext sc)
Set session context |
void |
setJobORDER(java.util.Collection jobORDER)
Sets value to the jobORDER of ejb instance (updates state of ejb instance: jobModel.jobORDER) |
void |
setJobSELECT(java.util.Collection jobSELECT)
Sets value to the jobSELECT of ejb instance (updates state of ejb instance: jobModel.jobSELECT) |
void |
setJobWHERE(java.util.Collection jobWHERE)
Sets value to the jobWHERE of ejb instance (updates state of ejb instance: jobModel.jobWHERE) |
void |
setState(JobModel jobModel)
Sets value to the state of ejb instance |
void |
setTemplate(long templateCode)
Sets value to the templateCode of ejb instance (updates state of ejb instance: jobModel.templateCode) |
void |
unsetEntityContext()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
private JobModel jobModel
private javax.ejb.EntityContext context
private JobDAO jobDao
private AuxGenerateSQLtext auxSQL
private Debug debug
Constructor Detail |
public JobEJB()
Method Detail |
public void setEntityContext(javax.ejb.EntityContext sc)
setEntityContext
in interface javax.ejb.EntityBean
sc
- The new sessionContext valuepublic void unsetEntityContext()
unsetEntityContext
in interface javax.ejb.EntityBean
public void ejbActivate()
ejbActivate
in interface javax.ejb.EntityBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.EntityBean
public java.lang.Long ejbCreate(java.lang.String companyId, java.lang.Long userId, java.lang.String name, long ftpPrimaryId, long ftpAlternateId) throws javax.ejb.CreateException
companyId
- current companyuserId
- current username
- job nameftpPrimaryId
- a ftp location id of the company
(it csn be LetterTemplateGlobals.UNDEF)ftpAlternateId
- an alternate ftp location id of the company
(it csn be LetterTemplateGlobals.UNDEF)javax.ejb.CreateException
- public void ejbPostCreate(java.lang.String companyId, java.lang.Long userId, java.lang.String name, long ftpPrimaryId, long ftpAlternateId) throws javax.ejb.CreateException
companyId
- current companyuserId
- current username
- job nameftpPrimaryId
- a ftp location id of the companyftpAlternateId
- an alternate ftp location id of the companyjavax.ejb.CreateException
- public java.lang.Long ejbFindByPrimaryKey(java.lang.Long jobId) throws javax.ejb.FinderException
jobId
- key value of instancejavax.ejb.FinderException
- public java.lang.Long ejbFindByName(java.lang.String companyId, java.lang.String name) throws javax.ejb.FinderException
companyId
- current companyname
- job namejavax.ejb.FinderException
- public void ejbRemove() throws javax.ejb.RemoveException
ejbRemove
in interface javax.ejb.EntityBean
javax.ejb.RemoveException
- public void ejbLoad()
ejbLoad
in interface javax.ejb.EntityBean
public void ejbStore()
ejbStore
in interface javax.ejb.EntityBean
public JobModel getState()
public void setState(JobModel jobModel)
jobModel
- new value to assign to jobModel attributepublic void setTemplate(long templateCode)
templateCode
- new value to assign to templateCodepublic void setDescription(java.lang.String description)
description
- new value to assign to descriptionpublic void setJobSELECT(java.util.Collection jobSELECT)
jobSELECT
- new value to assign to jobSELECTpublic void setJobWHERE(java.util.Collection jobWHERE)
jobWHERE
- new value to assign to jobWHEREpublic void setJobORDER(java.util.Collection jobORDER)
jobORDER
- new value to assign to jobORDERpublic java.lang.String generateSQLtext(java.util.Hashtable systemFields, java.util.Hashtable systemAlias, java.lang.String rootType)
systemFields
- Hashtable of system Fields for current company
key: fieldId (in Long), value: Field objectsystemAlias
- Hashtable of system Alias
key: String = tableAlias|rootType
value: Alias objectrootType
- root type for joinsprivate java.lang.String buildSELECT()
private java.lang.String buildWHERE_JOINS(java.util.ArrayList participantTables)
participantTables
- output ArrayList of tables that participate in
the SQL sentence (initially empty for this method);
type of each element: ParticipantTable.private java.lang.String buildWHERE_CONDITIONS()
private java.lang.String buildFROM(java.util.ArrayList participantTables)
participantTables
- ArrayList of tables that participate in the
SQL sentence;
type of each element: ParticipantTable.private java.lang.String buildORDER()
private JobDAO getDao() throws DAOException
DAOException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |