|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dke.smwp.db.DB_Table
class for table handling; creates and drops relations;
Field Summary | |
private ConnectionPool |
_connectionPool
connection pool handle |
Constructor Summary | |
DB_Table()
default constructor |
Method Summary | |
boolean |
columnExists(java.lang.String tableName,
java.lang.String columnName)
checks if column exists within given table |
boolean |
dropTable(java.lang.String tableName)
deletes table designated by table_name |
Column |
getColumn(java.lang.String table_name,
java.lang.String column_name)
fetches column object from given table and column name |
java.util.ArrayList |
getColumns(java.lang.String tableName)
fetches all columns as Column objects from given table into
an ArrayList |
java.util.ArrayList |
getColumns(java.lang.String tableName,
java.lang.String[] columnNames)
fetches all columns as Column objects from given table
and given column names into ArrayList |
java.util.ArrayList |
getForeignKeys(java.lang.String tablename)
get foreign key constraints of table designated by tablename |
java.util.ArrayList |
getPrimaryKeys(java.lang.String tablename)
get column names of table which are primary key |
java.lang.String |
stingReplace(java.lang.String sourceString,
java.lang.String searchPattern,
java.lang.String replacePattern)
replace all occurrences of searchPattern in
sourceString with replacePattern |
boolean |
tableExists(java.lang.String tableName)
check if table designated by table_name exists in database |
Methods inherited from class java.lang.Object |
|
Field Detail |
private ConnectionPool _connectionPool
Constructor Detail |
public DB_Table()
Method Detail |
public boolean dropTable(java.lang.String tableName)
table_name
tableName
- name of table which is to be deletedpublic boolean tableExists(java.lang.String tableName)
table_name
exists in databasetableName
- table name which is to be checkedpublic boolean columnExists(java.lang.String tableName, java.lang.String columnName)
tableName
- table name in which the column is searchedcolumnName
- column name which is to be checkedpublic Column getColumn(java.lang.String table_name, java.lang.String column_name)
table_name
- table name whose column is to be fetchedcolumn_name
- name of column which is to be fetchedpublic java.util.ArrayList getColumns(java.lang.String tableName)
Column
objects from given table into
an ArrayListtableName
- name of table whose columns are to be fetchedColumn
objectspublic java.util.ArrayList getColumns(java.lang.String tableName, java.lang.String[] columnNames)
Column
objects from given table
and given column names into ArrayList
tableName
- name of table whose columns are to be fetchedcolumnNames
- names of columns, which are to be fetchedColumn
objectspublic java.util.ArrayList getForeignKeys(java.lang.String tablename)
tablename
tablename
- name of table whose foreign key constraints are checkedpublic java.util.ArrayList getPrimaryKeys(java.lang.String tablename)
tablename
- name of table whose primary key columns are checkedpublic java.lang.String stingReplace(java.lang.String sourceString, java.lang.String searchPattern, java.lang.String replacePattern)
searchPattern
in
sourceString
with replacePattern
sourceString
- string which is to be modifiedsearchPattern
- string pattern which is to be replacedreplacePattern
- string which replaces searchPattern
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |