public final class JDBCUtils
extends java.lang.Object
| Constructor and Description |
|---|
JDBCUtils() |
| Modifier and Type | Method and Description |
|---|---|
static JDBCConnectionFactoryIfc |
getOracleConnectionFactory(java.lang.String connect,
java.lang.String user,
java.lang.String pword)
Returns a
JDBCConnectionFactoryIfc object to be used for
obtaining a java.sql.Connection object to an Oracle DB. |
static long |
getOracleTimeAsLong(java.sql.Connection dbConn)
Returns a
long value representing the current time
for the Oracle DB. |
static java.sql.Timestamp |
getOracleTimeAsTimestamp(java.sql.Connection dbConn)
Returns a
Timestamp object representing the current time
for the Oracle DB. |
public static JDBCConnectionFactoryIfc getOracleConnectionFactory(java.lang.String connect, java.lang.String user, java.lang.String pword) throws java.sql.SQLException
JDBCConnectionFactoryIfc object to be used for
obtaining a java.sql.Connection object to an Oracle DB.connect - Connection URL for Oracle JDBC driver. Format
is: jdbc:oracle:thin:@user - User name used for logging in to the DB.pword - Password used for logging in to the DB.JDBCConnectionFactoryIfc objectjava.sql.SQLExceptionpublic static java.sql.Timestamp getOracleTimeAsTimestamp(java.sql.Connection dbConn)
throws java.sql.SQLException
Timestamp object representing the current time
for the Oracle DB.dbConn - A Connection object for the Oracle DBTimestamp object, representing current database
time.java.sql.SQLExceptionpublic static long getOracleTimeAsLong(java.sql.Connection dbConn)
throws java.sql.SQLException
long value representing the current time
for the Oracle DB.dbConn - A Connection object for the Oracle DBlong value, representing current database
time, in millisecondsjava.sql.SQLException