net.toften.jlips.persist.db
Interface DBProperties

All Known Implementing Classes:
DBJNDIProperties, DBSimpleProperties

public interface DBProperties

Interface for the class that jLips uses to get information about how to connect to the database. jLips has it's own Factory that is used to create connections to the database whenever jLips needs them. This Factory must know how to connect to the database and the application must provide a class that will return this information. The actual connections are handled by a class implementing the DBConnectionHandler interface. jLips provides a number of these classes.

Version:
$Revision: 1.4 $
Author:
thomas
See Also:
DBAbstractConnection

Method Summary
 String getDriver()
          The driver the Factory must load to connect to the database
 String getPassword()
          The password used to connect to the database
 String getSchema()
          This method must return the schema that is used by the application A schema is a text string that indicates which 'part' of the database is used by the application using jLips
 String getURL()
          This method must return the URL that jLips uses to connect to the database The URL to a database takes the general form jdbc:subprotocol:subname
 String getUserName()
          Must return the username used to connect to the database with
 void setDBInitProperties(Map dbInitProbs)
          When the Factory is initialised this method is invoked passing in the database properties supplied by the application When the application initialises jLips it must provide a set of properties specifying how jLips connects to the database.
 

Method Detail

getSchema

String getSchema()
This method must return the schema that is used by the application A schema is a text string that indicates which 'part' of the database is used by the application using jLips

Returns:
The name of the database schema used by the application

getURL

String getURL()
This method must return the URL that jLips uses to connect to the database The URL to a database takes the general form jdbc:subprotocol:subname

Returns:
The URL used to connect to the database

getUserName

String getUserName()
Must return the username used to connect to the database with

Returns:
The username used to access the database

getDriver

String getDriver()
The driver the Factory must load to connect to the database

Returns:
The full classpath to the database JDBC driver

getPassword

String getPassword()
The password used to connect to the database

Returns:
The password used to access the database

setDBInitProperties

void setDBInitProperties(Map dbInitProbs)
When the Factory is initialised this method is invoked passing in the database properties supplied by the application When the application initialises jLips it must provide a set of properties specifying how jLips connects to the database. One of these properties is the class implementing this interface. The application might also provide other information that is relevant to the class implementing this interface. When implementing this method, the class implementing this interface gets a chance to interrogate the properties passed in by the application.

Parameters:
dbInitProbs - Database properties passed in by the application