com.continuent.tungsten.replicator.database
Class DatabaseFactory

java.lang.Object
  extended by com.continuent.tungsten.replicator.database.DatabaseFactory

public class DatabaseFactory
extends java.lang.Object

This class defines a DatabaseFactory

Version:
1.0
Author:
Scott Martin

Constructor Summary
DatabaseFactory()
           
 
Method Summary
static Database createDatabase(java.lang.String url, java.lang.String user, java.lang.String password)
          Shorthand method to allocate a non-privileged connection with no vendor identification.
static Database createDatabase(java.lang.String url, java.lang.String user, java.lang.String password, boolean privileged)
          Shorthand method to allocate a privileged connection without vendor identification.
static Database createDatabase(java.lang.String url, java.lang.String user, java.lang.String password, boolean privileged, java.lang.String vendor)
          Creates a new connection to a database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseFactory

public DatabaseFactory()
Method Detail

createDatabase

public static Database createDatabase(java.lang.String url,
                                      java.lang.String user,
                                      java.lang.String password)
                               throws java.sql.SQLException
Shorthand method to allocate a non-privileged connection with no vendor identification.

Throws:
java.sql.SQLException

createDatabase

public static Database createDatabase(java.lang.String url,
                                      java.lang.String user,
                                      java.lang.String password,
                                      boolean privileged)
                               throws java.sql.SQLException
Shorthand method to allocate a privileged connection without vendor identification.

Throws:
java.sql.SQLException

createDatabase

public static Database createDatabase(java.lang.String url,
                                      java.lang.String user,
                                      java.lang.String password,
                                      boolean privileged,
                                      java.lang.String vendor)
                               throws java.sql.SQLException
Creates a new connection to a database.

Parameters:
url - JDBC url
user - Database loging
password - Password for same
privileged - If true, this account has SUPER/SYSDBA privileges. This may increase the capabilities of the account.
vendor - Optional vendor string
Returns:
A database connection instance
Throws:
java.sql.SQLException - Thrown if there is a failure creating the connection