DBAbstract API Documentation

ro.raducora.utils.props.xml
Class ClientDBXMLProperties

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

public class ClientDBXMLProperties
extends java.lang.Object
implements ClientDBProps

Author:
Radu Coravu

Constructor Summary
ClientDBXMLProperties()
          Default Constructor takes as default properties filename path ".
ClientDBXMLProperties(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)
          Gets Driver Jar Filename
 java.lang.String getDriverJarPath(java.lang.String dbname)
          Gets Driver Jar Path
 int getMaxNoConn(java.lang.String dbname)
          Gets the maximum number of opened pool connetions for the specific key
 int getMinNoConn(java.lang.String dbname)
          Gets the minimum number of opened pool connetions for the specific key
 java.lang.String getRealDBName(java.lang.String dbname)
          Gets Real DB Name
 java.lang.String getServerHostname(java.lang.String dbname)
          Gets Server Hostname
 java.lang.String getServerSubprotocol(java.lang.String dbname)
          Gets Server Subprotocol for connection to the specific database
 void reload()
          Reloads the Properties from properties Source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientDBXMLProperties

public ClientDBXMLProperties()
                      throws javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException,
                             java.io.IOException
Default Constructor takes as default properties filename path "./conf/ClientDB.xml"

Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

ClientDBXMLProperties

public ClientDBXMLProperties(java.lang.String filename)
                      throws javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException,
                             java.io.IOException
Parameters:
filename - the properties filename
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Method Detail

getRealDBName

public java.lang.String getRealDBName(java.lang.String dbname)
Description copied from interface: ClientDBProps
Gets Real DB Name

Specified by:
getRealDBName in interface ClientDBProps
Parameters:
dbname - The key to use in search
Returns:
the real db name
See Also:
ClientDBProps.getRealDBName(java.lang.String)

getServerHostname

public java.lang.String getServerHostname(java.lang.String dbname)
Description copied from interface: ClientDBProps
Gets 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)
See Also:
ClientDBProps.getServerHostname(java.lang.String)

getDriverClassName

public java.lang.String getDriverClassName(java.lang.String dbname)
Description copied from interface: ClientDBProps
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"
See Also:
ClientDBProps.getDriverClassName(java.lang.String)

getDriverJarPath

public java.lang.String getDriverJarPath(java.lang.String dbname)
Description copied from interface: ClientDBProps
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
See Also:
ClientDBProps.getDriverJarPath(java.lang.String)

getDriverJarFilename

public java.lang.String getDriverJarFilename(java.lang.String dbname)
Description copied from interface: ClientDBProps
Gets Driver Jar Filename

Specified by:
getDriverJarFilename in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
File name of jar containing driver class
See Also:
ClientDBProps.getDriverJarFilename(java.lang.String)

getServerSubprotocol

public java.lang.String getServerSubprotocol(java.lang.String dbname)
Description copied from interface: ClientDBProps
Gets Server Subprotocol for connection to the specific database

Specified by:
getServerSubprotocol in interface ClientDBProps
Parameters:
dbname - Key to search
Returns:
The server subprotocol ,for example:mysql,pgsql,odbc,mssql
See Also:
ClientDBProps.getServerSubprotocol(java.lang.String)

getMinNoConn

public int getMinNoConn(java.lang.String dbname)
Description copied from interface: ClientDBProps
Gets the minimum number of opened pool connetions for the specific key

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
See Also:
ClientDBProps.getMinNoConn(java.lang.String)

getMaxNoConn

public int getMaxNoConn(java.lang.String dbname)
Description copied from interface: ClientDBProps
Gets the maximum number of opened pool connetions for the specific key

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
See Also:
ClientDBProps.getMaxNoConn(java.lang.String)

reload

public void reload()
            throws javax.xml.parsers.ParserConfigurationException,
                   org.xml.sax.SAXException,
                   java.io.IOException
Description copied from interface: Props
Reloads the Properties from properties Source

Specified by:
reload in interface Props
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
See Also:
Props.reload()

DBAbstract API Documentation

© Copyright Radu Coravu 2002 - 2004.