|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Database.SFDataBase
| Field Summary |
| Fields inherited from interface Database.dbconstants |
DUPLICATE_KEY, EXISTS, FAIL, GENERAL_FAILURE, MORE_ROWS, NO_MORE_RESULTS, NO_MORE_ROWS, NOT_EXISTS, SUCCEED |
| Method Summary | |
int |
addRow(java.lang.String columnNames,
java.lang.String tableName,
java.lang.String formatString,
java.util.Vector container)
Adds new row to the database table. |
int |
affectedRowCount()
Returns the number of rows affected by preceding UPDATE or DELETE operation |
int |
beginTransaction()
Begins transaction. |
int |
commitTransaction()
Commits transaction. |
java.lang.String |
currentDatabase()
Returns the name of the current schema. |
int |
deleteRowFromTable(java.lang.String tableName,
java.lang.String searchCondition)
Deletes rows from the table according to the search condition. |
int |
execSQL(java.lang.String sqlStatement)
Executes SQL statement |
int |
existsRow(java.lang.String searchCondition,
java.lang.String tableName)
Checks row for existence. |
int |
existsTable(java.lang.String tableName)
Checks table for existence |
static Database.SFDataBase |
getInstance()
Returns an instance of SFDataBase object. |
java.util.Vector |
getRows(java.lang.String columnNames,
java.lang.String tableName,
java.lang.String searchCondition,
java.lang.String formatString)
Returns rows from the table. |
int |
rollbackTransaction()
Rolls back transaction. |
int |
rowCountInTable(java.lang.String tableName,
java.lang.String searchCondition)
Returns the number of rows in the table |
int |
updateRow(java.lang.String columnNames,
java.lang.String tableName,
java.lang.String searchCondition,
java.lang.String formatString,
java.util.Vector container)
Updates rows in the database table. |
int |
useDatabase(java.lang.String databaseName)
Sets current schema. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Database.SFDataBase getInstance(String connection)
public int beginTransaction()
public int commitTransaction()
public int rollbackTransaction()
public int useDatabase(java.lang.String databaseName)
If this method is used from a user-written function, the database must be set to the original schema before the function exits.
databaseName - name of the schema to switch to.
public java.lang.String currentDatabase()
public int existsRow(java.lang.String searchCondition,
java.lang.String tableName)
searchCondition - String with WHERE clause, without the "WHERE" keyword
tableName - name of the table
public int rowCountInTable(java.lang.String tableName,
java.lang.String searchCondition)
tableName - name of the table
searchCondition - String with WHERE clause
public int deleteRowFromTable(java.lang.String tableName,
java.lang.String searchCondition)
tableName - name of the table
searchCondition - WEHERE clause without the "WHERE" keyword
public int execSQL(java.lang.String sqlStatement)
sqlStatement - SQL statement to execute
public int existsTable(java.lang.String tableName)
tableName - name of the table
public int affectedRowCount()
public java.util.Vector getRows(java.lang.String columnNames,
java.lang.String tableName,
java.lang.String searchCondition,
java.lang.String formatString)
columnNames - comma-separated list of column names
tableName - name of the table
searchCondition - WHERE clause
formatString - list of comma-separated format tags
public int addRow(java.lang.String columnNames,
java.lang.String tableName,
java.lang.String formatString,
java.util.Vector container)
Internally, this method generates an INSERT statement formatted for execution by the JDBS PreparedStatement object.
columnNames - String of column names separated by commas
tableName - String with the name of the table
formatString - String of format tags separated by commas
container - Vector with DataWrapper objects to form the new
row (see DataContainer class)
public int updateRow(java.lang.String columnNames,
java.lang.String tableName,
java.lang.String searchCondition,
java.lang.String formatString,
java.util.Vector container)
Internally, this method generates an UPDATE statement formatted for execution by the JDBS PreparedStatement object.
columnNames - String of column names separated by commas
tableName - String with the name of the table
formatString - String of format tags separated by commas
container - Vector with DataWrapper objects to update the row
(see DataContainer class)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||