Package org.apache.openjpa.lib.conf
Class MapConfigurationProvider
- java.lang.Object
-
- org.apache.openjpa.lib.conf.MapConfigurationProvider
-
- All Implemented Interfaces:
ConfigurationProvider
public class MapConfigurationProvider extends Object implements ConfigurationProvider
Simple configuration provider that sets configuration based on a provided map.- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description MapConfigurationProvider()Construct with null properties.MapConfigurationProvider(Map props)Constructor; supply properties map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperties(Map props)Add the given properties to those in this provider, overwriting any existing properties under the same keys.ObjectaddProperty(String key, Object value)Add a single property, overwriting any existing property under the same key.MapgetProperties()Return properties loaded thus far, or empty map if none.voidsetInto(Configuration conf)Set loaded information into the given configuration.protected voidsetInto(Configuration conf, Log log)Set properties into configuration.
-
-
-
Constructor Detail
-
MapConfigurationProvider
public MapConfigurationProvider()
Construct with null properties.
-
MapConfigurationProvider
public MapConfigurationProvider(Map props)
Constructor; supply properties map.
-
-
Method Detail
-
getProperties
public Map getProperties()
Description copied from interface:ConfigurationProviderReturn properties loaded thus far, or empty map if none.- Specified by:
getPropertiesin interfaceConfigurationProvider
-
addProperties
public void addProperties(Map props)
Description copied from interface:ConfigurationProviderAdd the given properties to those in this provider, overwriting any existing properties under the same keys.- Specified by:
addPropertiesin interfaceConfigurationProvider
-
addProperty
public Object addProperty(String key, Object value)
Description copied from interface:ConfigurationProviderAdd a single property, overwriting any existing property under the same key.- Specified by:
addPropertyin interfaceConfigurationProvider
-
setInto
public void setInto(Configuration conf)
Description copied from interface:ConfigurationProviderSet loaded information into the given configuration.- Specified by:
setIntoin interfaceConfigurationProvider
-
setInto
protected void setInto(Configuration conf, Log log)
Set properties into configuration. If the log is non-null, will log a TRACE message about the set.
-
-