eschool.util
Class ConnectionHelper

java.lang.Object
  extended byeschool.util.ConnectionHelper

public class ConnectionHelper
extends java.lang.Object


Constructor Summary
ConnectionHelper()
           
 
Method Summary
static void closeConnection(java.sql.ResultSet rs, java.sql.Statement stmt, java.sql.Connection conn)
          Closes a ResultSet, Statement and Connection
static java.sql.Connection getConnection()
           
static int getNewCourseID()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionHelper

public ConnectionHelper()
Method Detail

getConnection

public static java.sql.Connection getConnection()
Returns:
Connection object to the current database; in this case - "java:/MySqlDS"

getNewCourseID

public static int getNewCourseID()
Returns:
a new id of the table with courses

closeConnection

public static void closeConnection(java.sql.ResultSet rs,
                                   java.sql.Statement stmt,
                                   java.sql.Connection conn)
Closes a ResultSet, Statement and Connection

Parameters:
rs - ResultSet that have to be closed
stmt - Statement that have to be closed
conn - Connection that have to be closed