|
|||||||||||
| 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.
| Nested Class Summary |
| Nested classes inherited from class org.apache.commons.configuration.AbstractConfiguration |
AbstractConfiguration.PropertiesTokenizer |
| 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 |
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. |
protected Object |
getPropertyDirect(String key)
Read property. Should return null if the key doesn't
map to an existing object. |
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, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getVector, getVector, interpolate, interpolateHelper, isThrowExceptionOnMissing, setDelimiter, setProperty, setThrowExceptionOnMissing, split, 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 |
protected Object getPropertyDirect(String key)
null if the key doesn't
map to an existing object.
getPropertyDirect in class AbstractConfigurationkey - key to use for mapping
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 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 | ||||||||||