private < T extends DataSource > T applyDataSourceProperties ( T dataSource ) { for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { String key = entry . getKey ( ) . toString ( ) ; String value = entry . getValue ( ) . toString ( ) ; String propertyKey = PropertyKey . DATA_SOURCE_PROPERTY . getKey ( ) ; if ( key . startsWith ( propertyKey ) ) { String dataSourceProperty = key . substring ( propertyKey . length ( ) ) ; ReflectionUtils . invokeSetter ( dataSource , dataSourceProperty , value ) ; } } return dataSource ; }
Apply DataSource specific properties