|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.utils.database.DbManaged
uk.ac.ed.inf.utils.database.DbWriter
public class DbWriter
To write to a database table
| Constructor Summary | |
|---|---|
DbWriter(DbManager dbManager)
|
|
| Method Summary | |
|---|---|
java.sql.ResultSet |
executeQuery(java.lang.String sqlQuery)
Executes any SQL update which returns some results. |
java.lang.Integer |
executeQueryReturn1Id(java.lang.String sqlInsertInto)
Executes an SQL update (an individual row insert) and returns the auto-generated key (identifier) of the first inserted row. |
java.sql.ResultSet |
executeQueryReturnIds(java.lang.String sqlInsertInto)
Executes an SQL update (usually a row insert) which returns the identifier(s) of the inserted rows. |
boolean |
executeUpdate(java.lang.String sqlToExecute)
Executes any SQL update which does not return results (create/drop table etc) |
TableWriter |
getTableWriter(java.lang.String table)
Object to write to a table |
| Methods inherited from class uk.ac.ed.inf.utils.database.DbManaged |
|---|
getDbConnection, getDbManager |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbWriter(DbManager dbManager)
| Method Detail |
|---|
public java.sql.ResultSet executeQuery(java.lang.String sqlQuery)
sqlQuery - sql code to execute
public java.lang.Integer executeQueryReturn1Id(java.lang.String sqlInsertInto)
sqlInsertInto - sql code to execute
public java.sql.ResultSet executeQueryReturnIds(java.lang.String sqlInsertInto)
sqlInsertInto - sql code to execute
public boolean executeUpdate(java.lang.String sqlToExecute)
sqlToExecute - sql code to execute
public TableWriter getTableWriter(java.lang.String table)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||