Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.datasource.lookup
Class SingleDataSourceLookup

    java.lang.Object
      org.springframework.jdbc.datasource.lookup.SingleDataSourceLookup

All Implemented Interfaces:
  DataSourceLookup

    public class SingleDataSourceLookup

extends Object
implements DataSourceLookup

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

Since:
  2.0
Author:
  Juergen Hoeller

Constructor Summary
`SingleDataSourceLookup(DataSource dataSource)` Create a new instance of the `SingleDataSourceLookup` class.

Method Summary
`DataSource` | `getDataSource(String dataSourceName)` Retrieve the DataSource identified by the given name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SingleDataSourceLookup

    public SingleDataSourceLookup(DataSource dataSource)

  Create a new instance of the `SingleDataSourceLookup` class.

  Parameters:
    `dataSource` - the single `DataSource` to wrap

Method Detail

### getDataSource

    public DataSource getDataSource(String dataSourceName)

  Description copied from interface: `DataSourceLookup`
  Retrieve the DataSource identified by the given name.

  Specified by:
    `getDataSource` in interface `DataSourceLookup`
  Parameters:
    `dataSourceName` - the name of the DataSource
  Returns:
    the DataSource (never `null`)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2008 The Spring Framework.