org.objectweb.telosys.dal.dao
Class StandardDAO

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysObject
      extended byorg.objectweb.telosys.dal.dao.StandardDAO

public abstract class StandardDAO
extends TelosysObject

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 beanClass, SqlRequests sqlRequests)
          Constructor
 
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 criteria)
          Creates a query on a single table with the given dynamic criterias,
using only the useful criterias
 ListQuery createQuery(Criteria criteria, 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)
          Deletes the given bean in the table if it exists
protected  int doDelete(java.lang.Object bean, java.sql.Connection con)
          Deletes the given bean in the table if it exists
protected  int doDelete(java.lang.Object bean, DatabaseSession session)
          Deletes the given bean in the table if it exists
protected  int doDelete(java.lang.Object bean, int iDatabaseId)
          Deletes the given bean in the table if it exists
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)
          Checks the existence of the given bean in the table
protected  boolean doExists(java.lang.Object bean, java.sql.Connection con)
          Checks the existence of the given bean in the table
protected  boolean doExists(java.lang.Object bean, DatabaseSession session)
          Checks the existence of the given bean in the table
protected  boolean doExists(java.lang.Object bean, int iDatabaseId)
          Checks the existence of the given bean in the table
protected  int doInsert(java.lang.Object bean)
          Tries to insert the given bean in the table (potential duplicate key error)
protected  int doInsert(java.lang.Object bean, java.sql.Connection con)
          Tries to insert the given bean in the table (potential duplicate key error)
protected  int doInsert(java.lang.Object bean, DatabaseSession session)
          Tries to insert the given bean in the table (potential duplicate key error)
protected  int doInsert(java.lang.Object bean, int iDatabaseId)
          Tries to insert the given bean in the table (potential duplicate key error)
protected  java.lang.Long doInsertKeyGen(java.lang.Object bean)
          Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases
protected  java.lang.Long doInsertKeyGen(java.lang.Object bean, java.sql.Connection con)
          Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases
protected  java.lang.Long doInsertKeyGen(java.lang.Object bean, DatabaseSession session)
          Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases
protected  java.lang.Long doInsertKeyGen(java.lang.Object bean, int iDatabaseId)
          Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases
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)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, java.sql.Connection con)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, DatabaseSession session)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, int iDatabaseId)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, java.lang.String sOptionalClause)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, java.lang.String sOptionalClause, java.sql.Connection con)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, java.lang.String sOptionalClause, DatabaseSession session)
          Tries to load the given bean (the PK values must be in the bean itself)
protected  int doLoad(java.lang.Object bean, java.lang.String sOptionalClause, int iDatabaseId)
          Tries to load the given bean (the PK values must be in the bean itself)
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)
          Saves the given bean in the table
protected  int doSave(java.lang.Object bean, java.sql.Connection con)
          Saves the given bean in the table
protected  int doSave(java.lang.Object bean, DatabaseSession session)
          Saves the given bean in the table
protected  int doSave(java.lang.Object bean, int iDatabaseId)
          Saves the given bean in the table
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)
          Updates the given bean in the table if it exists
protected  int doUpdate(java.lang.Object bean, java.sql.Connection con)
          Updates the given bean in the table if it exists
protected  int doUpdate(java.lang.Object bean, DatabaseSession session)
          Updates the given bean in the table if it exists
protected  int doUpdate(java.lang.Object bean, int iDatabaseId)
          Updates the given bean in the table if it exists
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()
          Deprecated.  
 java.lang.Class getEntityBeanClass()
          Returns the class of the Value Object managed by the current DAO
protected  boolean getSaveByDeleteInsert()
          Returns true if the "save" operation is based on "delete+insert"
 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)
          Set the "save" operation behavior
. true : systematically call "delete" then "insert" ( NB : potential problems if Foreign Keys )
. false : check the existence of the key (select) if exists "update" else "insert" (default behavior)
protected  void storeBooleanAsInt()
          Deprecated.  
protected  void storeBooleanAsString()
          Deprecated.  
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

STORE_BOOLEAN_DEFAULT

protected static final int STORE_BOOLEAN_DEFAULT
See Also:
Constant Field Values

STORE_BOOLEAN_AS_INT

protected static final int STORE_BOOLEAN_AS_INT
See Also:
Constant Field Values

STORE_BOOLEAN_AS_STRING

protected static final int STORE_BOOLEAN_AS_STRING
See Also:
Constant Field Values
Constructor Detail

