net.sf.bloof.db
Class McKoiControl

java.lang.Object
  |
  +--net.sf.bloof.db.McKoiControl

public class McKoiControl
extends java.lang.Object

This class is responsible for controlling the internal database McKoi.

Version:
$Id: McKoiControl.java,v 1.9 2003/09/06 08:35:09 pekacki Exp $
Author:
Lukasz Pekacki
See Also:
McKoi SQL Database

Field Summary
static java.lang.String MY_URL_PREFIX
          Name and prefix of the Database
static java.lang.String NAME
          Name and prefix of the Database
 
Constructor Summary
McKoiControl()
           
 
Method Summary
static void close()
          Closes the database, freeing resources
static java.sql.Connection create(DbAccess aDbAccess)
          Creates a new McKoi SQL Database
static void createIndices()
          Create indices on the databaes for faster processing
static java.sql.Connection createRemoteConnection(DbAccess aDbAccess)
          Creates a connection to remote McKoi SQL Database
static boolean isMyUrl(java.lang.String aDbUrl)
          Returns true if the given String has the prefix of this Database JDBC URL
static java.sql.Connection open(DbAccess aDbAccess)
          Starts a local internal McKoi SQL Database; if the database does not exist yet, it will be created
static java.sql.Connection openRemote(DbAccess aDbAccess)
          Opens a connection to remote McKoi SQL Database;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MY_URL_PREFIX

public static final java.lang.String MY_URL_PREFIX
Name and prefix of the Database

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Name and prefix of the Database

See Also:
Constant Field Values
Constructor Detail

McKoiControl

public McKoiControl()
Method Detail

close

public static void close()
                  throws java.sql.SQLException,
                         java.io.IOException
Closes the database, freeing resources

Throws:
java.sql.SQLException - on error
java.io.IOException - on error

create

public static java.sql.Connection create(DbAccess aDbAccess)
                                  throws java.sql.SQLException,
                                         java.io.IOException
Creates a new McKoi SQL Database

Parameters:
aDbAccess - access info for database
Returns:
Connection to the database
Throws:
java.sql.SQLException - if error on database connect occurs
java.io.IOException - if the dll file could not be read

createIndices

public static void createIndices()
                          throws java.io.IOException
Create indices on the databaes for faster processing

Throws:
java.io.IOException - on access error to ddl file

createRemoteConnection

public static java.sql.Connection createRemoteConnection(DbAccess aDbAccess)
                                                  throws java.sql.SQLException,
                                                         java.io.IOException
Creates a connection to remote McKoi SQL Database

Parameters:
aDbAccess - access info for database
Returns:
Connection to the database
Throws:
java.sql.SQLException - if error on database connect occurs
java.io.IOException - if the dll file could not be read

isMyUrl

public static boolean isMyUrl(java.lang.String aDbUrl)
Returns true if the given String has the prefix of this Database JDBC URL

Parameters:
aDbUrl - URL to check
Returns:
true if the given String has the prefix of this Database JDBC URL

open

public static java.sql.Connection open(DbAccess aDbAccess)
                                throws java.sql.SQLException,
                                       java.io.IOException
Starts a local internal McKoi SQL Database; if the database does not exist yet, it will be created

Parameters:
aDbAccess - access info for database
Returns:
Connection to the database
Throws:
java.sql.SQLException - if error on database connect occurs
java.io.IOException - if the dll file could not be read

openRemote

public static java.sql.Connection openRemote(DbAccess aDbAccess)
                                      throws java.sql.SQLException
Opens a connection to remote McKoi SQL Database;

Parameters:
aDbAccess - access info for database
Returns:
Connection to the database
Throws:
java.sql.SQLException - if error on database connect occurs


Copyright © 2003 bloof@Sourceforge. All Rights Reserved.