com.germinus.easyconf
Class DatasourceURL
java.lang.Object
com.germinus.easyconf.DatasourceURL
public class DatasourceURL
- extends java.lang.Object
Represents the URL to a datasource as specified in a properties file
- Author:
- Jorge Ferrer
Constructor Summary |
DatasourceURL(java.lang.String datasourcePath,
java.lang.String companyId,
java.lang.String componentName,
java.lang.String tableName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final Log log
DATASOURCE_PREFIX
private static final java.lang.String DATASOURCE_PREFIX
- See Also:
- Constant Field Values
CONFIGURATION_OBJECTS_TABLE
public static final java.lang.String CONFIGURATION_OBJECTS_TABLE
- See Also:
- Constant Field Values
PROPERTIES_TABLE
public static final java.lang.String PROPERTIES_TABLE
- See Also:
- Constant Field Values
ctx
private static javax.naming.InitialContext ctx
dataSourceName
private java.lang.String dataSourceName
companyId
private java.lang.String companyId
componentName
private java.lang.String componentName
tableName
private java.lang.String tableName
DatasourceURL
public DatasourceURL(java.lang.String datasourcePath,
java.lang.String companyId,
java.lang.String componentName,
java.lang.String tableName)
getDatasource
public javax.sql.DataSource getDatasource()
getContext
private javax.naming.InitialContext getContext()
throws javax.naming.NamingException
- Throws:
javax.naming.NamingException
getTableName
protected java.lang.String getTableName()
getComponentColumnName
protected java.lang.String getComponentColumnName()
getKeyColumnName
protected java.lang.String getKeyColumnName()
getValueColumnName
protected java.lang.String getValueColumnName()
isDatasource
public static boolean isDatasource(java.lang.String fileName)
getConfiguration
public DatabaseConfiguration getConfiguration()
getCompanyComponentValue
private java.lang.String getCompanyComponentValue()