Class SQLWrapper

java.lang.Object
   |
   +----SQLWrapper

public class SQLWrapper
extends Object
This is the actual wrapper. The other files are just for the GUI.


Variable Index

 o connection
the DB connection
 o driver
the DB driver

Constructor Index

 o SQLWrapper()
Constructor.

Method Index

 o getAttNames()
this is a bad hack, since we need to pass two data structures to the relationFrame class and I didn't want to write a new class for that
 o getSnitchErrors()
 o queryDB(String)
Returns an array to be used by the swing JTable class
partly stolen from EVE-Demo
expects SQL in the dialect the DB understands.
 o searchArticle(String)
Accepts a keyword for the article search form and returns HTML-code from the query result on a DataInputStream.
 o searchAuthor(String)
Accepts a keyword for the author search form and returns HTML-code from the query result on a DataInputStream
 o sendSQL(String)
Accepts an SQL-statement and sends a number of queries to the Web-site.

Variables

 o driver
 public Class driver
the DB driver

 o connection
 public Connection connection
the DB connection

Constructors

 o SQLWrapper
 public SQLWrapper()
Constructor. Creates Database connection only. Assumes Oracle-DB-Driver in the classpath (classes111.zip)

Methods

 o sendSQL
 public Vector sendSQL(String s)
Accepts an SQL-statement and sends a number of queries to the Web-site. the parser is instantiated multiple times.

Parameters:
s - The query statement.
Returns:
return vector doesn't mean anything
 o searchAuthor
 public DataInputStream searchAuthor(String s)
Accepts a keyword for the author search form and returns HTML-code from the query result on a DataInputStream

 o searchArticle
 public DataInputStream searchArticle(String s)
Accepts a keyword for the article search form and returns HTML-code from the query result on a DataInputStream. Except for different URL and keyword, same as "searchAuthor"
Here is some room for improvement for a more general solution.

 o queryDB
 public Object[][] queryDB(String SQL)
Returns an array to be used by the swing JTable class
partly stolen from EVE-Demo
expects SQL in the dialect the DB understands.

 o getAttNames
 public String[] getAttNames()
this is a bad hack, since we need to pass two data structures to the relationFrame class and I didn't want to write a new class for that

 o getSnitchErrors
 public Vector getSnitchErrors()