WordNetSemanticSimilarity.DataBaseConnection
Class DataBaseConnection

java.lang.Object
  extended by WordNetSemanticSimilarity.DataBaseConnection.DataBaseConnection

public class DataBaseConnection
extends java.lang.Object


Constructor Summary
DataBaseConnection(java.lang.String conString)
          Receive a string connection to the MySQL database system management.
DataBaseConnection(java.lang.String host, int port, java.lang.String user, java.lang.String password)
          Receive a string connection parameters not include the database name
DataBaseConnection(java.lang.String host, int port, java.lang.String base, java.lang.String user, java.lang.String password)
          Receive the connection paramters to the MySQL database system management.
 
Method Summary
 void closeConnection()
          Close a connection to MySQL.
 java.lang.String getBaseName()
          Return the database name.
 java.sql.Connection getConnection()
          Get the Connection object.
 java.lang.String getHost()
          Return the host.
 java.lang.String getPassword()
          Return the user password exploited in the connection.
 int getPort()
          Return the port number exploited in the connection.
 java.lang.String getUser()
          Return the user login exploited in the connection.
 void openConnection()
          Open a connection to MySQL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBaseConnection

public DataBaseConnection(java.lang.String conString)
Receive a string connection to the MySQL database system management.

Parameters:
conString -

DataBaseConnection

public DataBaseConnection(java.lang.String host,
                          int port,
                          java.lang.String base,
                          java.lang.String user,
                          java.lang.String password)
Receive the connection paramters to the MySQL database system management.

Parameters:
base -
user -
password -
port -
host -

DataBaseConnection

public DataBaseConnection(java.lang.String host,
                          int port,
                          java.lang.String user,
                          java.lang.String password)
Receive a string connection parameters not include the database name

Parameters:
user -
password -
port -
host -
Method Detail

getBaseName

public java.lang.String getBaseName()
Return the database name.


getPassword

public java.lang.String getPassword()
Return the user password exploited in the connection.


getUser

public java.lang.String getUser()
Return the user login exploited in the connection.


getPort

public int getPort()
Return the port number exploited in the connection.


getHost

public java.lang.String getHost()
Return the host.


openConnection

public void openConnection()
                    throws java.sql.SQLException
Open a connection to MySQL.

Throws:
java.sql.SQLException

closeConnection

public void closeConnection()
                     throws java.sql.SQLException
Close a connection to MySQL.

Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()
Get the Connection object.