at.tuwien.ifs.somtoolbox.database
Class MySQLConnector

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.database.DBConnector
      extended by at.tuwien.ifs.somtoolbox.database.MySQLConnector

public class MySQLConnector
extends DBConnector

This class handles the communication with a MySQL database.
TODO: replace using this class by using e.g. Hibernate

Version:
$Id: MySQLConnector.java 3583 2010-05-21 10:07:41Z mayer $
Author:
Rudolf Mayer

Field Summary
 
Fields inherited from class at.tuwien.ifs.somtoolbox.database.DBConnector
con, databaseName, databaseUrl, documentTableName, documentTermsTableName, fieldsDocument, fieldsDocumentTerms, fieldsTerm, password, statement, statementEndCharacter, tableNamePrefix, termTableName, user
 
Constructor Summary
MySQLConnector(String databaseUrl, String databaseName, String user, String password, String tableNamePrefix)
           
 
Method Summary
 Connection openConnection()
          Opens a Connection to the database
 
Methods inherited from class at.tuwien.ifs.somtoolbox.database.DBConnector
checkDBConnection, closeConnection, connect, createTable, doInsert, doInsert, doInsert, doInsert, executeSelect, executeUpdate, getDocumentTableName, getDocumentTermsTableName, getPreparedStatement, getTermTableName, setupTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLConnector

public MySQLConnector(String databaseUrl,
                      String databaseName,
                      String user,
                      String password,
                      String tableNamePrefix)
Method Detail

openConnection

public Connection openConnection()
                          throws SQLException
Opens a Connection to the database

Specified by:
openConnection in class DBConnector
Returns:
the database connection
Throws:
SQLException - if a database access error occurs or this method is called on a closed Statement