|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlib.jGroupware.utils.Database
Class to handle all jGroupware library database work
Constructor Summary | |
Database()
|
Method Summary | |
void |
deleteCollection(java.sql.Connection mySQLConnection,
java.lang.String command,
java.lang.String[] parameters)
Delete a collection from the database |
int |
getNewId(java.sql.Connection mySQLConnection,
java.lang.String getCurrentIdCommand,
java.lang.String saveUpdatedIdCommand)
Gets the newId attribute of the Database object |
java.util.Collection |
loadCollection(BeanFactory factory,
java.util.Map beanMapping,
java.sql.Connection mySQLConnection,
java.lang.String command,
java.lang.String[] parameters)
Method that loads a collection of objects from a database |
java.lang.Object |
loadElement(BeanFactory factory,
java.util.Map beanMapping,
java.sql.Connection mySQLConnection,
java.lang.String command,
java.lang.String[] parameters)
Method that loads an element from a database |
void |
saveBean(java.lang.Object bean,
java.util.Map beanMapping,
java.sql.Connection mySQLConnection,
java.lang.String command)
Update a bean in the database |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Database()
Method Detail |
public java.util.Collection loadCollection(BeanFactory factory, java.util.Map beanMapping, java.sql.Connection mySQLConnection, java.lang.String command, java.lang.String[] parameters) throws DatabaseErrorException
mySQLConnection
- Connection to the databasecommand
- SQL command to run (with ? characters representing substitutions)parameters
- Any additional parameters for substitution into commandbeanMapping
- Map from bean attributes to SQL column namesfactory
- Factory used to create beans that are loaded into collection
DatabaseErrorException
- Caused by any exception on the waypublic java.lang.Object loadElement(BeanFactory factory, java.util.Map beanMapping, java.sql.Connection mySQLConnection, java.lang.String command, java.lang.String[] parameters) throws DatabaseErrorException
mySQLConnection
- Connection to the databasecommand
- SQL command to run (with ? characters representing substitutions)parameters
- Any additional parameters for substitution into commandbeanMapping
- Map from bean attributes to SQL column namesfactory
- Factory used to create beans that are loaded into collection
DatabaseErrorException
- Caused by any exception on the waypublic void deleteCollection(java.sql.Connection mySQLConnection, java.lang.String command, java.lang.String[] parameters) throws DatabaseErrorException
mySQLConnection
- Connection to the databasecommand
- SQL command to run (with ? characters representing substitutions)parameters
- Any additional parameters for substitution into command
DatabaseErrorException
- Caused by any exception on the waypublic void saveBean(java.lang.Object bean, java.util.Map beanMapping, java.sql.Connection mySQLConnection, java.lang.String command) throws DatabaseErrorException
bean
- Object to be updated within the databasemySQLConnection
- Connection to the databasecommand
- SQL command to run (with ? characters representing substitutions)beanMapping
- Description of the Parameter
DatabaseErrorException
- Caused by any exception on the waypublic int getNewId(java.sql.Connection mySQLConnection, java.lang.String getCurrentIdCommand, java.lang.String saveUpdatedIdCommand) throws DatabaseErrorException
getCurrentIdCommand
- Description of the ParametersaveUpdatedIdCommand
- Description of the ParametermySQLConnection
- Description of the Parameter
DatabaseErrorException
- Description of the Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |