Package org.synchronoss.cpo.jdbc
Class AbstractJdbcDataSource
java.lang.Object
org.synchronoss.cpo.core.AbstractDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource,DataSourceInfo
- Direct Known Subclasses:
ClassJdbcDataSourceInfo,DriverJdbcDataSourceInfo
public abstract class AbstractJdbcDataSource
extends AbstractJdbcDataSourceInfo
implements DataSource
An AbstractJDBCDatasource used for instantiating the DataSource from the database driver
- Author:
- dberry
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractJdbcDataSource(String dataSourceName, int fetchSize, int batchSize) Constructs a AbstractJdbcDataSourceAbstractJdbcDataSource(String className, Properties properties, int fetchSize, int batchSize) Constructs a AbstractJdbcDataSourceAbstractJdbcDataSource(String className, SortedMap<String, String> properties, int fetchSize, int batchSize) Constructs a AbstractJdbcDataSource -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String userName, String password) intbooleanisWrapperFor(Class<?> iface) voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) <T> TMethods inherited from class org.synchronoss.cpo.core.AbstractDataSourceInfo
getBatchSize, getDataSource, getDataSourceName, getFetchSizeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection
-
Constructor Details
-
AbstractJdbcDataSource
Constructs a AbstractJdbcDataSource- Parameters:
dataSourceName- - The name of the datasource to instantiate,fetchSize- The fetchSize for this datasourcebatchSize- the number of statements to batch together before executing
-
AbstractJdbcDataSource
public AbstractJdbcDataSource(String className, SortedMap<String, String> properties, int fetchSize, int batchSize) Constructs a AbstractJdbcDataSource- Parameters:
className- The DataSource className from the Driver.properties- The list of properties to be passed to the driverfetchSize- The fetchSize for this datasourcebatchSize- the number of statements to batch together before executing
-
AbstractJdbcDataSource
public AbstractJdbcDataSource(String className, Properties properties, int fetchSize, int batchSize) Constructs a AbstractJdbcDataSource- Parameters:
className- The DataSource className from the Driver.properties- The list of properties to be passed to the driverfetchSize- The fetchSize for this datasourcebatchSize- the number of statements to batch together before executing
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-