java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.dal.dao.StandardDAO
Standard DAO ancestor
Field Summary | |
protected static int |
STORE_BOOLEAN_AS_INT
|
protected static int |
STORE_BOOLEAN_AS_STRING
|
protected static int |
STORE_BOOLEAN_DEFAULT
|
Constructor Summary | |
StandardDAO(java.lang.Class voClass,
SqlRequests sqlRequests)
|
Method Summary | |
protected void |
alterEntityBeanClass(java.lang.Class newClass)
Change the class of the bean associated with the current DAO |
protected void |
alterSqlSelectWithJoin(java.lang.String sJoinTables,
java.lang.String sJoinColumns,
java.lang.String sJoinCriteria)
Change the SQL SELECT by adding a JOIN |
protected abstract int |
beanToTable(QueryContext context,
java.lang.Object entity)
Set the table Data columns values from the Java Bean attributes ( except the Primary Key ) Must be implemented in the "concrete DAO" |
protected int |
beanToTableWithoutAutoInc(QueryContext context,
java.lang.Object entity)
Set the table columns values from the Java Bean attributes, except the Auto-Incremented Key column. |
ListQuery |
createQuery(Criteria criterias)
Creates a query on a single table with the given dynamic criterias, using only the useful criterias |
ListQuery |
createQuery(Criteria criterias,
java.lang.String sQueryEndOfSelect)
Creates a query on a single table with the given dynamic criterias and an additional clause, using only the useful criterias |
ListQuery |
createQuery(int iParamCount,
java.lang.String sQueryCriteria)
Creates a query on a single table with the given criteria ( force the number of criteria parameters ) |
ListQuery |
createQuery(int iParamCount,
java.lang.String sQueryCriteria,
java.lang.String sQueryEndOfSelect)
Creates a query on a single table with the given criteria and an additional clause ( force the number of criteria parameters ) |
ListQuery |
createQuery(java.lang.String sQueryCriteria)
Creates a query on a single table with the given criteria the number of SQL parameters is the number of '?' |
ListQuery |
createQuery(java.lang.String sQueryCriteria,
java.lang.String sQueryEndOfSelect)
Creates a query on a single table with the given criteria and an additional clause ( the number of SQL parameters is the number of '?' |
ListQuery |
createQueryAll()
Creates a query on a single table to get all the records |
ListQuery |
createQueryAll(java.lang.String sQueryEndOfSelect)
Creates a query on a single table to get all the records with an additional clause |
java.lang.String |
describe()
Describes the DAO |
protected int |
doCount(ListQuery query)
Count operation using a query |
protected int |
doCount(ListQuery query,
java.sql.Connection con)
Count operation using a query |
protected int |
doCount(ListQuery query,
DatabaseSession session)
Count operation using a query |
protected int |
doCount(ListQuery query,
int iDatabaseId)
Count operation using a query |
protected int |
doDelete(java.lang.Object bean)
|
protected int |
doDelete(java.lang.Object bean,
java.sql.Connection con)
|
protected int |
doDelete(java.lang.Object bean,
DatabaseSession session)
|
protected int |
doDelete(java.lang.Object bean,
int iDatabaseId)
|
protected int |
doDeleteList(ListQuery query)
Deletes list using a query |
protected int |
doDeleteList(ListQuery query,
java.sql.Connection con)
Deletes list using a query |
protected int |
doDeleteList(ListQuery query,
DatabaseSession session)
Deletes list using a query |
protected int |
doDeleteList(ListQuery query,
int iDatabaseId)
Deletes list using a query |
protected int |
doDeleteListItems(GenericVOList listData)
Deletes all items of the given VO list |
protected int |
doDeleteListItems(GenericVOList listData,
java.sql.Connection con)
Deletes all items of the given VO list |
protected int |
doDeleteListItems(GenericVOList listData,
DatabaseSession session)
Deletes all items of the given VO list |
protected int |
doDeleteListItems(GenericVOList listData,
int iDatabaseId)
Deletes all items of the given VO list |
protected int |
doDeleteListItems(java.util.List listData)
Deletes all items of the given standard list |
protected int |
doDeleteListItems(java.util.List listData,
java.sql.Connection con)
Deletes all items of the given standard list |
protected int |
doDeleteListItems(java.util.List listData,
DatabaseSession session)
Deletes all items of the given standard list |
protected int |
doDeleteListItems(java.util.List listData,
int iDatabaseId)
Deletes all items of the given standard list |
protected boolean |
doExists(java.lang.Object bean)
|
protected boolean |
doExists(java.lang.Object bean,
java.sql.Connection con)
|
protected boolean |
doExists(java.lang.Object bean,
DatabaseSession session)
|
protected boolean |
doExists(java.lang.Object bean,
int iDatabaseId)
|
protected int |
doInsert(java.lang.Object bean)
|
protected int |
doInsert(java.lang.Object bean,
java.sql.Connection con)
|
protected int |
doInsert(java.lang.Object bean,
DatabaseSession session)
|
protected int |
doInsert(java.lang.Object bean,
int iDatabaseId)
|
protected java.lang.Long |
doInsertKeyGen(java.lang.Object bean)
|
protected java.lang.Long |
doInsertKeyGen(java.lang.Object bean,
java.sql.Connection con)
|
protected java.lang.Long |
doInsertKeyGen(java.lang.Object bean,
DatabaseSession session)
|
protected java.lang.Long |
doInsertKeyGen(java.lang.Object bean,
int iDatabaseId)
|
protected int |
doInsertListItems(GenericVOList listData)
Inserts all items of the given VO list |
protected int |
doInsertListItems(GenericVOList listData,
java.sql.Connection con)
Inserts all items of the given VO list |
protected int |
doInsertListItems(GenericVOList listData,
DatabaseSession session)
Inserts all items of the given VO list |
protected int |
doInsertListItems(GenericVOList listData,
int iDatabaseId)
Inserts all items of the given VO list |
protected int |
doInsertListItems(java.util.List listData)
Inserts all items of the given standard list |
protected int |
doInsertListItems(java.util.List listData,
java.sql.Connection con)
Inserts all items of the given standard list |
protected int |
doInsertListItems(java.util.List listData,
DatabaseSession session)
Inserts all items of the given standard list |
protected int |
doInsertListItems(java.util.List listData,
int iDatabaseId)
Inserts all items of the given standard list |
protected int |
doLoad(java.lang.Object bean)
|
protected int |
doLoad(java.lang.Object bean,
java.sql.Connection con)
|
protected int |
doLoad(java.lang.Object bean,
DatabaseSession session)
|
protected int |
doLoad(java.lang.Object bean,
int iDatabaseId)
|
protected int |
doLoad(java.lang.Object bean,
java.lang.String sOptionalClause)
|
protected int |
doLoad(java.lang.Object bean,
java.lang.String sOptionalClause,
java.sql.Connection con)
|
protected int |
doLoad(java.lang.Object bean,
java.lang.String sOptionalClause,
DatabaseSession session)
|
protected int |
doLoad(java.lang.Object bean,
java.lang.String sOptionalClause,
int iDatabaseId)
|
protected int |
doLoadList(ListQuery query,
GenericVOList listData)
Loads a VO list using a query |
protected int |
doLoadList(ListQuery query,
GenericVOList listData,
java.sql.Connection con)
Loads a VO list using a query |
protected int |
doLoadList(ListQuery query,
GenericVOList listData,
DatabaseSession session)
Loads a VO list using a query |
protected int |
doLoadList(ListQuery query,
GenericVOList listData,
int iDatabaseId)
Loads a VO list using a query |
protected int |
doLoadList(ListQuery query,
java.util.List listData)
Loads a standard list using a query |
protected int |
doLoadList(ListQuery query,
java.util.List listData,
java.sql.Connection con)
Loads a standard list using a query |
protected int |
doLoadList(ListQuery query,
java.util.List listData,
DatabaseSession session)
Loads a standard list using a query |
protected int |
doLoadList(ListQuery query,
java.util.List listData,
int iDatabaseId)
Loads a standard list using a query |
protected int |
doSave(java.lang.Object bean)
|
protected int |
doSave(java.lang.Object bean,
java.sql.Connection con)
|
protected int |
doSave(java.lang.Object bean,
DatabaseSession session)
|
protected int |
doSave(java.lang.Object bean,
int iDatabaseId)
|
protected int |
doSaveList(ListQuery query,
GenericVOList listData)
Saves a VO list using a query criterias |
protected int |
doSaveList(ListQuery query,
GenericVOList listData,
java.sql.Connection con)
Saves a VO list using a query criterias |
protected int |
doSaveList(ListQuery query,
GenericVOList listData,
DatabaseSession session)
Saves a VO list using a query criterias |
protected int |
doSaveList(ListQuery query,
GenericVOList listData,
int iDatabaseId)
Saves a VO list using a query criterias |
protected int |
doSaveList(ListQuery query,
java.util.List listData)
Saves a standard list using a query criterias |
protected int |
doSaveList(ListQuery query,
java.util.List listData,
java.sql.Connection con)
Saves a standard list using a query criterias |
protected int |
doSaveList(ListQuery query,
java.util.List listData,
DatabaseSession session)
Saves a standard list using a query criterias |
protected int |
doSaveList(ListQuery query,
java.util.List listData,
int iDatabaseId)
Saves a standard list using a query criterias |
protected int |
doUpdate(java.lang.Object bean)
|
protected int |
doUpdate(java.lang.Object bean,
java.sql.Connection con)
|
protected int |
doUpdate(java.lang.Object bean,
DatabaseSession session)
|
protected int |
doUpdate(java.lang.Object bean,
int iDatabaseId)
|
protected int |
doUpdateListItems(GenericVOList listData)
Updates all items of the given VO list |
protected int |
doUpdateListItems(GenericVOList listData,
java.sql.Connection con)
Updates all items of the given VO list |
protected int |
doUpdateListItems(GenericVOList listData,
DatabaseSession session)
Updates all items of the given VO list |
protected int |
doUpdateListItems(GenericVOList listData,
int iDatabaseId)
Updates all items of the given VO list |
protected int |
doUpdateListItems(java.util.List listData)
Updates all items of the given standard list |
protected int |
doUpdateListItems(java.util.List listData,
java.sql.Connection con)
Updates all items of the given standard list |
protected int |
doUpdateListItems(java.util.List listData,
DatabaseSession session)
Updates all items of the given standard list |
protected int |
doUpdateListItems(java.util.List listData,
int iDatabaseId)
Updates all items of the given standard list |
protected int |
getBooleanStorage()
Return the boolean storage type |
java.lang.Class |
getEntityBeanClass()
Returns the class of the Value Object managed by the current DAO |
protected boolean |
getSaveByDeleteInsert()
|
SqlRequests |
getSqlRequests()
Returns the SQL Requests built for the current DAO |
java.lang.String |
getTableName()
Returns the name of the table managed by the current DAO |
protected abstract void |
setPrimaryKey(QueryContext context,
java.lang.Object entity)
Set the table Primary Key columns values from the Java Bean attributes Must be implemented in the "concrete DAO" |
protected void |
setSaveByDeleteInsert(boolean bFlag)
|
protected void |
storeBooleanAsInt()
Set the boolean storage type to "int" |
protected void |
storeBooleanAsString()
Set the boolean storage type to "String" |
protected abstract int |
tableToBean(QueryContext context,
java.lang.Object entity)
Set the Java Bean attributes values from the table columns Must be implemented in the "concrete DAO" |
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int STORE_BOOLEAN_DEFAULT
protected static final int STORE_BOOLEAN_AS_INT
protected static final int STORE_BOOLEAN_AS_STRING
Constructor Detail |
public StandardDAO(java.lang.Class voClass, SqlRequests sqlRequests)
Method Detail |
protected abstract void setPrimaryKey(QueryContext context, java.lang.Object entity) throws TelosysException
context
- entity
-
TelosysException
protected abstract int tableToBean(QueryContext context, java.lang.Object entity) throws TelosysException
context
- entity
-
TelosysException
protected abstract int beanToTable(QueryContext context, java.lang.Object entity) throws TelosysException
context
- entity
-
TelosysException
protected int beanToTableWithoutAutoInc(QueryContext context, java.lang.Object entity) throws TelosysException
context
- entity
-
TelosysException
public java.lang.Class getEntityBeanClass()
public java.lang.String getTableName()
public SqlRequests getSqlRequests()
protected void storeBooleanAsInt()
protected void storeBooleanAsString()
protected int getBooleanStorage()
protected void setSaveByDeleteInsert(boolean bFlag)
protected boolean getSaveByDeleteInsert()
public ListQuery createQueryAll() throws TelosysException
PdcException
TelosysException
public ListQuery createQueryAll(java.lang.String sQueryEndOfSelect) throws TelosysException
sQueryEndOfSelect
- :
the additional SQL clause ( ie : order by )
PdcException
TelosysException
public ListQuery createQuery(java.lang.String sQueryCriteria) throws TelosysException
sQueryCriteria
- :
SQL criteria for the WHERE clause
TelosysException
public ListQuery createQuery(int iParamCount, java.lang.String sQueryCriteria) throws TelosysException
iParamCount
- :
number of parameters in the criteriasQueryCriteria
- :
SQL criteria for the WHERE clause
TelosysException
public ListQuery createQuery(java.lang.String sQueryCriteria, java.lang.String sQueryEndOfSelect) throws TelosysException
sQueryCriteria
- the SQL criteria for the WHERE clausesQueryEndOfSelect
- :
the additional SQL clause ( e.g. : order by )
TelosysException
public ListQuery createQuery(int iParamCount, java.lang.String sQueryCriteria, java.lang.String sQueryEndOfSelect) throws TelosysException
iParamCount
- the number of SQL parameters in the criteriasQueryCriteria
- the SQL criteria for the WHERE clausesQueryEndOfSelect
- :
the additional SQL clause ( e.g. : order by )
TelosysException
public ListQuery createQuery(Criteria criterias, java.lang.String sQueryEndOfSelect) throws TelosysException
criterias
- sQueryEndOfSelect
- :
the additional SQL clause ( ie : order by )
TelosysException
public ListQuery createQuery(Criteria criterias) throws TelosysException
criterias
-
TelosysException
protected void alterSqlSelectWithJoin(java.lang.String sJoinTables, java.lang.String sJoinColumns, java.lang.String sJoinCriteria)
sJoinTables
- sJoinColumns
- sJoinCriteria
- protected void alterEntityBeanClass(java.lang.Class newClass)
newClass
- protected int doLoad(java.lang.Object bean) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, java.lang.String sOptionalClause) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, java.lang.String sOptionalClause, int iDatabaseId) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, java.lang.String sOptionalClause, DatabaseSession session) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected int doLoad(java.lang.Object bean, java.lang.String sOptionalClause, java.sql.Connection con) throws TelosysException
TelosysException
protected boolean doExists(java.lang.Object bean) throws TelosysException
TelosysException
protected boolean doExists(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected boolean doExists(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected boolean doExists(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected int doSave(java.lang.Object bean) throws TelosysException
TelosysException
protected int doSave(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected int doSave(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected int doSave(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected int doInsert(java.lang.Object bean) throws TelosysException
TelosysException
protected int doInsert(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected int doInsert(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected int doInsert(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected java.lang.Long doInsertKeyGen(java.lang.Object bean) throws TelosysException
TelosysException
protected java.lang.Long doInsertKeyGen(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected java.lang.Long doInsertKeyGen(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected java.lang.Long doInsertKeyGen(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected int doUpdate(java.lang.Object bean) throws TelosysException
TelosysException
protected int doUpdate(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected int doUpdate(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected int doUpdate(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected int doDelete(java.lang.Object bean) throws TelosysException
TelosysException
protected int doDelete(java.lang.Object bean, int iDatabaseId) throws TelosysException
TelosysException
protected int doDelete(java.lang.Object bean, DatabaseSession session) throws TelosysException
TelosysException
protected int doDelete(java.lang.Object bean, java.sql.Connection con) throws TelosysException
TelosysException
protected int doLoadList(ListQuery query, java.util.List listData) throws TelosysException
query
- listData
-
TelosysException
protected int doLoadList(ListQuery query, GenericVOList listData) throws TelosysException
query
- listData
-
TelosysException
protected int doLoadList(ListQuery query, java.util.List listData, int iDatabaseId) throws TelosysException
query
- listData
- iDatabaseId
-
TelosysException
protected int doLoadList(ListQuery query, GenericVOList listData, int iDatabaseId) throws TelosysException
query
- listData
- iDatabaseId
-
TelosysException
protected int doLoadList(ListQuery query, java.util.List listData, DatabaseSession session) throws TelosysException
query
- listData
- session
-
TelosysException
protected int doLoadList(ListQuery query, GenericVOList listData, DatabaseSession session) throws TelosysException
query
- listData
- session
-
TelosysException
protected int doLoadList(ListQuery query, java.util.List listData, java.sql.Connection con) throws TelosysException
query
- listData
- con
-
TelosysException
protected int doLoadList(ListQuery query, GenericVOList listData, java.sql.Connection con) throws TelosysException
query
- listData
- con
-
TelosysException
protected int doSaveList(ListQuery query, java.util.List listData) throws TelosysException
query
- listData
-
TelosysException
protected int doSaveList(ListQuery query, GenericVOList listData) throws TelosysException
query
- listData
-
TelosysException
protected int doSaveList(ListQuery query, java.util.List listData, int iDatabaseId) throws TelosysException
query
- listData
- iDatabaseId
-
TelosysException
protected int doSaveList(ListQuery query, GenericVOList listData, int iDatabaseId) throws TelosysException
query
- listData
- iDatabaseId
-
TelosysException
protected int doSaveList(ListQuery query, java.util.List listData, DatabaseSession session) throws TelosysException
query
- listData
- session
-
TelosysException
protected int doSaveList(ListQuery query, GenericVOList listData, DatabaseSession session) throws TelosysException
query
- listData
- session
-
TelosysException
protected int doSaveList(ListQuery query, java.util.List listData, java.sql.Connection con) throws TelosysException
query
- listData
- con
-
TelosysException
protected int doSaveList(ListQuery query, GenericVOList listData, java.sql.Connection con) throws TelosysException
query
- listData
- con
-
TelosysException
protected int doDeleteList(ListQuery query) throws TelosysException
query
-
TelosysException
protected int doDeleteList(ListQuery query, int iDatabaseId) throws TelosysException
query
- iDatabaseId
-
TelosysException
protected int doDeleteList(ListQuery query, DatabaseSession session) throws TelosysException
query
- session
-
TelosysException
protected int doDeleteList(ListQuery query, java.sql.Connection con) throws TelosysException
query
- con
-
TelosysException
protected int doInsertListItems(GenericVOList listData) throws TelosysException
listData
-
TelosysException
protected int doInsertListItems(GenericVOList listData, int iDatabaseId) throws TelosysException
listData
- iDatabaseId
-
TelosysException
protected int doInsertListItems(GenericVOList listData, DatabaseSession session) throws TelosysException
listData
- session
-
TelosysException
protected int doInsertListItems(GenericVOList listData, java.sql.Connection con) throws TelosysException
listData
- con
-
TelosysException
protected int doInsertListItems(java.util.List listData) throws TelosysException
listData
-
TelosysException
protected int doInsertListItems(java.util.List listData, int iDatabaseId) throws TelosysException
listData
- iDatabaseId
-
TelosysException
protected int doInsertListItems(java.util.List listData, DatabaseSession session) throws TelosysException
listData
- session
-
TelosysException
protected int doInsertListItems(java.util.List listData, java.sql.Connection con) throws TelosysException
listData
- con
-
TelosysException
protected int doUpdateListItems(GenericVOList listData) throws TelosysException
listData
-
TelosysException
protected int doUpdateListItems(GenericVOList listData, int iDatabaseId) throws TelosysException
listData
- iDatabaseId
-
TelosysException
protected int doUpdateListItems(GenericVOList listData, DatabaseSession session) throws TelosysException
listData
- session
-
TelosysException
protected int doUpdateListItems(GenericVOList listData, java.sql.Connection con) throws TelosysException
listData
- con
-
TelosysException
protected int doUpdateListItems(java.util.List listData) throws TelosysException
listData
-
TelosysException
protected int doUpdateListItems(java.util.List listData, int iDatabaseId) throws TelosysException
listData
- iDatabaseId
-
TelosysException
protected int doUpdateListItems(java.util.List listData, DatabaseSession session) throws TelosysException
listData
- session
-
TelosysException
protected int doUpdateListItems(java.util.List listData, java.sql.Connection con) throws TelosysException
listData
- con
-
TelosysException
protected int doDeleteListItems(GenericVOList listData) throws TelosysException
listData
-
TelosysException
protected int doDeleteListItems(GenericVOList listData, int iDatabaseId) throws TelosysException
listData
- iDatabaseId
-
TelosysException
protected int doDeleteListItems(GenericVOList listData, DatabaseSession session) throws TelosysException
listData
- session
-
TelosysException
protected int doDeleteListItems(GenericVOList listData, java.sql.Connection con) throws TelosysException
listData
- con
-
TelosysException
protected int doDeleteListItems(java.util.List listData) throws TelosysException
listData
-
TelosysException
protected int doDeleteListItems(java.util.List listData, int iDatabaseId) throws TelosysException
listData
- iDatabaseId
-
TelosysException
protected int doDeleteListItems(java.util.List listData, DatabaseSession session) throws TelosysException
listData
- session
-
TelosysException
protected int doDeleteListItems(java.util.List listData, java.sql.Connection con) throws TelosysException
listData
- con
-
TelosysException
protected int doCount(ListQuery query) throws TelosysException
query
-
TelosysException
protected int doCount(ListQuery query, int iDatabaseId) throws TelosysException
query
- iDatabaseId
-
TelosysException
protected int doCount(ListQuery query, DatabaseSession session) throws TelosysException
query
- session
-
TelosysException
protected int doCount(ListQuery query, java.sql.Connection con) throws TelosysException
query
- con
-
TelosysException
public java.lang.String describe()