public class JDBC_DB extends Object
| Constructor and Description |
|---|
JDBC_DB(Properties sys_props)
JDBC_DB
Constructor method will create class instance and load the
Oracle DB driver
|
JDBC_DB(Properties sys_props,
Connection srv_connect) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection()
closeConnection
Close a connection to the database.
|
void |
commit()
commit
|
ResultSet |
executeQuery(String cmd)
executeQuery
Send an SQL query to the DBMS to be executed.
|
void |
executeSQLCommand(String cmd)
executeSQLCommand
Send an SQL command to the DBMS to be executed.
|
protected void |
finalize() |
Connection |
getConnection() |
int |
getCount(String cmd)
getCount
Will return a count when user passes sting select count(*) from ...
|
void |
openConnection()
openConnection
Open a connection to the database.
|
void |
openConnection(String username,
String password,
String database) |
void |
rollback()
rollback
|
void |
setAutoCommitMode(boolean autoCommitMode) |
String |
toDateStr(Date inDate)
Convert Date to string in format for
Oracle TO_DATE processing - DD-MM-YY HH24:MI:SS
|
public JDBC_DB(Properties sys_props)
public JDBC_DB(Properties sys_props, Connection srv_connect)
public void setAutoCommitMode(boolean autoCommitMode)
public void openConnection()
throws SQLException
SQLExceptionpublic void openConnection(String username, String password, String database) throws SQLException
SQLExceptionpublic void closeConnection()
public void executeSQLCommand(String cmd) throws SQLException
SQLExceptionpublic ResultSet executeQuery(String cmd) throws SQLException
SQLExceptionpublic int getCount(String cmd) throws SQLException
SQLExceptionpublic void commit()
throws SQLException
SQLExceptionpublic void rollback()
protected void finalize()
throws Throwable
public String toDateStr(Date inDate)
public Connection getConnection() throws SQLException
SQLExceptionCopyright © 1999–2017 Apache OODT. All rights reserved.