org.synchronoss.cpo.jdbc
Class JdbcDataSourceInfo

Package class diagram package JdbcDataSourceInfo
java.lang.Object
  extended by org.synchronoss.cpo.jdbc.JdbcDataSourceInfo

public class JdbcDataSourceInfo
extends java.lang.Object

Author:
david.berry

Field Summary
protected static int JNDI_CONNECTION
           
protected static int URL_CONNECTION
           
protected static int URL_PROPS_CONNECTION
           
protected static int URL_USER_PASSWORD_CONNECTION
           
 
Constructor Summary
JdbcDataSourceInfo(java.lang.String JndiName)
          Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.
JdbcDataSourceInfo(java.lang.String JndiName, javax.naming.Context ctx)
          Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.
JdbcDataSourceInfo(java.lang.String JndiName, javax.naming.Context ctx, java.lang.String tablePrefix)
          Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.
JdbcDataSourceInfo(java.lang.String JndiName, java.lang.String tablePrefix)
          Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.
JdbcDataSourceInfo(java.lang.String driver, java.lang.String url, int initialConnections, int maxConnections, boolean waitIfBusy)
          Creates a JdbcDataSourceInfo from a Jdbc Driver
JdbcDataSourceInfo(java.lang.String driver, java.lang.String url, int initialConnections, int maxConnections, boolean waitIfBusy, java.lang.String tablePrefix)
          Creates a JdbcDataSourceInfo from a Jdbc Driver
JdbcDataSourceInfo(java.lang.String driver, java.lang.String url, java.util.Properties properties, int initialConnections, int maxConnections, boolean waitIfBusy)
          Creates a JdbcDataSourceInfo from a Jdbc Driver
JdbcDataSourceInfo(java.lang.String driver, java.lang.String url, java.util.Properties properties, int initialConnections, int maxConnections, boolean waitIfBusy, java.lang.String tablePrefix)
          Creates a JdbcDataSourceInfo from a Jdbc Driver
JdbcDataSourceInfo(java.lang.String driver, java.lang.String url, java.lang.String username, java.lang.String password, int initialConnections, int maxConnections, boolean waitIfBusy)
          Creates a JdbcDataSourceInfo from a Jdbc Driver
JdbcDataSourceInfo(java.lang.String driver, java.lang.String url, java.lang.String username, java.lang.String password, int initialConnections, int maxConnections, boolean waitIfBusy, java.lang.String tablePrefix)
          Creates a JdbcDataSourceInfo from a Jdbc Driver
 
Method Summary
 int getConnectionType()
          Returns the type of connection to the database.
 java.lang.String getDataSourceName()
           
 java.lang.String getDbTablePrefix()
           
 java.lang.String getDriver()
          Returns the name of the jdbc driver
 int getInitialConnections()
          Returns the number of initial connections to the database.
 javax.naming.Context getJndiCtx()
           
 java.lang.String getJndiName()
           
 int getMaxConnections()
          Returns the max connections for the connection pool
 java.lang.String getPassword()
          Returns the password to connect to the database
 java.util.Properties getProperties()
          Returns the database connection properties
 java.lang.String getUrl()
          Returns the url to be used to connect to the database
 java.lang.String getUserName()
          Returns the username to connect to the database
 boolean getWaitIfBusy()
          Returns whether to wait for an available connection
protected  void setConnectionType(int connectionType)
           
protected  void setDataSourceName(java.lang.String dataSourceName)
           
protected  void setDbTablePrefix(java.lang.String dbTablePrefix)
           
protected  void setDriver(java.lang.String driver)
           
protected  void setInitialConnections(int initialConnections_)
           
protected  void setJndiCtx(javax.naming.Context jndiCtx_)
           
protected  void setJndiName(java.lang.String jndiName_)
           
protected  void setMaxConnections(int maxConnections)
           
protected  void setPassword(java.lang.String password)
           
protected  void setProperties(java.util.Properties properties)
           
protected  void setUrl(java.lang.String url)
           
protected  void setUserName(java.lang.String username)
           
protected  void setWaitIfBusy(boolean waitIfBusy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_CONNECTION

protected static final int URL_CONNECTION
See Also:
Constant Field Values

URL_PROPS_CONNECTION

protected static final int URL_PROPS_CONNECTION
See Also:
Constant Field Values

URL_USER_PASSWORD_CONNECTION

protected static final int URL_USER_PASSWORD_CONNECTION
See Also:
Constant Field Values

JNDI_CONNECTION

protected static final int JNDI_CONNECTION
See Also:
Constant Field Values
Constructor Detail

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String JndiName)
Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.

Parameters:
JndiName - The JndiName of the app server datasource

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String JndiName,
                          java.lang.String tablePrefix)
Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.

Parameters:
JndiName - The JndiName of the app server datasource

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String JndiName,
                          javax.naming.Context ctx)
Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.

Parameters:
JndiName - The JndiName of the app server datasource
ctx - - The context for which the Jndi Lookup should use.

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String JndiName,
                          javax.naming.Context ctx,
                          java.lang.String tablePrefix)
Creates a JdbcDataSourceInfo from a JNDIName that represents the datasource in the application server.

Parameters:
JndiName - The JndiName of the app server datasource
ctx - - The context for which the Jndi Lookup should use.

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String driver,
                          java.lang.String url,
                          int initialConnections,
                          int maxConnections,
                          boolean waitIfBusy)
                   throws java.sql.SQLException
Creates a JdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - The url that points to the database.
initialConnections - - The initial number of connections to be created in the connection pool
maxConnections - - The max number of connections of the connection pool
waitIfBusy - - If the maxConnections are in use do you wait for a connection to free up or throw an exception
Throws:
java.sql.SQLException

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String driver,
                          java.lang.String url,
                          int initialConnections,
                          int maxConnections,
                          boolean waitIfBusy,
                          java.lang.String tablePrefix)
                   throws java.sql.SQLException
Creates a JdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - The url that points to the database.
initialConnections - - The initial number of connections to be created in the connection pool
maxConnections - - The max number of connections of the connection pool
waitIfBusy - - If the maxConnections are in use do you wait for a connection to free up or throw an exception
Throws:
java.sql.SQLException

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String driver,
                          java.lang.String url,
                          java.util.Properties properties,
                          int initialConnections,
                          int maxConnections,
                          boolean waitIfBusy)
                   throws java.sql.SQLException
Creates a JdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - The url that points to the database.
properties - - The connection properties for connecting to the database
initialConnections - - The initial number of connections to be created in the connection pool
maxConnections - - The max number of connections of the connection pool
waitIfBusy - - If the maxConnections are in use do you wait for a connection to free up or throw an exception
Throws:
java.sql.SQLException

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String driver,
                          java.lang.String url,
                          java.util.Properties properties,
                          int initialConnections,
                          int maxConnections,
                          boolean waitIfBusy,
                          java.lang.String tablePrefix)
                   throws java.sql.SQLException
Creates a JdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - The url that points to the database.
properties - - The connection properties for connecting to the database
initialConnections - - The initial number of connections to be created in the connection pool
maxConnections - - The max number of connections of the connection pool
waitIfBusy - - If the maxConnections are in use do you wait for a connection to free up or throw an exception
Throws:
java.sql.SQLException

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String driver,
                          java.lang.String url,
                          java.lang.String username,
                          java.lang.String password,
                          int initialConnections,
                          int maxConnections,
                          boolean waitIfBusy)
                   throws java.sql.SQLException
Creates a JdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - The url that points to the database.
username - - The username for connecting to the database
password - - The password for connectinf to the database
initialConnections - - The initial number of connections to be created in the connection pool
maxConnections - - The max number of connections of the connection pool
waitIfBusy - - If the maxConnections are in use do you wait for a connection to free up or throw an exception
Throws:
java.sql.SQLException

JdbcDataSourceInfo

public JdbcDataSourceInfo(java.lang.String driver,
                          java.lang.String url,
                          java.lang.String username,
                          java.lang.String password,
                          int initialConnections,
                          int maxConnections,
                          boolean waitIfBusy,
                          java.lang.String tablePrefix)
                   throws java.sql.SQLException
Creates a JdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - The url that points to the database.
username - - The username for connecting to the database
password - - The password for connectinf to the database
initialConnections - - The initial number of connections to be created in the connection pool
maxConnections - - The max number of connections of the connection pool
waitIfBusy - - If the maxConnections are in use do you wait for a connection to free up or throw an exception
Throws:
java.sql.SQLException
Method Detail

getDriver

public java.lang.String getDriver()
Returns the name of the jdbc driver


getUrl

public java.lang.String getUrl()
Returns the url to be used to connect to the database


getUserName

public java.lang.String getUserName()
Returns the username to connect to the database


getPassword

public java.lang.String getPassword()
Returns the password to connect to the database


getProperties

public java.util.Properties getProperties()
Returns the database connection properties


getMaxConnections

public int getMaxConnections()
Returns the max connections for the connection pool


getWaitIfBusy

public boolean getWaitIfBusy()
Returns whether to wait for an available connection


getConnectionType

public int getConnectionType()
Returns the type of connection to the database.


setDriver

protected void setDriver(java.lang.String driver)

setUrl

protected void setUrl(java.lang.String url)

setUserName

protected void setUserName(java.lang.String username)

setPassword

protected void setPassword(java.lang.String password)

setProperties

protected void setProperties(java.util.Properties properties)

setMaxConnections

protected void setMaxConnections(int maxConnections)

setWaitIfBusy

protected void setWaitIfBusy(boolean waitIfBusy)

setConnectionType

protected void setConnectionType(int connectionType)

getJndiCtx

public javax.naming.Context getJndiCtx()
Returns:
Returns the jndiCtx_.

setJndiCtx

protected void setJndiCtx(javax.naming.Context jndiCtx_)
Parameters:
jndiCtx_ - The jndiCtx_ to set.

getJndiName

public java.lang.String getJndiName()
Returns:
Returns the jndiName_.

setJndiName

protected void setJndiName(java.lang.String jndiName_)
Parameters:
jndiName_ - The jndiName_ to set.

getInitialConnections

public int getInitialConnections()
Returns the number of initial connections to the database.


setInitialConnections

protected void setInitialConnections(int initialConnections_)
Parameters:
initialConnections_ - The initialConnections_ to set.

getDataSourceName

public java.lang.String getDataSourceName()
Returns:
Returns the dataSourceName.

setDataSourceName

protected void setDataSourceName(java.lang.String dataSourceName)
Parameters:
dataSourceName - The dataSourceName to set.

getDbTablePrefix

public java.lang.String getDbTablePrefix()
Returns:
Returns the dataSourceName.

setDbTablePrefix

protected void setDbTablePrefix(java.lang.String dbTablePrefix)
Parameters:
dbTablePrefix - The table prefix to set.


Copyright © 2010. All Rights Reserved.