org.pentaho.di.core.config
Class DatabaseConfigManager<T>
java.lang.Object
org.pentaho.di.core.config.BasicConfigManager<T>
org.pentaho.di.core.config.DatabaseConfigManager<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- ConfigManager<T>
public class DatabaseConfigManager<T>
- extends BasicConfigManager<T>
A ConfigManager
implementation that caters to loading configuration parameters from a database table.
- Author:
- Alex Silva
DatabaseConfigManager
public DatabaseConfigManager()
getConnectionURL
public String getConnectionURL()
setConnectionURL
@Inject
public void setConnectionURL(String connectionURL)
getTable
public String getTable()
setTable
@Inject
public void setTable(String table)
load
public Collection<T> load()
throws org.pentaho.di.core.exception.KettleConfigException
- Description copied from interface:
ConfigManager
- Loads the configuration parameters.
- Returns:
- A collection containing the parameters
- Throws:
org.pentaho.di.core.exception.KettleConfigException
- If an error occurs during load.
loadAs
public <E> Collection<E> loadAs(Class<? extends E> type)
throws org.pentaho.di.core.exception.KettleConfigException
- Description copied from interface:
ConfigManager
- Similar to load(), but allows callers to dynamically cast the underlying collection to a specific type.
This is useful for callers who are instantiating this class dynamically and don't know the expected return type
until load is called.
- Specified by:
loadAs
in interface ConfigManager<T>
- Overrides:
loadAs
in class BasicConfigManager<T>
- Type Parameters:
E
- The type of the objects managed by this implementation.- Parameters:
type
- A class representing this type.
- Returns:
- A collection of the parameters.
- Throws:
org.pentaho.di.core.exception.KettleConfigException
- If a loading problem occurs. Implementations are also required to throw this exception if
cannot be cast to