StandardDAO

public StandardDAO(java.lang.Class beanClass,
                   SqlRequests sqlRequests)
Constructor

Parameters:
beanClass -
sqlRequests -
Method Detail

setPrimaryKey

protected abstract void setPrimaryKey(QueryContext context,
                                      java.lang.Object entity)
                               throws TelosysException
Set the table Primary Key columns values from the Java Bean attributes Must be implemented in the "concrete DAO"

Parameters:
context -
entity -
Throws:
TelosysException

tableToBean

protected abstract int tableToBean(QueryContext context,
                                   java.lang.Object entity)
                            throws TelosysException
Set the Java Bean attributes values from the table columns Must be implemented in the "concrete DAO"

Parameters:
context -
entity -
Returns:
Throws:
TelosysException

beanToTable

protected abstract int beanToTable(QueryContext context,
                                   java.lang.Object entity)
                            throws TelosysException
Set the table Data columns values from the Java Bean attributes ( except the Primary Key ) Must be implemented in the "concrete DAO"

Parameters:
context -
entity -
Returns:
Throws:
TelosysException

beanToTableWithoutAutoInc

protected int beanToTableWithoutAutoInc(QueryContext context,
                                        java.lang.Object entity)
                                 throws TelosysException
Set the table columns values from the Java Bean attributes, except the Auto-Incremented Key column. It is dedicated to SQL INSERT operations on a table with an "Auto-Incremented Key". This method is designed to be overriden in the "concrete DAO" only if necessary. It is required only if the table has an Auto-Incremented Key ( it's default behavior throws an Exception )

Parameters:
context -
entity -
Returns:
Throws:
TelosysException

getEntityBeanClass

public java.lang.Class getEntityBeanClass()
Returns the class of the Value Object managed by the current DAO

Returns:

getTableName

public java.lang.String getTableName()
Returns the name of the table managed by the current DAO

Returns:

getSqlRequests

public SqlRequests getSqlRequests()
Returns the SQL Requests built for the current DAO

Returns:

storeBooleanAsInt

protected void storeBooleanAsInt()
Deprecated.  

Set the boolean storage type to "int" This method is deprecated : the boolean storage is now managed by the QueryContext
( see : setParamBooleanAsInt, setParamBooleanAsString, getResultBooleanFromInt, getResultBooleanFromString )


storeBooleanAsString

protected void storeBooleanAsString()
Deprecated.  

Set the boolean storage type to "String" This method is deprecated : the boolean storage is now managed by the QueryContext
( see : setParamBooleanAsInt, setParamBooleanAsString, getResultBooleanFromInt, getResultBooleanFromString )


getBooleanStorage

protected int getBooleanStorage()
Deprecated.  

Return the boolean storage type This method is deprecated : the boolean storage is now managed by the QueryContext
( see : setParamBooleanAsInt, setParamBooleanAsString, getResultBooleanFromInt, getResultBooleanFromString )

Returns:

setSaveByDeleteInsert

protected void setSaveByDeleteInsert(boolean bFlag)
Set the "save" operation behavior
. true : systematically call "delete" then "insert" ( NB : potential problems if Foreign Keys )
. false : check the existence of the key (select) if exists "update" else "insert" (default behavior)

Parameters:
bFlag -

getSaveByDeleteInsert

protected boolean getSaveByDeleteInsert()
Returns true if the "save" operation is based on "delete+insert"

Returns:
true if "delete+insert" has been forced, false if standard behavior

createQueryAll

public ListQuery createQueryAll()
                         throws TelosysException
Creates a query on a single table to get all the records

Returns:
Throws:
PdcException
TelosysException

createQueryAll

public ListQuery createQueryAll(java.lang.String sQueryEndOfSelect)
                         throws TelosysException
Creates a query on a single table to get all the records with an additional clause

Parameters:
sQueryEndOfSelect - : the additional SQL clause ( ie : order by )
Returns:
Throws:
PdcException
TelosysException

createQuery

public ListQuery createQuery(java.lang.String sQueryCriteria)
                      throws TelosysException
Creates a query on a single table with the given criteria
the number of SQL parameters is the number of '?' in the string

Parameters:
sQueryCriteria - : SQL criteria for the WHERE clause
Returns:
Throws:
TelosysException

createQuery

public ListQuery createQuery(int iParamCount,
                             java.lang.String sQueryCriteria)
                      throws TelosysException
Creates a query on a single table with the given criteria
( force the number of criteria parameters )

Parameters:
iParamCount - : number of parameters in the criteria
sQueryCriteria - : SQL criteria for the WHERE clause
Returns:
Throws:
TelosysException

createQuery

public ListQuery createQuery(java.lang.String sQueryCriteria,
                             java.lang.String sQueryEndOfSelect)
                      throws TelosysException
Creates a query on a single table with the given criteria and an additional clause
( the number of SQL parameters is the number of '?' in the string )

Parameters:
sQueryCriteria - the SQL criteria for the WHERE clause
sQueryEndOfSelect - : the additional SQL clause ( e.g. : order by )
Returns:
Throws:
TelosysException

createQuery

public ListQuery createQuery(int iParamCount,
                             java.lang.String sQueryCriteria,
                             java.lang.String sQueryEndOfSelect)
                      throws TelosysException
Creates a query on a single table with the given criteria and an additional clause
( force the number of criteria parameters )

Parameters:
iParamCount - the number of SQL parameters in the criteria
sQueryCriteria - the SQL criteria for the WHERE clause
sQueryEndOfSelect - : the additional SQL clause ( e.g. : order by )
Returns:
Throws:
TelosysException

createQuery

public ListQuery createQuery(Criteria criteria,
                             java.lang.String sQueryEndOfSelect)
                      throws TelosysException
Creates a query on a single table with the given dynamic criterias and an additional clause,
using only the useful criterias

Parameters:
criteria -
sQueryEndOfSelect - : the additional SQL clause ( ie : order by )
Returns:
Throws:
TelosysException

createQuery

public ListQuery createQuery(Criteria criteria)
                      throws TelosysException
Creates a query on a single table with the given dynamic criterias,
using only the useful criterias

Parameters:
criteria -
Returns:
Throws:
TelosysException

alterSqlSelectWithJoin

protected void alterSqlSelectWithJoin(java.lang.String sJoinTables,
                                      java.lang.String sJoinColumns,
                                      java.lang.String sJoinCriteria)
Change the SQL SELECT by adding a JOIN

Parameters:
sJoinTables -
sJoinColumns -
sJoinCriteria -

alterEntityBeanClass

protected void alterEntityBeanClass(java.lang.Class newClass)
Change the class of the bean associated with the current DAO

Parameters:
newClass -

doLoad

protected int doLoad(java.lang.Object bean)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     java.lang.String sOptionalClause)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
sOptionalClause - special select clause ( e.g. "FOR UPDATE" with Oracle )
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     int iDatabaseId)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
iDatabaseId -
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     java.lang.String sOptionalClause,
                     int iDatabaseId)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
sOptionalClause - special select clause ( e.g. "FOR UPDATE" with Oracle )
iDatabaseId -
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     DatabaseSession session)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
session -
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     java.lang.String sOptionalClause,
                     DatabaseSession session)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
sOptionalClause - special select clause ( e.g. "FOR UPDATE" with Oracle )
session -
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     java.sql.Connection con)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
con -
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doLoad

protected int doLoad(java.lang.Object bean,
                     java.lang.String sOptionalClause,
                     java.sql.Connection con)
              throws TelosysException
Tries to load the given bean (the PK values must be in the bean itself)

Parameters:
bean - the bean instance to load
sOptionalClause - special select clause ( e.g. "FOR UPDATE" with Oracle )
con -
Returns:
1 if the bean has been found and loaded, 0 if not found (bean instance not modified)
Throws:
TelosysException

doExists

protected boolean doExists(java.lang.Object bean)
                    throws TelosysException
Checks the existence of the given bean in the table

Parameters:
bean -
Returns:
true if the bean exists in the table, else false
Throws:
TelosysException

doExists

protected boolean doExists(java.lang.Object bean,
                           int iDatabaseId)
                    throws TelosysException
Checks the existence of the given bean in the table

Parameters:
bean -
iDatabaseId -
Returns:
true if the bean exists in the table, else false
Throws:
TelosysException

doExists

protected boolean doExists(java.lang.Object bean,
                           DatabaseSession session)
                    throws TelosysException
Checks the existence of the given bean in the table

Parameters:
bean -
session -
Returns:
true if the bean exists in the table, else false
Throws:
TelosysException

doExists

protected boolean doExists(java.lang.Object bean,
                           java.sql.Connection con)
                    throws TelosysException
