OpMath

com.opmath.util.db.jdatastore60
Class JDataStore60

java.lang.Object
  |
  +--com.opmath.util.db.DBObject
        |
        +--com.opmath.util.db.jdatastore60.JDataStore60
All Implemented Interfaces:
DB

public class JDataStore60
extends DBObject
implements DB

An adapter for the Borland JDataStore version 6.0 embedded JDBC driver, implementing the org.opmath.util.db.DB interface.

Note that the following Borland JDataStore 6 JAR files are required in order that the host application server can connect to the JDataStore database:

Refer to the Borland documentation for information on the use of the JDataStore server, at: http://www.borland.com/techpubs/jdatastore/

Copyright Copyright (c) 2001, 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SE 1.3.0, Borland JDataStore version 6.0
Version:
JDataStore60 v1.0
Author:
Bruno Beloff bruno.beloff@opmath.com

Field Summary
static String JDBC_DRIVER
           
static String JDBC_PROTOCOL
           
 
Fields inherited from class com.opmath.util.db.DBObject
conn, path, protocol
 
Constructor Summary
JDataStore60(String path)
          Constructs a new JDataStore60 object.
 
Method Summary
 void close()
          Close the connection.
 void connect(String user, String pass)
          Establish a connection to a JDataStore embedded database.
 Class getDriver()
          Returns the driver class of this DB.
 
Methods inherited from class com.opmath.util.db.DBObject
className, create, createTable, delete, delete, dropTable, getConnection, getPath, getProtocol, isAvailable, maxIndex, newDbConnection, query, read, read, readAll, update, update
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opmath.util.db.DB
className, create, createTable, delete, delete, dropTable, getConnection, getPath, getProtocol, isAvailable, maxIndex, query, read, read, readAll, update, update
 

Field Detail

JDBC_PROTOCOL

public static final String JDBC_PROTOCOL

JDBC_DRIVER

public static final String JDBC_DRIVER
Constructor Detail

JDataStore60

public JDataStore60(String path)

Constructs a new JDataStore60 object.

The new JDataStore60 object has protocol, host, and path set appropriately, and its connection is initially closed.

Parameters:
host - a String identifying the database host name.
path - a String identifying the absolute path to the .jds database file.
Since:
J2SE 1.3
Method Detail

getDriver

public Class getDriver()
                throws ClassNotFoundException

Returns the driver class of this DB.

Specified by:
getDriver in interface DB
Overrides:
getDriver in class DBObject
Returns:
A Class representing the database driver.
Throws:
ClassNotFoundException - if the driver class cannot be found.
Since:
J2SE 1.3

connect

public void connect(String user,
                    String pass)
             throws SQLException

Establish a connection to a JDataStore embedded database. The connection is configured with autocommit false and the transaction isolation level set to java.sql.Connection.TRANSACTION_SERIALIZABLE.

NOTE: It is assumed that only one symultaneous connection can be held by any DB instance. Thus, connect(String, String) throws a SQLException if a connection is already established.

Specified by:
connect in interface DB
Overrides:
connect in class DBObject
Parameters:
user - a String specifying the user name.
pass - a String specifying the password.
Throws:
SQLException - if the connection could not be made.
Since:
J2SE 1.3

close

public void close()
           throws SQLException

Close the connection.

Specified by:
close in interface DB
Overrides:
close in class DBObject
Throws:
SQLException - if the connection could not be closed, or was already closed.
Since:
J2SE 1.3

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK