org.elite.jdcbot.util
Class MySQLWork

java.lang.Object
  extended by org.elite.jdcbot.util.MySQLWork
Direct Known Subclasses:
StaticCommands

public abstract class MySQLWork
extends java.lang.Object

Simple mysql class that you can extend to do your work. Example class would be StaticCommands. It just connects to your database in constructor, and, then you can use protected Statement stmt to execute queries. You should have MySQLConnector class for this to work,. You can get it at http://www.mysql.com/products/connector/j/

Since:
0.6
Version:
0.6
Author:
Milos Grbic

Field Summary
private  java.sql.Connection conn
           
protected  java.sql.Statement stmt
           
 
Constructor Summary
MySQLWork(java.lang.String database, java.lang.String username)
           
MySQLWork(java.lang.String database, java.lang.String username, java.lang.String password)
           
 
Method Summary
protected  void displaySQLErrors(java.sql.SQLException e)
           
 void finalize()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

private java.sql.Connection conn

stmt

protected java.sql.Statement stmt
Constructor Detail

MySQLWork

public MySQLWork(java.lang.String database,
                 java.lang.String username)

MySQLWork

public MySQLWork(java.lang.String database,
                 java.lang.String username,
                 java.lang.String password)
Method Detail

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

displaySQLErrors

protected void displaySQLErrors(java.sql.SQLException e)