Checks the existence of the given bean in the table

Parameters:
bean -
con -
Returns:
true if the bean exists in the table, else false
Throws:
TelosysException

doSave

protected int doSave(java.lang.Object bean)
              throws TelosysException
Saves the given bean in the table

Parameters:
bean -
Returns:
Throws:
TelosysException

doSave

protected int doSave(java.lang.Object bean,
                     int iDatabaseId)
              throws TelosysException
Saves the given bean in the table

Parameters:
bean -
iDatabaseId -
Returns:
Throws:
TelosysException

doSave

protected int doSave(java.lang.Object bean,
                     DatabaseSession session)
              throws TelosysException
Saves the given bean in the table

Parameters:
bean -
session -
Returns:
Throws:
TelosysException

doSave

protected int doSave(java.lang.Object bean,
                     java.sql.Connection con)
              throws TelosysException
Saves the given bean in the table

Parameters:
bean -
con -
Returns:
Throws:
TelosysException

doInsert

protected int doInsert(java.lang.Object bean)
                throws TelosysException
Tries to insert the given bean in the table (potential duplicate key error)

Parameters:
bean -
Returns:
Throws:
TelosysException

doInsert

protected int doInsert(java.lang.Object bean,
                       int iDatabaseId)
                throws TelosysException
Tries to insert the given bean in the table (potential duplicate key error)

Parameters:
bean -
iDatabaseId -
Returns:
Throws:
TelosysException

doInsert

protected int doInsert(java.lang.Object bean,
                       DatabaseSession session)
                throws TelosysException
Tries to insert the given bean in the table (potential duplicate key error)

Parameters:
bean -
session -
Returns:
Throws:
TelosysException

doInsert

protected int doInsert(java.lang.Object bean,
                       java.sql.Connection con)
                throws TelosysException
Tries to insert the given bean in the table (potential duplicate key error)

Parameters:
bean -
con -
Returns:
Throws:
TelosysException

doInsertKeyGen

protected java.lang.Long doInsertKeyGen(java.lang.Object bean)
                                 throws TelosysException
Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases

Parameters:
bean -
Returns:
the value of the generated key ( or null if none )
Throws:
TelosysException

doInsertKeyGen

protected java.lang.Long doInsertKeyGen(java.lang.Object bean,
                                        int iDatabaseId)
                                 throws TelosysException
Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases

Parameters:
bean -
iDatabaseId -
Returns:
the value of the generated key ( or null if none )
Throws:
TelosysException

doInsertKeyGen

protected java.lang.Long doInsertKeyGen(java.lang.Object bean,
                                        DatabaseSession session)
                                 throws TelosysException
Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases

Parameters:
bean -
session -
Returns:
the value of the generated key ( or null if none )
Throws:
TelosysException

doInsertKeyGen

protected java.lang.Long doInsertKeyGen(java.lang.Object bean,
                                        java.sql.Connection con)
                                 throws TelosysException
Insert the given bean in the table with an automatic key generation
NB : The "auto increment" capability is not available on all the databases

Parameters:
bean -
con -
Returns:
the value of the generated key ( or null if none )
Throws:
TelosysException

doUpdate

protected int doUpdate(java.lang.Object bean)
                throws TelosysException
Updates the given bean in the table if it exists

Parameters:
bean -
Returns:
1 if the bean has been found and updated, 0 if the bean doesn't exist
Throws:
TelosysException

doUpdate

protected int doUpdate(java.lang.Object bean,
                       int iDatabaseId)
                throws TelosysException
Updates the given bean in the table if it exists

Parameters:
bean -
iDatabaseId -
Returns:
1 if the bean has been found and updated, 0 if the bean doesn't exist
Throws:
TelosysException

doUpdate

protected int doUpdate(java.lang.Object bean,
                       DatabaseSession session)
                throws TelosysException
Updates the given bean in the table if it exists

Parameters:
bean -
session -
Returns:
1 if the bean has been found and updated, 0 if the bean doesn't exist
Throws:
TelosysException

doUpdate

protected int doUpdate(java.lang.Object bean,
                       java.sql.Connection con)
                throws TelosysException
Updates the given bean in the table if it exists

Parameters:
bean -
con -
Returns:
1 if the bean has been found and updated, 0 if the bean doesn't exist
Throws:
TelosysException

doDelete

