The Encog Project

org.encog.util
Class HSQLUtil

java.lang.Object
  extended by org.encog.util.HSQLUtil

public final class HSQLUtil
extends java.lang.Object

Utilities for using the Hypersonic SQL (HSQL) engine. Encog uses this SQL database for in-memory spidering, as well as unit testing.

Author:
jheaton

Field Summary
static java.lang.String DIALECT
          The dialect to use for the memory database.
static java.lang.String DRIVER
          The driver to use for the memory database.
static java.lang.String PWD
          The password to use for the memory database.
static java.lang.String UID
          The user id to use for the memory database.
static java.lang.String URL
          The URL to use for the memory database.
 
Method Summary
static java.sql.Connection getConnection()
           
static ORMSession getSession()
           
static SessionManager getSessionManager()
           
static void loadDriver()
          Load the driver for the memory database.
static void shutdown()
          Shutdown the database.
 
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 driver to use for the memory database.

See Also:
Constant Field Values

URL

public static final java.lang.String URL
The URL to use for the memory database.

See Also:
Constant Field Values

UID

public static final java.lang.String UID
The user id to use for the memory database.

See Also:
Constant Field Values

PWD

public static final java.lang.String PWD
The password to use for the memory database.

See Also:
Constant Field Values

DIALECT

public static final java.lang.String DIALECT
The dialect to use for the memory database.

See Also:
Constant Field Values
Method Detail

getConnection

public static java.sql.Connection getConnection()
                                         throws java.sql.SQLException
Returns:
A connection to the memory database.
Throws:
java.sql.SQLException - An SQL error.

getSession

public static ORMSession getSession()
Returns:
Get an ORM session for the memory database.

getSessionManager

public static SessionManager getSessionManager()
Returns:
Get a session manager for the memory database.

loadDriver

public static void loadDriver()
                       throws java.lang.InstantiationException,
                              java.lang.IllegalAccessException,
                              java.lang.ClassNotFoundException
Load the driver for the memory database.

Throws:
java.lang.InstantiationException - Database error.
java.lang.IllegalAccessException - Database error.
java.lang.ClassNotFoundException - Database error.

shutdown

public static void shutdown()
Shutdown the database. Not currently implemented.


The Encog Project