openfuture.util.database
Class HyperSQLServer
java.lang.Object
|
+--openfuture.util.database.DBServer
|
+--openfuture.util.database.HyperSQLServer
- public class HyperSQLServer
- extends DBServer
Database server for
Hypersonic SQL.
Created: Tue Feb 08 05:56:58 2000
- Version:
- $Revision: 1.5 $
- Author:
- Wolfgang Reissenberger
Method Summary |
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,
java.lang.String userid,
java.lang.String password)
Initialize the database pointed at by url for the
given database driver |
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()
|
boolean |
tableExists(java.sql.Connection connection,
java.lang.String name)
Check, if the table name exists. |
Methods inherited from class openfuture.util.database.DBServer |
closeConnection, closeStatement, commitTransaction, getConnection, getPassword, getUrl, getUser, init, openTransaction, rollbackTransaction, setPassword, setUrl, setUser |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HyperSQLServer
public HyperSQLServer()
init
public void init(java.lang.String url,
java.lang.String userid,
java.lang.String password)
throws I18NException
- Initialize the database pointed at by url for the
given database driver
- Overrides:
init
in class DBServer
- Parameters:
url
- URL of the database. The URL must be of the
form "jdbc:<database type>:<position>"userid
- database user ID for the database connectionpassword
- database user password for the database connection- Throws:
I18NException
- if an error occurs
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
- Parameters:
s
- a value of type 'String'- Returns:
- a value of type 'String'
tableExists
public 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.
- Overrides:
tableExists
in class DBServer
- Parameters:
connection
- connection to the databasename
- table name- Returns:
- true, if the table exists
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
- Parameters:
statement
- database statementsqlcommand
- command to be executed- Returns:
- index of the row
- Throws:
java.sql.SQLException
- if an error occurs
Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.