Class AbstractDataSource
java.lang.Object
org.springframework.jdbc.datasource.AbstractDataSource
- All Implemented Interfaces:
Wrapper
,CommonDataSource
,DataSource
- Direct Known Subclasses:
AbstractDriverBasedDataSource
,AbstractRoutingDataSource
Abstract base class for Spring's
DataSource
implementations, taking care of the padding.
'Padding' in the context of this class means default implementations
for certain methods from the DataSource
interface, such as
getLoginTimeout()
, setLoginTimeout(int)
, and so forth.
- Since:
- 07.05.2003
- Author:
- Juergen Hoeller
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
Logger available to subclasses. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns 0, indicating the default system timeout is to be used.LogWriter methods are not supported.boolean
isWrapperFor
(Class<?> iface) void
setLoginTimeout
(int timeout) Setting a login timeout is not supported.void
LogWriter methods are not supported.<T> T
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
-
Field Details
-
logger
protected final org.apache.commons.logging.Log loggerLogger available to subclasses.
-
-
Constructor Details
-
AbstractDataSource
public AbstractDataSource()
-
-
Method Details
-
getLoginTimeout
Returns 0, indicating the default system timeout is to be used.- Specified by:
getLoginTimeout
in interfaceCommonDataSource
- Specified by:
getLoginTimeout
in interfaceDataSource
- Throws:
SQLException
-
setLoginTimeout
Setting a login timeout is not supported.- Specified by:
setLoginTimeout
in interfaceCommonDataSource
- Specified by:
setLoginTimeout
in interfaceDataSource
- Throws:
SQLException
-
getLogWriter
LogWriter methods are not supported.- Specified by:
getLogWriter
in interfaceCommonDataSource
- Specified by:
getLogWriter
in interfaceDataSource
-
setLogWriter
LogWriter methods are not supported.- Specified by:
setLogWriter
in interfaceCommonDataSource
- Specified by:
setLogWriter
in interfaceDataSource
- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLogger
in interfaceCommonDataSource
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-