henplus
Class SQLSession

java.lang.Object
  extended by henplus.SQLSession
All Implemented Interfaces:
Interruptable

public class SQLSession
extends Object
implements Interruptable

a SQL session.


Constructor Summary
SQLSession(String url, String user, String password)
          creates a new SQL session.
 
Method Summary
 void close()
           
 void connect()
           
 Statement createStatement()
           
 Connection getConnection()
          returns the current connection of this session.
 String getDatabaseInfo()
           
 SQLMetaData getMetaData(SortedSet tableNames)
           
 PropertyRegistry getPropertyRegistry()
           
 long getStatementCount()
           
 Table getTable(String tableName)
           
 long getUptime()
           
 String getURL()
           
 String getUsername()
          return username, if known.
 void interrupt()
           
 void print(String msg)
           
 void println(String msg)
           
 boolean printMessages()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLSession

public SQLSession(String url,
                  String user,
                  String password)
           throws IllegalArgumentException,
                  ClassNotFoundException,
                  SQLException,
                  IOException
creates a new SQL session. Open the database connection, initializes the readline library

Throws:
IllegalArgumentException
ClassNotFoundException
SQLException
IOException
Method Detail

getPropertyRegistry

public PropertyRegistry getPropertyRegistry()

getDatabaseInfo

public String getDatabaseInfo()

getURL

public String getURL()

getMetaData

public SQLMetaData getMetaData(SortedSet tableNames)

getTable

public Table getTable(String tableName)

printMessages

public boolean printMessages()

print

public void print(String msg)

println

public void println(String msg)

connect

public void connect()
             throws SQLException,
                    IOException
Throws:
SQLException
IOException

interrupt

public void interrupt()
Specified by:
interrupt in interface Interruptable

getUsername

public String getUsername()
return username, if known.


getUptime

public long getUptime()

getStatementCount

public long getStatementCount()

close

public void close()

getConnection

public Connection getConnection()
returns the current connection of this session.


createStatement

public Statement createStatement()


? 1997..2006 Henner Zeller