|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmappingmicroarrayprobestotheratgenomeviaapersistentindex.DatabaseFunctions
public class DatabaseFunctions
This class provides database functions required by the software.
Constructor Summary | |
---|---|
DatabaseFunctions()
|
Method Summary | |
---|---|
static java.sql.Connection |
connect(java.lang.String url,
java.lang.String username,
java.lang.String password)
Connects to database dbName |
static java.sql.CallableStatement |
createStoredQuery(java.sql.Connection conn,
java.lang.String query)
Creates a stored query |
static java.lang.Boolean |
doesIndexExist(java.sql.Connection conn,
java.lang.String tableName)
Checks to see if an index exists |
static java.lang.Boolean |
doesTableExist(java.sql.Connection conn,
java.lang.String tableName)
Checks to see if a table exists |
static java.lang.Boolean |
doesTablespaceExist(java.sql.Connection conn,
java.lang.String tablespaceName)
Checks to see if a tablespace exists |
static java.lang.Boolean |
isTableEmpty(java.sql.Connection conn,
java.lang.String tableName)
Checks to see if a table is empty |
static java.sql.ResultSet |
query(java.sql.Connection conn,
java.lang.String query)
Executes a query |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseFunctions()
Method Detail |
---|
public static java.sql.Connection connect(java.lang.String url, java.lang.String username, java.lang.String password)
url
- the url of the database to connect todbName
- the name of the database to connect tousername
- the username to use when connecting to the databasepassword
- the password for this user
public static java.sql.ResultSet query(java.sql.Connection conn, java.lang.String query)
conn
- the connection to the databasequery
- the query to execute
public static java.sql.CallableStatement createStoredQuery(java.sql.Connection conn, java.lang.String query)
conn
- the connection to the databasequery
- the query used to create the stored query
public static java.lang.Boolean doesTableExist(java.sql.Connection conn, java.lang.String tableName)
conn
- the connection to the databasetableName
- the name of the table to check for existence
true
if the table exists, otherwise false
public static java.lang.Boolean isTableEmpty(java.sql.Connection conn, java.lang.String tableName)
conn
- the connection to the databasetableName
- the name of the table to be checked to see if it is empty
true
if the table is empty, otherwise false
public static java.lang.Boolean doesTablespaceExist(java.sql.Connection conn, java.lang.String tablespaceName)
conn
- the connection to the databasetableName
- the name of the tablespace to be checked for existence
true
if the tablespace exists, otherwise false
public static java.lang.Boolean doesIndexExist(java.sql.Connection conn, java.lang.String tableName)
conn
- the connection to the databasetableName
- the name of the table to be checked for index existence
true
if the index exists, otherwise false
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |