public abstract class AbstractTenantAwareDatasourceService extends PooledOrJndiDatasourceService implements org.springframework.beans.factory.InitializingBean
ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED, DEFAULT_AUTO_COMMIT, DEFAULT_CATALOG, DEFAULT_READ_ONLY, DEFAULT_TRANSACTION_ISOLATION, IDBDATASOURCE_SERVICE, INITIAL_SIZE, JDBC_DATASOURCE, JDBC_POOL, LOG_ABANDONED, MAX_ACTIVE_KEY, MAX_IDLE_KEY, MAX_OPEN_PREPARED_STATEMENTS, MAX_WAIT_KEY, MIN_IDLE_KEY, POOL_PREPARED_STATEMENTS, QUERY_KEY, REMOVE_ABANDONED, REMOVE_ABANDONED_TIMEOUT, TEST_ON_BORROW, TEST_ON_RETURN, TEST_WHILE_IDLE, TIME_BETWEEN_EVICTION_RUNS_MILLIS, TRANSACTION_ISOLATION_NONE_VALUE
Constructor and Description |
---|
AbstractTenantAwareDatasourceService() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
DataSource |
getDataSource(String dsName) |
String |
getDatasourceNameFormat() |
abstract String |
getTenantId()
This abstract method must be implemented by subclasses - this should return a string containing the tenant's
ID.
|
boolean |
isRequireTenantId() |
void |
setDatasourceNameFormat(String value)
Getters and Setters
|
void |
setRequireTenantId(boolean value) |
resolveDatabaseConnection
retrieve
clearCache, clearDataSource, getCacheManager, getDatasourceMgmtService, getDSBoundName, getDSUnboundName, getJndiDataSource
public AbstractTenantAwareDatasourceService()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public DataSource getDataSource(String dsName) throws org.pentaho.platform.api.data.DBDatasourceServiceException
getDataSource
in interface org.pentaho.platform.api.data.IDBDatasourceService
getDataSource
in class BaseDatasourceService
org.pentaho.platform.api.data.DBDatasourceServiceException
public abstract String getTenantId()
public void setDatasourceNameFormat(String value)
public String getDatasourceNameFormat()
public void setRequireTenantId(boolean value)
public boolean isRequireTenantId()
Copyright © 2019 Hitachi Vantara. All rights reserved.