java.lang.Object
PointOfViewServer.DatabaseConnection
- class DatabaseConnection
- extends java.lang.Object
DatabaseConnection object provides services to maintain a database connection.
|
Method Summary |
void |
close()
Close the current connection to the database. |
java.sql.Statement |
execute(java.lang.String query)
Execute the SQL query entered in parameter and return the corresponding Statement
object. |
boolean |
isOpened()
Test if the connection is opened. |
void |
open()
Open the database using the database parameters contained in ParameterSet passed
into the constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pConnection
private java.sql.Connection pConnection
pParameters
private ParameterSet pParameters
DatabaseConnection
public DatabaseConnection(ParameterSet params)
- Main constructor.
isOpened
public boolean isOpened()
- Test if the connection is opened.
open
public void open()
throws java.lang.Exception
- Open the database using the database parameters contained in ParameterSet passed
into the constructor.
close
public void close()
throws java.sql.SQLException
- Close the current connection to the database.
execute
public java.sql.Statement execute(java.lang.String query)
throws java.sql.SQLException
- Execute the SQL query entered in parameter and return the corresponding Statement
object.