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
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.LogLogger available to subclasses. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns 0, indicating the default system timeout is to be used.LogWriter methods are not supported.booleanisWrapperFor(Class<?> iface) voidsetLoginTimeout(int timeout) Setting a login timeout is not supported.voidLogWriter methods are not supported.<T> TMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommonDataSource
createShardingKeyBuilderMethods inherited from interface 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:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
Setting a login timeout is not supported.- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getLogWriter
LogWriter methods are not supported.- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource
-
setLogWriter
LogWriter methods are not supported.- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-