public class

SingleDataSourceLookup

extends Object
implements DataSourceLookup
java.lang.Object
   ↳ org.springframework.jdbc.datasource.lookup.SingleDataSourceLookup

Class Overview

An implementation of the DataSourceLookup that simply wraps a single given DataSource, returned for any data source name.

Summary

Public Constructors
SingleDataSourceLookup(DataSource dataSource)
Create a new instance of the SingleDataSourceLookup class.
Public Methods
DataSource getDataSource(String dataSourceName)
Retrieve the DataSource identified by the given name.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.jdbc.datasource.lookup.DataSourceLookup

Public Constructors

public SingleDataSourceLookup (DataSource dataSource)

Create a new instance of the SingleDataSourceLookup class.

Parameters
dataSource the single DataSource to wrap

Public Methods

public DataSource getDataSource (String dataSourceName)

Retrieve the DataSource identified by the given name.

Parameters
dataSourceName the name of the DataSource
Returns
  • the DataSource (never null)