Class AbstractDataSource
- java.lang.Object
- org.springframework.jdbc.datasource.AbstractDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
- Direct Known Subclasses:
AbstractDriverBasedDataSource,AbstractRoutingDataSource
public abstract class AbstractDataSource extends Object implements DataSource
Abstract base class for Spring'sDataSourceimplementations, taking care of the padding.'Padding' in the context of this class means default implementations for certain methods from the
DataSourceinterface, such asgetLoginTimeout(),setLoginTimeout(int), and so forth.- Since:
- 07.05.2003
- Author:
- Juergen Hoeller
- See Also:
DriverManagerDataSource
Constructor Summary
Constructors Constructor Description AbstractDataSource()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLoginTimeout()Returns 0, indicating the default system timeout is to be used.PrintWritergetLogWriter()LogWriter methods are not supported.LoggergetParentLogger()booleanisWrapperFor(Class<?> iface)voidsetLoginTimeout(int timeout)Setting a login timeout is not supported.voidsetLogWriter(PrintWriter pw)LogWriter methods are not supported.<T> Tunwrap(Class<T> iface)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection, getConnection
Constructor Detail
AbstractDataSource
public AbstractDataSource()
Method Detail
getLoginTimeout
public int getLoginTimeout() throws SQLException
Returns 0, indicating the default system timeout is to be used.- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
setLoginTimeout
public void setLoginTimeout(int timeout) throws SQLException
Setting a login timeout is not supported.- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
getLogWriter
public PrintWriter getLogWriter()
LogWriter methods are not supported.- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource
setLogWriter
public void setLogWriter(PrintWriter pw) throws SQLException
LogWriter methods are not supported.- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
getParentLogger
public Logger getParentLogger()
- Specified by:
getParentLoggerin interfaceCommonDataSource