org.apache.openjpa.lib.conf
Class MapConfigurationProvider

java.lang.Object
  extended by org.apache.openjpa.lib.conf.MapConfigurationProvider
All Implemented Interfaces:
ConfigurationProvider
Direct Known Subclasses:
PersistenceProductDerivation.ConfigurationProviderImpl

public class MapConfigurationProvider
extends Object
implements ConfigurationProvider

Simple configuration provider that sets configuration based on a provided map.

Author:
Abe White

Constructor Summary
MapConfigurationProvider()
          Construct with null properties.
MapConfigurationProvider(Map props)
          Constructor; supply properties map.
 
Method Summary
 void addProperties(Map props)
          Add the given properties to those in this provider, overwriting any existing properties under the same keys.
 Object addProperty(String key, Object value)
          Add a single property, overwriting any existing property under the same key.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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: ConfigurationProvider
Return properties loaded thus far, or empty map if none.

Specified by:
getProperties in interface ConfigurationProvider

addProperties

public void addProperties(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 interface ConfigurationProvider

addProperty

public Object addProperty(String key,
                          Object value)
Description copied from interface: ConfigurationProvider
Add a single property, overwriting any existing property under the same key.

Specified by:
addProperty in interface ConfigurationProvider

setInto

public void setInto(Configuration conf)
Description copied from interface: ConfigurationProvider
Set loaded information into the given configuration.

Specified by:
setInto in interface ConfigurationProvider

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.



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.