com.metamatrix.common.jdbc
Class JDBCUtil

java.lang.Object
  extended by com.metamatrix.common.jdbc.JDBCUtil

public class JDBCUtil
extends java.lang.Object


Field Summary
static java.lang.String DATABASE
          The environment property name for the database name.
static java.lang.String DRIVER
          The environment property name for the class of the driver.
static java.lang.String PASSWORD
          The environment property name for the password that is to be used for connecting to the metadata store.
static java.lang.String PROTOCOL
          The environment property name for the protocol that is to be used.
static java.lang.String USERNAME
          The environment property name for the username that is to be used for connecting to the metadata store.
 
Constructor Summary
JDBCUtil()
           
 
Method Summary
static java.sql.Connection createJDBCConnection(java.util.Properties env)
          This creates a JDBC connection.
static java.lang.String getDatabaseURL(java.util.Properties env)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DRIVER

public static final java.lang.String DRIVER
The environment property name for the class of the driver. This property is optional.

See Also:
Constant Field Values

PROTOCOL

public static final java.lang.String PROTOCOL
The environment property name for the protocol that is to be used. For JDBC, the connection URL information is created of the form "jdbc:subprotocol:subname", where the value of the PROTOCOL property is used for the "subprotocol:subname" portion. This property is required.

See Also:
Constant Field Values

DATABASE

public static final java.lang.String DATABASE
The environment property name for the database name. This may include the server name and port number, per the driver's requirements. This property is required.

See Also:
Constant Field Values

USERNAME

public static final java.lang.String USERNAME
The environment property name for the username that is to be used for connecting to the metadata store. This property is required.

See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
The environment property name for the password that is to be used for connecting to the metadata store. This property is required.

See Also:
Constant Field Values
Constructor Detail

JDBCUtil

public JDBCUtil()
Method Detail

createJDBCConnection

public static java.sql.Connection createJDBCConnection(java.util.Properties env)
                                                throws MetaMatrixException
This creates a JDBC connection.

Throws:
ManagedConnectionException - if there is an error establishing the connection.
MetaMatrixException

getDatabaseURL

public static java.lang.String getDatabaseURL(java.util.Properties env)
                                       throws MetaMatrixException
Throws:
MetaMatrixException


Copyright © 2009. All Rights Reserved.