protected int doDelete(java.lang.Object bean)
                throws TelosysException
Deletes the given bean in the table if it exists

Parameters:
bean -
Returns:
1 if the bean has been found and deleted, 0 if the bean doesn't exist
Throws:
TelosysException

doDelete

protected int doDelete(java.lang.Object bean,
                       int iDatabaseId)
                throws TelosysException
Deletes the given bean in the table if it exists

Parameters:
bean -
iDatabaseId -
Returns:
1 if the bean has been found and deleted, 0 if the bean doesn't exist
Throws:
TelosysException

doDelete

protected int doDelete(java.lang.Object bean,
                       DatabaseSession session)
                throws TelosysException
Deletes the given bean in the table if it exists

Parameters:
bean -
session -
Returns:
1 if the bean has been found and deleted, 0 if the bean doesn't exist
Throws:
TelosysException

doDelete

protected int doDelete(java.lang.Object bean,
                       java.sql.Connection con)
                throws TelosysException
Deletes the given bean in the table if it exists

Parameters:
bean -
con -
Returns:
1 if the bean has been found and deleted, 0 if the bean doesn't exist
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         java.util.List listData)
                  throws TelosysException
Loads a standard list using a query

Parameters:
query -
listData -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         GenericVOList listData)
                  throws TelosysException
Loads a VO list using a query

Parameters:
query -
listData -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         java.util.List listData,
                         int iDatabaseId)
                  throws TelosysException
Loads a standard list using a query

Parameters:
query -
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         GenericVOList listData,
                         int iDatabaseId)
                  throws TelosysException
Loads a VO list using a query

Parameters:
query -
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         java.util.List listData,
                         DatabaseSession session)
                  throws TelosysException
Loads a standard list using a query

Parameters:
query -
listData -
session -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         GenericVOList listData,
                         DatabaseSession session)
                  throws TelosysException
Loads a VO list using a query

Parameters:
query -
listData -
session -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         java.util.List listData,
                         java.sql.Connection con)
                  throws TelosysException
Loads a standard list using a query

Parameters:
query -
listData -
con -
Returns:
Throws:
TelosysException

doLoadList

protected int doLoadList(ListQuery query,
                         GenericVOList listData,
                         java.sql.Connection con)
                  throws TelosysException
Loads a VO list using a query

Parameters:
query -
listData -
con -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         java.util.List listData)
                  throws TelosysException
Saves a standard list using a query criterias

Parameters:
query -
listData -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         GenericVOList listData)
                  throws TelosysException
Saves a VO list using a query criterias

Parameters:
query -
listData -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         java.util.List listData,
                         int iDatabaseId)
                  throws TelosysException
Saves a standard list using a query criterias

Parameters:
query -
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         GenericVOList listData,
                         int iDatabaseId)
                  throws TelosysException
Saves a VO list using a query criterias

Parameters:
query -
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         java.util.List listData,
                         DatabaseSession session)
                  throws TelosysException
Saves a standard list using a query criterias

Parameters:
query -
listData -
session -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         GenericVOList listData,
                         DatabaseSession session)
                  throws TelosysException
Saves a VO list using a query criterias

Parameters:
query -
listData -
session -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         java.util.List listData,
                         java.sql.Connection con)
                  throws TelosysException
Saves a standard list using a query criterias

Parameters:
query -
listData -
con -
Returns:
Throws:
TelosysException

doSaveList

protected int doSaveList(ListQuery query,
                         GenericVOList listData,
                         java.sql.Connection con)
                  throws TelosysException
Saves a VO list using a query criterias

Parameters:
query -
listData -
con -
Returns:
Throws:
TelosysException

doDeleteList

protected int doDeleteList(ListQuery query)
                    throws TelosysException
Deletes list using a query

Parameters:
query -
Returns:
Throws:
TelosysException

doDeleteList

protected int doDeleteList(ListQuery query,
                           int iDatabaseId)
                    throws TelosysException
Deletes list using a query

Parameters:
query -
iDatabaseId -
Returns:
Throws:
TelosysException

doDeleteList

protected int doDeleteList(ListQuery query,
                           DatabaseSession session)
                    throws TelosysException
Deletes list using a query

Parameters:
query -
session -
Returns:
Throws:
TelosysException

doDeleteList

protected int doDeleteList(ListQuery query,
                           java.sql.Connection con)
                    throws TelosysException
Deletes list using a query

