|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.configuration.AbstractConfiguration
org.apache.commons.configuration.DatabaseConfiguration
Configuration stored in a database.
| Field Summary |
| Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
END_TOKEN, START_TOKEN |
| Constructor Summary | |
DatabaseConfiguration(DataSource datasource,
String table,
String keyColumn,
String valueColumn)
Build a configuration from a table |
|
DatabaseConfiguration(DataSource datasource,
String table,
String nameColumn,
String keyColumn,
String valueColumn,
String name)
Build a configuration from a table containing multiple configurations. |
|
| Method Summary | |
protected void |
addPropertyDirect(String key,
Object obj)
Adds a key/value pair to the Configuration. Override this method to provide write acces to underlying Configuration store. |
void |
clear()
Remove all properties from the configuration. |
void |
clearProperty(String key)
Remove a property from the configuration. |
boolean |
containsKey(String key)
Check if the configuration contains the specified key. |
Iterator |
getKeys()
Get the list of the keys contained in the configuration. |
Object |
getProperty(String key)
Gets a property from the configuration. |
boolean |
isEmpty()
Check if the configuration is empty. |
| Methods inherited from class org.apache.commons.configuration.AbstractConfiguration |
addProperty, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolateHelper, isThrowExceptionOnMissing, resolveContainerStore, setDelimiter, setProperty, setThrowExceptionOnMissing, subset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DatabaseConfiguration(DataSource datasource,
String table,
String nameColumn,
String keyColumn,
String valueColumn,
String name)
datasource - the datasource to connect to the databasetable - the name of the table containing the configurationsnameColumn - the column containing the name of the configurationkeyColumn - the column containing the keys of the configurationvalueColumn - the column containing the values of the configurationname - the name of the configuration
public DatabaseConfiguration(DataSource datasource,
String table,
String keyColumn,
String valueColumn)
datasource - the datasource to connect to the databasetable - the name of the table containing the configurationskeyColumn - the column containing the keys of the configurationvalueColumn - the column containing the values of the configuration| Method Detail |
public Object getProperty(String key)
key - property to retrieve
protected void addPropertyDirect(String key,
Object obj)
addPropertyDirect in class AbstractConfigurationkey - key to use for mappingobj - object to storepublic boolean isEmpty()
isEmpty in interface ConfigurationisEmpty in class AbstractConfigurationpublic boolean containsKey(String key)
containsKey in interface ConfigurationcontainsKey in class AbstractConfigurationpublic void clearProperty(String key)
clearProperty in interface ConfigurationclearProperty in class AbstractConfigurationpublic void clear()
clear in interface Configurationclear in class AbstractConfigurationpublic Iterator getKeys()
getKeys in interface ConfigurationgetKeys in class AbstractConfiguration
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||