|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.util.ConnectionUtil
Field Summary | |
static int |
DB_AXION
|
static int |
DB_MYSQL
|
static int |
DB_ORACLE
|
static int |
DB_SQLSERVER
|
static int |
DB_UNKNOWN
|
Constructor Summary | |
ConnectionUtil()
|
Method Summary | |
static java.sql.Connection |
getConnection()
Obtains a connection to the database. |
static int |
getDBProductID()
Get The ID of the database vendor. |
static int |
getDBProductID(java.sql.Connection con)
Return DBProductID. |
static void |
initDBProductID(java.sql.Connection con)
Sets up DBProductID for this installation to either DB_SQLSERVER, DB_MYSQL or DB_ORACLE. |
static java.lang.String |
pingDatabase()
Checks if a database can be reached. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DB_AXION
public static final int DB_MYSQL
public static final int DB_ORACLE
public static final int DB_SQLSERVER
public static final int DB_UNKNOWN
Constructor Detail |
public ConnectionUtil()
Method Detail |
public static java.sql.Connection getConnection() throws java.lang.Exception
java.lang.Exception
- if an error occurs.public static int getDBProductID()
public static int getDBProductID(java.sql.Connection con) throws java.lang.Exception
con
- Database connection.
java.lang.Exception
- if an error occurred.public static void initDBProductID(java.sql.Connection con) throws java.lang.Exception
con
- Database connection.
java.lang.Exception
- if an error is encountered.public static java.lang.String pingDatabase()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.