|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.commons.configuration.AbstractConfiguration
|
+--org.apache.commons.configuration.DatabaseConfiguration
Configuration stored in a database.
| 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)
{@inheritDoc} |
void |
clear()
{@inheritDoc} |
void |
clearProperty(String key)
{@inheritDoc} |
boolean |
containsKey(String key)
{@inheritDoc} |
Iterator |
getKeys()
{@inheritDoc} |
Object |
getProperty(String key)
{@inheritDoc} |
boolean |
isEmpty()
{@inheritDoc} |
| 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, 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)
org.apache.commons.configuration.Configurationkey - property to retrieve
protected void addPropertyDirect(String key,
Object obj)
addPropertyDirect in class AbstractConfigurationorg.apache.commons.configuration.AbstractConfigurationkey - key to use for mappingvalue - object to storepublic boolean isEmpty()
isEmpty in class AbstractConfigurationorg.apache.commons.configuration.Configurationtrue if the configuration contains no property,
false otherwise.public boolean containsKey(String key)
containsKey in class AbstractConfigurationorg.apache.commons.configuration.Configurationkey - the key whose presence in this configuration is to be testedtrue if the configuration contains a value for this
key, false otherwisepublic void clearProperty(String key)
clearProperty in class AbstractConfigurationorg.apache.commons.configuration.Configurationkey - the key to remove along with corresponding value.public void clear()
clear in class AbstractConfigurationpublic Iterator getKeys()
getKeys in class AbstractConfigurationorg.apache.commons.configuration.Configuration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||