Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openfuture.util.database
Class HyperSQLServer  view HyperSQLServer download HyperSQLServer.java

java.lang.Object
  extended byopenfuture.util.database.DBServer
      extended byopenfuture.util.database.HyperSQLServer

public class HyperSQLServer
extends DBServer

Database server for Hypersonic SQL.

Created: Tue Feb 08 05:56:58 2000

Version:
$Revision: 1.3 $

Field Summary
 
Fields inherited from class openfuture.util.database.DBServer
AUTO_INCREMENT, BLOB, LAST_INSERT_ID, usertables
 
Constructor Summary
HyperSQLServer()
           
HyperSQLServer(java.lang.String url)
           
 
Method Summary
protected  void checkDriver()
          Check, if a driver is already registered.
 java.lang.Integer executeIndexedQuery(java.sql.Statement statement, java.lang.String sqlcommand)
          Execute an SQL query, that inserts a row into a table with an auto increment column.
 void init(java.lang.String url)
          Initialize the database pointed at by url
 java.lang.String sqlTranslate(java.lang.String s)
          Translate Standard SQL into database specific syntax: auto_increment into identity varchar(x) into varchar blob into varchar last_insert_id() into call identity()
static boolean tableExists(java.sql.Connection connection, java.lang.String name)
          Check, if the table name exists.
 
Methods inherited from class openfuture.util.database.DBServer
createConnection, finalize, getConnection, getDriver, getPassword, getUser, setConnection, setDriver, setPassword, setUser
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyperSQLServer

public HyperSQLServer()

HyperSQLServer

public HyperSQLServer(java.lang.String url)
Method Detail

init

public void init(java.lang.String url)
Description copied from class: DBServer
Initialize the database pointed at by url

Overrides:
init in class DBServer

sqlTranslate

public java.lang.String sqlTranslate(java.lang.String s)
Translate Standard SQL into database specific syntax:
  • auto_increment into identity
  • varchar(x) into varchar
  • blob into varchar
  • last_insert_id() into call identity()

Overrides:
sqlTranslate in class DBServer

tableExists

public static boolean tableExists(java.sql.Connection connection,
                                  java.lang.String name)
Check, if the table name exists. In order to check this, the connection is used. Since HyperSonicSQL converts the table into uppercase, the name is converted to uppercase.


executeIndexedQuery

public java.lang.Integer executeIndexedQuery(java.sql.Statement statement,
                                             java.lang.String sqlcommand)
                                      throws java.sql.SQLException
Execute an SQL query, that inserts a row into a table with an auto increment column.

Overrides:
executeIndexedQuery in class DBServer

checkDriver

protected void checkDriver()
                    throws java.sql.SQLException
Check, if a driver is already registered. If not, register the HypersonicSQL driver

Specified by:
checkDriver in class DBServer