Package org.apache.openjpa.lib.conf
Class MapConfigurationProvider
- java.lang.Object
-
- org.apache.openjpa.lib.conf.MapConfigurationProvider
-
- All Implemented Interfaces:
ConfigurationProvider
- Direct Known Subclasses:
PersistenceProductDerivation.ConfigurationProviderImpl
public class MapConfigurationProvider extends java.lang.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(java.util.Map props)
Constructor; supply properties map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperties(java.util.Map props)
Add the given properties to those in this provider, overwriting any existing properties under the same keys.java.lang.Object
addProperty(java.lang.String key, java.lang.Object value)
Add a single property, overwriting any existing property under the same key.java.util.Map
getProperties()
Return properties loaded thus far, or empty map if none.void
setInto(Configuration conf)
Set loaded information into the given configuration.protected void
setInto(Configuration conf, Log log)
Set properties into configuration.
-
-
-
Method Detail
-
getProperties
public java.util.Map getProperties()
Description copied from interface:ConfigurationProvider
Return properties loaded thus far, or empty map if none.- Specified by:
getProperties
in interfaceConfigurationProvider
-
addProperties
public void addProperties(java.util.Map props)
Description copied from interface:ConfigurationProvider
Add the given properties to those in this provider, overwriting any existing properties under the same keys.- Specified by:
addProperties
in interfaceConfigurationProvider
-
addProperty
public java.lang.Object addProperty(java.lang.String key, java.lang.Object value)
Description copied from interface:ConfigurationProvider
Add a single property, overwriting any existing property under the same key.- Specified by:
addProperty
in interfaceConfigurationProvider
-
setInto
public void setInto(Configuration conf)
Description copied from interface:ConfigurationProvider
Set loaded information into the given configuration.- Specified by:
setInto
in 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.
-
-