|
||||||||||
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 configurationpublic 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 configurationMethod Detail |
public Object getProperty(String key)
org.apache.commons.configuration.Configuration
key
- property to retrieveprotected void addPropertyDirect(String key, Object obj)
addPropertyDirect
in class AbstractConfiguration
org.apache.commons.configuration.AbstractConfiguration
key
- key to use for mappingvalue
- object to storepublic boolean isEmpty()
isEmpty
in class AbstractConfiguration
org.apache.commons.configuration.Configuration
true
if the configuration contains no property,
false
otherwise.public boolean containsKey(String key)
containsKey
in class AbstractConfiguration
org.apache.commons.configuration.Configuration
key
- 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 AbstractConfiguration
org.apache.commons.configuration.Configuration
key
- the key to remove along with corresponding value.public void clear()
clear
in class AbstractConfiguration
public Iterator getKeys()
getKeys
in class AbstractConfiguration
org.apache.commons.configuration.Configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |