jBNC Toolbox

jbnc.database
Class DBLog

java.lang.Object
  extended byjbnc.database.DBLog

public class DBLog
extends java.lang.Object

Enables loging of testing results to a database.

Since:
June 1, 1999
Author:
Jarek Sacha

Constructor Summary
DBLog()
           
 
Method Summary
 void close()
          Closes connection to a database.
 void insert(java.lang.String table, java.lang.String dataset, java.lang.String algorithm, double error, double stdMean)
          Inserts a results into a two result tables.
static void main(java.lang.String[] args)
          The main program for the DBLog class
 void open(java.lang.String dbURL, java.lang.String user, java.lang.String password)
          Attempts to establish a connection to the given database URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBLog

public DBLog()
Method Detail

main

public static void main(java.lang.String[] args)
The main program for the DBLog class

Parameters:
args - The command line arguments

open

public void open(java.lang.String dbURL,
                 java.lang.String user,
                 java.lang.String password)
          throws java.lang.Exception
Attempts to establish a connection to the given database URL.

Parameters:
dbURL - a database url of the form jdbc:subprotocol : subname
user - the database user on whose behalf the Connection is being made
password - the user's password
Throws:
java.lang.Exception - if a database access error occurs

close

public void close()
           throws java.lang.Exception
Closes connection to a database.

Throws:
java.lang.Exception - if a database access error occurs

insert

public void insert(java.lang.String table,
                   java.lang.String dataset,
                   java.lang.String algorithm,
                   double error,
                   double stdMean)
            throws java.lang.Exception
Inserts a results into a two result tables. The first table name is table _ERROR, the second is table _STDMEAN.

Parameters:
table - table prefix.
dataset - name of the dataset for which the results are logged.
algorithm - name of the algorithm used for tests.
error - value of the error.
stdMean - value of the standard deviation of mean of error.
Throws:
java.lang.Exception - if a database access error occurs

SourceForge.net Logo