at.tuwien.ifs.somtoolbox.database
Class MySQLConnector
java.lang.Object
at.tuwien.ifs.somtoolbox.database.DBConnector
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
Fields inherited from class at.tuwien.ifs.somtoolbox.database.DBConnector |
con, databaseName, databaseUrl, documentTableName, documentTermsTableName, fieldsDocument, fieldsDocumentTerms, fieldsTerm, password, statement, statementEndCharacter, tableNamePrefix, termTableName, user |
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 |
MySQLConnector
public MySQLConnector(String databaseUrl,
String databaseName,
String user,
String password,
String tableNamePrefix)
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