public class DatabaseConfiguration extends Object
Database.
Three parameters are essential: the name and class of the database and the
class of the time domain catalog. All other parameters are arbitrary
key-value pairs.| Constructor and Description |
|---|
DatabaseConfiguration(String databaseName,
String databaseClassName,
String timeDomainCatalogClassName)
Construct a database configuration.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends Database> |
getDatabaseClass()
Return the class of the database.
|
String |
getName()
Return the name of the database.
|
String |
getParameter(String key,
boolean mustExist)
Return a parameter value given its key.
|
ch.agent.t2.time.TimeDomainCatalog |
getTimeDomainCatalog()
Return the time domain catalog.
|
void |
setParameter(String key,
String value)
Set a parameter.
|
public DatabaseConfiguration(String databaseName, String databaseClassName, String timeDomainCatalogClassName) throws T2DBException
databaseName - the name of the databasedatabaseClassName - the name of a class implementing DatabasetimeDomainCatalogClassName - the name of a class implementing TimeDomainCatalog or null or emptyT2DBExceptionpublic void setParameter(String key, String value)
key - a stringvalue - a stringpublic String getName()
public Class<? extends Database> getDatabaseClass()
Databasepublic ch.agent.t2.time.TimeDomainCatalog getTimeDomainCatalog()
public String getParameter(String key, boolean mustExist) throws T2DBException
mustExist.key - a stringmustExist - if true throw an exception when there is no such parameterT2DBExceptionCopyright © 2017. All rights reserved.