Parameters:
query -
con -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(GenericVOList listData)
                         throws TelosysException
Inserts all items of the given VO list

Parameters:
listData -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(GenericVOList listData,
                                int iDatabaseId)
                         throws TelosysException
Inserts all items of the given VO list

Parameters:
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(GenericVOList listData,
                                DatabaseSession session)
                         throws TelosysException
Inserts all items of the given VO list

Parameters:
listData -
session -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(GenericVOList listData,
                                java.sql.Connection con)
                         throws TelosysException
Inserts all items of the given VO list

Parameters:
listData -
con -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(java.util.List listData)
                         throws TelosysException
Inserts all items of the given standard list

Parameters:
listData -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(java.util.List listData,
                                int iDatabaseId)
                         throws TelosysException
Inserts all items of the given standard list

Parameters:
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(java.util.List listData,
                                DatabaseSession session)
                         throws TelosysException
Inserts all items of the given standard list

Parameters:
listData -
session -
Returns:
Throws:
TelosysException

doInsertListItems

protected int doInsertListItems(java.util.List listData,
                                java.sql.Connection con)
                         throws TelosysException
Inserts all items of the given standard list

Parameters:
listData -
con -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(GenericVOList listData)
                         throws TelosysException
Updates all items of the given VO list

Parameters:
listData -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(GenericVOList listData,
                                int iDatabaseId)
                         throws TelosysException
Updates all items of the given VO list

Parameters:
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(GenericVOList listData,
                                DatabaseSession session)
                         throws TelosysException
Updates all items of the given VO list

Parameters:
listData -
session -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(GenericVOList listData,
                                java.sql.Connection con)
                         throws TelosysException
Updates all items of the given VO list

Parameters:
listData -
con -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(java.util.List listData)
                         throws TelosysException
Updates all items of the given standard list

Parameters:
listData -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(java.util.List listData,
                                int iDatabaseId)
                         throws TelosysException
Updates all items of the given standard list

Parameters:
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(java.util.List listData,
                                DatabaseSession session)
                         throws TelosysException
Updates all items of the given standard list

Parameters:
listData -
session -
Returns:
Throws:
TelosysException

doUpdateListItems

protected int doUpdateListItems(java.util.List listData,
                                java.sql.Connection con)
                         throws TelosysException
Updates all items of the given standard list

Parameters:
listData -
con -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(GenericVOList listData)
                         throws TelosysException
Deletes all items of the given VO list

Parameters:
listData -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(GenericVOList listData,
                                int iDatabaseId)
                         throws TelosysException
Deletes all items of the given VO list

Parameters:
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(GenericVOList listData,
                                DatabaseSession session)
                         throws TelosysException
Deletes all items of the given VO list

Parameters:
listData -
session -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(GenericVOList listData,
                                java.sql.Connection con)
                         throws TelosysException
Deletes all items of the given VO list

Parameters:
listData -
con -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(java.util.List listData)
                         throws TelosysException
Deletes all items of the given standard list

Parameters:
listData -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(java.util.List listData,
                                int iDatabaseId)
                         throws TelosysException
Deletes all items of the given standard list

Parameters:
listData -
iDatabaseId -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(java.util.List listData,
                                DatabaseSession session)
                         throws TelosysException
Deletes all items of the given standard list

Parameters:
listData -
session -
Returns:
Throws:
TelosysException

doDeleteListItems

protected int doDeleteListItems(java.util.List listData,
                                java.sql.Connection con)
                         throws TelosysException
Deletes all items of the given standard list

Parameters:
listData -
con -
Returns:
Throws:
TelosysException

doCount

protected int doCount(ListQuery query)
               throws TelosysException
Count operation using a query

Parameters:
query -
Returns:
Throws:
TelosysException

doCount

protected int doCount(ListQuery query,
                      int iDatabaseId)
               throws TelosysException
Count operation using a query

Parameters:
query -
iDatabaseId -
Returns:
Throws:
TelosysException

doCount

protected int doCount(ListQuery query,
                      DatabaseSession session)
               throws TelosysException
Count operation using a query

Parameters:
query -
session -
Returns:
Throws:
TelosysException

doCount

protected int doCount(ListQuery query,
                      java.sql.Connection con)
               throws TelosysException
Count operation using a query

Parameters:
query -
con -
Returns:
Throws:
TelosysException

describe

public java.lang.String describe()
Describes the DAO

Returns:
the description