vub.starlab.ontoserver.database
Interface IDatabaseAPI
- All Known Subinterfaces:
- IDatabaseInsertionAPI, IDatabaseRetrievalAPI
- public interface IDatabaseAPI
The IDatabaseAPI interface is provided as a parent for possible subinterfaces. It contains
methods to connect or disconnect to/from the database.
- Author:
- Sven Casteleyn
|
Method Summary |
void |
closeConnection()
This method is called when all database operations are finished, and
a connection to the database is not longer required. |
void |
establishConnection(java.lang.String DriverName,
java.lang.String URL)
This method should be called before calling any other method of this
interface. |
establishConnection
public void establishConnection(java.lang.String DriverName,
java.lang.String URL)
- This method should be called before calling any other method of this
interface. It opens de connection to the database. Method expects as
parameters the driver that should be used to establish the connection,
and an URL, which is a java conventional string consisting of
jdbc:<subprotocol >:<subname>, mostly this URL is suplied by the driver
vendor. As an example, the URL could be "jdbc:odbc:name_of_datasource".
- Parameters:
DriverName - the name of the driver, for example, when using the jdbc-odbc bridge,
this DriverName would be "sun.jdbc.odbc.JdbcOdbcDriver"URL - a java conventional string consisting of jdbc:<subprotocol >:<subname>,
mostly this URL is suplied by the driver, for example, when using the jdbc-odbc bridge,
this URL would be "jdbc:odbc:name_of_datasource"- See Also:
closeConnection()
closeConnection
public void closeConnection()
- This method is called when all database operations are finished, and
a connection to the database is not longer required. Java.sql.* junk is cleaned
up before exiting.
- See Also:
establishConnection(String, String)