|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectUtils.MySQL.MySQLConnector
public class MySQLConnector
Class allowing the connection to a MySQL database.
| Field Summary | |
|---|---|
protected java.lang.String |
db
The DB name |
protected java.lang.String |
host
The name of the computer hosting the DB |
protected java.lang.String |
port
The name of the port for the DB connection |
protected java.lang.String |
pwd
Password for the DB connection |
protected java.lang.String |
usr
Username for the DB connection |
| Constructor Summary | |
|---|---|
MySQLConnector(java.lang.String host,
java.lang.String port,
java.lang.String usr,
java.lang.String pwd,
java.lang.String db)
Basic constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the connection to the DB. |
void |
connect()
Connects to the DB. |
MySQLQuery |
createQuery()
Creates a new query over this connection. |
java.sql.Statement |
createStatement()
Creates a new statement over this connection. |
int |
update(java.lang.String query)
Executes an update query over this connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String db
protected java.lang.String host
protected java.lang.String port
protected java.lang.String usr
protected java.lang.String pwd
| Constructor Detail |
|---|
public MySQLConnector(java.lang.String host,
java.lang.String port,
java.lang.String usr,
java.lang.String pwd,
java.lang.String db)
host - Host name for the DB connection.port - Port name for the DB connection.usr - Username for the DB connection.pwd - Password for the DB connection.db - Name of the db.| Method Detail |
|---|
public void connect()
public void close()
public java.sql.Statement createStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic MySQLQuery createQuery()
public int update(java.lang.String query)
query - The string containing the query to be executed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||