com.onewebsql.dao
Class DefaultDataSourceManager

java.lang.Object
  extended by com.onewebsql.dao.DefaultDataSourceManager
All Implemented Interfaces:
DataSourceManager

public class DefaultDataSourceManager
extends Object
implements DataSourceManager

Default implementation of DataSourceManager interface.


Constructor Summary
DefaultDataSourceManager(DataSource defaultDataSource)
          Constructor.
DefaultDataSourceManager(Map<String,DataSource> dataSources)
          Constructor.
DefaultDataSourceManager(Map<String,DataSource> dataSources, DataSource defaultDataSource)
          Constructor.
 
Method Summary
 DataSource getDataSource(String dataSourceName)
          Returns the data source with the specified name.
 Set<String> getDataSourceNames()
          Returns the set of data source names managed by this manager.
 Map<String,DataSource> getDataSources()
          Returns the map of all available data sources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDataSourceManager

public DefaultDataSourceManager(DataSource defaultDataSource)
Constructor.

Parameters:
defaultDataSource - default data source

DefaultDataSourceManager

public DefaultDataSourceManager(Map<String,DataSource> dataSources,
                                DataSource defaultDataSource)
Constructor.

Parameters:
dataSources - mapping data source name to data source
defaultDataSource - default data source

DefaultDataSourceManager

public DefaultDataSourceManager(Map<String,DataSource> dataSources)
Constructor.

Parameters:
dataSources - mapping data source name to data source
Method Detail

getDataSourceNames

public Set<String> getDataSourceNames()
Description copied from interface: DataSourceManager
Returns the set of data source names managed by this manager.

Specified by:
getDataSourceNames in interface DataSourceManager
Returns:
the set of data source names managed by this manager

getDataSource

public DataSource getDataSource(String dataSourceName)
Description copied from interface: DataSourceManager
Returns the data source with the specified name.

Specified by:
getDataSource in interface DataSourceManager
Parameters:
dataSourceName - name of the data source
Returns:
data source with the specified name.

getDataSources

public Map<String,DataSource> getDataSources()
Description copied from interface: DataSourceManager
Returns the map of all available data sources.

Specified by:
getDataSources in interface DataSourceManager
Returns:
map of all available data sources.


Copyright © 2011-2013 e-point SA. All Rights Reserved.