DBAbstract API Documentation

ro.raducora.utils.props.properties
Class ClientDBProperties

java.lang.Object
  |
  +--ro.raducora.utils.props.properties.ClientDBProperties
All Implemented Interfaces:
ClientDBProps, Props

public class ClientDBProperties
extends java.lang.Object
implements ClientDBProps

Author:
Radu Coravu

Constructor Summary
ClientDBProperties()
          Uses default properties filename path ".
ClientDBProperties(java.lang.String filename)
           
 
Method Summary
 java.lang.String getDriverClassName(java.lang.String dbname)
          Gets the Driver Class Name
 java.lang.String getDriverJarFilename(java.lang.String dbname)
          Get jar filename
 java.lang.String getDriverJarPath(java.lang.String dbname)
          Gets Driver Jar path
 int getMaxNoConn(java.lang.String dbname)
          Get min no of connections for dbname.
 int getMinNoConn(java.lang.String dbname)
          Get min no of connections for dbname.
 java.lang.String getRealDBName(java.lang.String dbname)
          Get Real DB Name with aid of key.
 java.lang.String getServerHostname(java.lang.String dbname)
          Gets the Server Hostname
 java.lang.String getServerSubprotocol(java.lang.String dbname)
          Get Server Subprotocol.
 void reload()
          Reloads Properties from file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientDBProperties

public ClientDBProperties()
                   throws java.io.FileNotFoundException,
                          java.io.IOException
Uses default properties filename path "./conf/ClientDB.properties"


ClientDBProperties

public ClientDBProperties(java.lang.String filename)
                   throws java.io.FileNotFoundException,
                          java.io.IOException
Parameters:
filename - properties filename
Method Detail

getRealDBName

public java.lang.String getRealDBName(java.lang.String dbname)
Get Real DB Name with aid of key.

Specified by:
getRealDBName in interface ClientDBProps
Parameters:
dbname - The key to use in search
Returns:
the real db name

getServerHostname

public java.lang.String getServerHostname(java.lang.String dbname)
Gets the Server Hostname

Specified by:
getServerHostname in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
the server hostname to connect to (of type ip_addrs,ip_addrs:port,dns_name,localhost)

getDriverClassName

public java.lang.String getDriverClassName(java.lang.String dbname)
Gets the Driver Class Name

Specified by:
getDriverClassName in interface ClientDBProps
Parameters:
dbname - the key to search
Returns:
the Driver Class Name of form "org.gjt.Driver"

getDriverJarPath

public java.lang.String getDriverJarPath(java.lang.String dbname)
Gets Driver Jar path

Specified by:
getDriverJarPath in interface ClientDBProps
Parameters:
dbname - the key to search
Returns:
Path to the Jar containing the driver ,for example "e:/lib/" or "" if jar file not needed or in current directory

getDriverJarFilename

public java.lang.String getDriverJarFilename(java.lang.String dbname)
Get jar filename

Specified by:
getDriverJarFilename in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
File name of jar containing driver class

getServerSubprotocol

public java.lang.String getServerSubprotocol(java.lang.String dbname)
Get Server Subprotocol.

Specified by:
getServerSubprotocol in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
The server subprotocol ,for example:mysql,pgsql,odbc,mssql

getMinNoConn

public int getMinNoConn(java.lang.String dbname)
Get min no of connections for dbname.

Specified by:
getMinNoConn in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
min no of connections in the connection pool for the specific database key

getMaxNoConn

public int getMaxNoConn(java.lang.String dbname)
Get min no of connections for dbname.

Specified by:
getMaxNoConn in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
max no of connections in the connection pool for the specific database key

reload

public void reload()
            throws java.io.FileNotFoundException,
                   java.io.IOException
Reloads Properties from file

Specified by:
reload in interface Props
java.io.FileNotFoundException
java.io.IOException

DBAbstract API Documentation

© Copyright Radu Coravu 2002 - 2004.