Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

PointOfViewServer
Class DatabaseConnection  view DatabaseConnection download DatabaseConnection.java

java.lang.Object
  extended byPointOfViewServer.DatabaseConnection

class DatabaseConnection
extends java.lang.Object

DatabaseConnection object provides services to maintain a database connection.


Field Summary
private  java.sql.Connection pConnection
           
private  ParameterSet pParameters
           
 
Constructor Summary
DatabaseConnection(ParameterSet params)
          Main constructor.
 
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
 

Field Detail

pConnection

private java.sql.Connection pConnection

pParameters

private ParameterSet pParameters
Constructor Detail

DatabaseConnection

public DatabaseConnection(ParameterSet params)
Main constructor.

Method Detail

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.