Class SQLWrapper
java.lang.Object
|
+----SQLWrapper
- public class SQLWrapper
- extends Object
This is the actual wrapper. The other files are just for the GUI.
-
connection
- the DB connection
-
driver
- the DB driver
-
SQLWrapper()
- Constructor.
-
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
-
getSnitchErrors()
-
-
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.
-
searchArticle(String)
- Accepts a keyword for the article search form and returns
HTML-code from the query result on a DataInputStream.
-
searchAuthor(String)
- Accepts a keyword for the author search form and returns
HTML-code from the query result on a DataInputStream
-
sendSQL(String)
- Accepts an SQL-statement and sends a number of queries to the
Web-site.
driver
public Class driver
- the DB driver
connection
public Connection connection
- the DB connection
SQLWrapper
public SQLWrapper()
- Constructor. Creates Database connection only. Assumes
Oracle-DB-Driver in the classpath (classes111.zip)
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
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
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.
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.
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
getSnitchErrors
public Vector getSnitchErrors()