Class DecoratedDataSource
java.lang.Object
org.springframework.jdbc.datasource.DelegatingDataSource
com.github.gavlyukovskiy.boot.jdbc.decorator.DecoratedDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource,org.springframework.beans.factory.InitializingBean
public class DecoratedDataSource
extends org.springframework.jdbc.datasource.DelegatingDataSource
Interface that implicitly added to the CGLIB proxy of
DataSource.
Returns link of both real DataSource, decorated DataSource
and all decorating chain including decorator bean name, instance and result of decorating.- Since:
- 1.2.2
-
Method Summary
Modifier and TypeMethodDescriptionReturns data source bean name.Returns wrapped data source with all decorators applied.Returns list with all decorators applied on aDataSourcereverse ordered with applying order.Returns initial data source, before applying any decorator.toString()<T> TMethods inherited from class org.springframework.jdbc.datasource.DelegatingDataSource
afterPropertiesSet, createConnectionBuilder, createShardingKeyBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, getParentLogger, getTargetDataSource, isWrapperFor, obtainTargetDataSource, setLoginTimeout, setLogWriter, setTargetDataSource
-
Method Details
-
getBeanName
Returns data source bean name.- Returns:
- data source bean name
-
getRealDataSource
Returns initial data source, before applying any decorator.- Returns:
- initial data source
-
getDecoratedDataSource
Returns wrapped data source with all decorators applied.- Returns:
- decorated data source
-
getDecoratingChain
Returns list with all decorators applied on aDataSourcereverse ordered with applying order.- Returns:
- decorating information chain
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classorg.springframework.jdbc.datasource.DelegatingDataSource- Throws:
SQLException
-
toString
-