org.gcube.portlets.user.tdw.server.datasource.jdbc
Class SimpleJDBCDataSourceFactory
java.lang.Object
org.gcube.portlets.user.tdw.server.datasource.jdbc.SimpleJDBCDataSourceFactory
- All Implemented Interfaces:
- DataSourceFactory
public class SimpleJDBCDataSourceFactory
- extends Object
- implements DataSourceFactory
- Author:
- "Federico De Faveri defaveri@isti.cnr.it"
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.log4j.Logger logger
credentials
protected Map<String,JDBCCredential> credentials
SimpleJDBCDataSourceFactory
public SimpleJDBCDataSourceFactory()
registerTable
public String registerTable(String id,
String jdbcdUrl,
String tableName)
registerTable
public String registerTable(String jdbcdUrl,
String tableName)
getCredentials
public Collection<JDBCCredential> getCredentials()
getId
public String getId()
- The DataSourceFactory unique id.
- Specified by:
getId in interface DataSourceFactory
- Returns:
openDataSource
public DataSource openDataSource(org.gcube.application.framework.core.session.ASLSession session,
TableId tableId)
throws DataSourceException
- Open the specified datasource
DataSource.
- Specified by:
openDataSource in interface DataSourceFactory
tableId - the datasource id.
- Returns:
- the retrieved datasource.
- Throws:
DataSourceException - if an error occurs retrieving the datasource.
closeDataSource
public void closeDataSource(org.gcube.application.framework.core.session.ASLSession session,
DataSource dataSource)
throws DataSourceException
- Close the specified DataSource releasing allocated resources.
- Specified by:
closeDataSource in interface DataSourceFactory
- Throws:
DataSourceException
Copyright © 2013. All Rights Reserved.