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.
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MapDataSourceLookup(Map<String, DataSource> dataSources)
Create a new instance of the |
| public | MapDataSourceLookup(String
the name under which the supplied dataSourceName, DataSource DataSource is to be addedthe dataSource)DataSource to be addedCreate a new instance of the |
| Modifier and Type | Method and Description |
|---|---|
| public void | addDataSource(String
the name under which the supplied dataSourceName, DataSource DataSource is to be addedthe dataSource)DataSource to be so addedAdd the supplied |
| public DataSource | getDataSource(String
the name of the DataSource dataSourceName)Implements org. Retrieve the DataSource identified by the given name. |
| public Map | |
| public void | setDataSources(Map<String, DataSource>
said dataSources)Map of DataSourcesSet the |
| dataSources | back to summary |
|---|---|
| private final Map<String, DataSource> dataSources | |
| MapDataSourceLookup | back to summary |
|---|---|
| public MapDataSourceLookup() Create a new instance of the | |
| MapDataSourceLookup | back to summary |
|---|---|
| public MapDataSourceLookup(Map<String, DataSource> dataSources) Create a new instance of the
| |
| MapDataSourceLookup | back to summary |
|---|---|
| public MapDataSourceLookup(String dataSourceName, DataSource dataSource) Create a new instance of the
| |
| addDataSource | back to summary |
|---|---|
| public void addDataSource(String dataSourceName, DataSource dataSource) Add the supplied
| |
| getDataSource | back to summary |
|---|---|
| public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException Implements org. Doc from org. Retrieve the DataSource identified by the given name.
| |
| getDataSources | back to summary |
|---|---|
| public Map Get the The returned
| |
| setDataSources | back to summary |
|---|---|
| public void setDataSources(Map<String, DataSource> dataSources) Set the If the supplied
| |