java.lang.Object | |
↳ | org.springframework.jdbc.datasource.lookup.MapDataSourceLookup |
Simple DataSourceLookup
implementation that relies on a map for doing lookups.
Useful for testing environments or applications that need to match arbitrary
String
names to target DataSource
objects.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new instance of the
MapDataSourceLookup class. | |||||||||||
Create a new instance of the
MapDataSourceLookup class. | |||||||||||
Create a new instance of the
MapDataSourceLookup class. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add the supplied
DataSource to the map of DataSources
maintained by this object. | |||||||||||
Retrieve the DataSource identified by the given name.
| |||||||||||
Get the
Map of DataSources maintained by this object. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.jdbc.datasource.lookup.DataSourceLookup
|
Create a new instance of the MapDataSourceLookup
class.
dataSources | the Map of DataSources ; the keys
are Strings , the values are actual DataSource instances.
|
---|
Create a new instance of the MapDataSourceLookup
class.
dataSourceName | the name under which the supplied DataSource is to be added |
---|---|
dataSource | the DataSource to be added
|
Add the supplied DataSource
to the map of DataSources
maintained by this object.
dataSourceName | the name under which the supplied DataSource is to be added |
---|---|
dataSource | the DataSource to be so added
|
Retrieve the DataSource identified by the given name.
dataSourceName | the name of the DataSource |
---|
null
)Get the Map
of DataSources
maintained by this object.
The returned Map
is unmodifiable
.
Map
of DataSources
(never null
)
Set the Map
of DataSources
; the keys
are Strings
, the values are actual DataSource
instances.
If the supplied Map
is null
, then this method
call effectively has no effect.
dataSources | said Map of DataSources
|
---|