Package com.d3x.core.db
Interface DataSourceAdapter
-
- All Known Implementing Classes:
DataSourceAdapter.Apache
public interface DataSourceAdapterAn convenience adapter to work with DataSource implementations from different libraries.- Author:
- Xavier Witdouck
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDataSourceAdapter.ApacheA DataSourceFactory that uses Apache Commons DBCP library
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose(javax.sql.DataSource source)Closes the data source if appropriatejavax.sql.DataSourcecreate(DatabaseConfig config)Returns a newly created DataSource based on the config provided
-
-
-
Method Detail
-
close
void close(javax.sql.DataSource source)
Closes the data source if appropriate- Parameters:
source- the data source
-
create
javax.sql.DataSource create(DatabaseConfig config) throws DatabaseException
Returns a newly created DataSource based on the config provided- Parameters:
config- the database configuration- Returns:
- the newly created DataSource
- Throws:
DatabaseException- if operation fails
-
-