com.c5corp.c5utm
Class DbHelper

java.lang.Object
  extended by com.c5corp.c5utm.DbHelper

public class DbHelper
extends java.lang.Object

public class DbHelper DbHelper.java - part of Landscape database (otherwise known as the C5UTM database). This class provides static methods, protected static Connection getDbConnection() and protected static Connection getUpdateDbConnection()that can be used to get a java.sql.Connection object to the C5UTM database. The closeDbConnection(Connection connection) method can be used to return (close) the connection object.

Since:
1.0.3
Author:
Brett Stalbaum Copyright 2002-2006 see LICENSE.txt and UCSD_LICENSE.txt

Constructor Summary
DbHelper()
           
 
Method Summary
static void closeDbConnection(java.sql.Connection connection)
          Tidys up the db connection.
static java.sql.Connection getDbConnection()
          Helps get a db connection that can read from the database
static java.sql.Connection getDbConnection(java.lang.String path)
          Helps get a db connection
static java.sql.Connection getUpdateDbConnection()
          Helps get a db connection that can write to or update the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbHelper

public DbHelper()
Method Detail

getDbConnection

public static java.sql.Connection getDbConnection()
Helps get a db connection that can read from the database

Returns:
a Connection object
See Also:
Connection

getUpdateDbConnection

public static java.sql.Connection getUpdateDbConnection()
Helps get a db connection that can write to or update the database

Returns:
a Connection object
See Also:
Connection

getDbConnection

public static java.sql.Connection getDbConnection(java.lang.String path)
Helps get a db connection

Parameters:
path - path to the configuration file
Returns:
a Connection object
See Also:
Connection

closeDbConnection

public static void closeDbConnection(java.sql.Connection connection)
Tidys up the db connection.

Parameters:
connection - the Connection to close
See Also:
Connection