Package com.germinus.easyconf

# Class DatasourceURL

java.lang.Object
com.germinus.easyconf.DatasourceURL

public class DatasourceURL extends Object
Represents the URL to a datasource as specified in a properties file

Author:
  Jorge Ferrer

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`companyId`
`private String`
`componentName`
`static final String`
`CONFIGURATION_OBJECTS_TABLE`
`private static InitialContext`
`ctx`
`private static final String`
`DATASOURCE_PREFIX`
`private String`
`dataSourceName`
`private static final Log`
`log`
`static final String`
`PROPERTIES_TABLE`
`private String`
`tableName`

## Constructor Summary

Constructors
Constructor
Description
`DatasourceURL(String datasourcePath, String companyId, String componentName, String tableName)`

## Method Summary

Modifier and Type
Method
Description
`private String`
`getCompanyComponentValue()`
`protected String`
`getComponentColumnName()`
`DatabaseConfiguration`
`getConfiguration()`
`private InitialContext`
`getContext()`
`DataSource`
`getDatasource()`
`protected String`
`getKeyColumnName()`
`protected String`
`getTableName()`
`protected String`
`getValueColumnName()`
`static boolean`
`isDatasource(String fileName)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

private static final Log log

### DATASOURCE_PREFIX

private static final String DATASOURCE_PREFIX

See Also:
  - Constant Field Values

### CONFIGURATION_OBJECTS_TABLE

public static final String CONFIGURATION_OBJECTS_TABLE

See Also:
  - Constant Field Values

### PROPERTIES_TABLE

public static final String PROPERTIES_TABLE

See Also:
  - Constant Field Values

### ctx

private static InitialContext ctx

### dataSourceName

private String dataSourceName

### companyId

private String companyId

### componentName

private String componentName

### tableName

private String tableName

## Constructor Details

### DatasourceURL

public DatasourceURL(String datasourcePath, String companyId, String componentName, String tableName)

## Method Details

### getDatasource

public DataSource getDatasource()

### getContext

private InitialContext getContext() throws NamingException

Throws:
  `NamingException`

### getTableName

protected String getTableName()

### getComponentColumnName

protected String getComponentColumnName()

### getKeyColumnName

protected String getKeyColumnName()

### getValueColumnName

protected String getValueColumnName()

### isDatasource

public static boolean isDatasource(String fileName)

### getConfiguration

public DatabaseConfiguration getConfiguration()

### getCompanyComponentValue

private String getCompanyComponentValue()