net.toften.jlips.persist.db
Class DBAbstractProperties

java.lang.Object
  extended by net.toften.jlips.persist.db.DBAbstractProperties
Direct Known Subclasses:
DBJNDIProperties, DBSimpleProperties

public abstract class DBAbstractProperties
extends Object

Abstract helper class implementing the methods defined in the DBProperties class.

Version:
$Revision: 1.4 $
Author:
thomas

Field Summary
protected static String DB_DRIVER
          String used to identify the driver class
protected static String DB_PASSWORD
          String used to identify the password
protected static String DB_SCHEMA
          String used to identify the schema
protected static String DB_URL
          String used to identify the url
protected static String DB_USERNAME
          String used to identify the username
protected  Properties dbInitProb
          This is initialised to the database properties provided by the application when jLips were initialised
protected  Properties dbProp
          These properties are used by this class to hold the database properties.
 
Constructor Summary
DBAbstractProperties()
          Default constructor for DBAbstractProperties Is provided because of the other constructors for this class.
DBAbstractProperties(String driver, String url, String username, String password, String schema)
          Constructor for DBAbstractProperties This constructor will take all the database connection parameters as arguments and initialise the internal properties class
 
Method Summary
 String getDriver()
           
 String getPassword()
           
 String getSchema()
           
 String getURL()
           
 String getUserName()
           
 void setDBInitProperties(Map dbInitProbs)
          This method stores a reference to the initialisation properties given to jLips when it was initialised by the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbProp

protected Properties dbProp
These properties are used by this class to hold the database properties. When the class is extended, these Properties should be initialise appropriately using the identifying strings.

See Also:
DB_DRIVER, DB_PASSWORD, DB_SCHEMA, DB_URL, DB_USERNAME, DBAbstractProperties(String, String, String, String, String)

dbInitProb

protected Properties dbInitProb
This is initialised to the database properties provided by the application when jLips were initialised

See Also:
DBProperties.setDBInitProperties(Map)

DB_DRIVER

protected static final String DB_DRIVER
String used to identify the driver class

See Also:
Constant Field Values

DB_URL

protected static final String DB_URL
String used to identify the url

See Also:
Constant Field Values

DB_SCHEMA

protected static final String DB_SCHEMA
String used to identify the schema

See Also:
Constant Field Values

DB_USERNAME

protected static final String DB_USERNAME
String used to identify the username

See Also:
Constant Field Values

DB_PASSWORD

protected static final String DB_PASSWORD
String used to identify the password

See Also:
Constant Field Values
Constructor Detail

DBAbstractProperties

public DBAbstractProperties()
Default constructor for DBAbstractProperties Is provided because of the other constructors for this class. Method doesn't do anything!


DBAbstractProperties

public DBAbstractProperties(String driver,
                            String url,
                            String username,
                            String password,
                            String schema)
Constructor for DBAbstractProperties This constructor will take all the database connection parameters as arguments and initialise the internal properties class

Parameters:
driver -
url -
username -
password -
schema -
Method Detail

getDriver

public String getDriver()
See Also:
DBProperties.getDriver()

getPassword

public String getPassword()
See Also:
DBProperties.getPassword()

getSchema

public String getSchema()
See Also:
DBProperties.getSchema()

getURL

public String getURL()
See Also:
DBProperties.getURL()

getUserName

public String getUserName()
See Also:
DBProperties.getUserName()

setDBInitProperties

public void setDBInitProperties(Map dbInitProbs)
This method stores a reference to the initialisation properties given to jLips when it was initialised by the application. This method will be invoked by the DBConnectionFactory.init(Map) method

Parameters:
dbInitProbs - The database properties provided by the application
See Also:
EntityFactory.init(Properties, Map), DBProperties.setDBInitProperties(Map)