public class DBWriteUtils
extends java.lang.Object
| Constructor and Description |
|---|
DBWriteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildAddTableRow(Database database,
Table table,
java.util.Map<java.lang.String,java.lang.String> params) |
static java.lang.String |
buildAddTableRow(java.lang.String databaseName,
java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.String> params)
Deprecated.
replaced with buildAddTableRow(Database database, Table
table, Map<String, String> params) Insert a table row in the
database
|
static java.lang.String |
buildDeleteTableRow(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String whereClause)
Delete a table row in the database
|
static java.lang.String |
buildLogin(java.lang.String tableName,
java.util.Hashtable<java.lang.String,java.lang.String> params,
java.lang.String pk)
Login by querying a db with a map of key-pairs and returing the pk
|
static java.lang.String |
buildSelectTableRow(java.lang.String tableName,
java.lang.String whereClause)
Select a table row from the database
|
static java.lang.String |
buildUpdateTableRow(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String whereClause)
Deprecated.
- may not be suitable for all databases. Use the StorageConfig.getDBSqlManager
Update a table row in the database
|
public static java.lang.String buildSelectTableRow(java.lang.String tableName,
java.lang.String whereClause)
tableName - is the name of the table that we want to update.whereClause - will select the row (maybe rows) to be updated.public static java.lang.String buildUpdateTableRow(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String whereClause)
tableName - is the name of the table that we want to update.params - is the values we want to update in the tablewhereClause - will select the row (maybe rows) to be updated.public static java.lang.String buildDeleteTableRow(java.lang.String databaseName,
java.lang.String tableName,
java.lang.String whereClause)
tableName - is the name of the table that we want to update.whereClause - will select the row (maybe rows) to be updated.public static java.lang.String buildAddTableRow(java.lang.String databaseName,
java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.String> params)
databaseName - the database to sue as defined in storage.xmltableName - is the name of the table that we want to update.params - is the values we want to update in the tablepublic static java.lang.String buildAddTableRow(Database database, Table table, java.util.Map<java.lang.String,java.lang.String> params)
database - the database to used as defined is storage.xmltable - is the table that we want to update.params - is the values we want to update in the tablepublic static java.lang.String buildLogin(java.lang.String tableName,
java.util.Hashtable<java.lang.String,java.lang.String> params,
java.lang.String pk)
tableName - is the name of the table that we want to query.params - is the values we want to query in the tablepk - is the field (most likely primary key) we want returned for the query.