org.apache.cayenne.configuration
Class DefaultRuntimeProperties

java.lang.Object
  extended by org.apache.cayenne.configuration.DefaultRuntimeProperties
All Implemented Interfaces:
RuntimeProperties

public class DefaultRuntimeProperties
extends Object
implements RuntimeProperties

An implementation of RuntimeProperties that returns properties that were injected via a map in constructor. Each property can be overridden via -D command line option (i.e. in this implementation JVM system properties take precedence over any other property configuration mechanism).

Since:
3.1

Field Summary
protected  Map<String,String> properties
           
static String PROPERTIES_MAP
          A name of the map created via DI and used to initialize this service.
 
Constructor Summary
DefaultRuntimeProperties(Map<String,String> properties)
           
 
Method Summary
 String get(String key)
          Returns a String property value for a given key.
 boolean getBoolean(String key, boolean defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_MAP

public static final String PROPERTIES_MAP
A name of the map created via DI and used to initialize this service.

See Also:
Constant Field Values

properties

protected Map<String,String> properties
Constructor Detail

DefaultRuntimeProperties

public DefaultRuntimeProperties(Map<String,String> properties)
Method Detail

get

public String get(String key)
Description copied from interface: RuntimeProperties
Returns a String property value for a given key.

Specified by:
get in interface RuntimeProperties

getBoolean

public boolean getBoolean(String key,
                          boolean defaultValue)
Specified by:
getBoolean in interface RuntimeProperties


Copyright © 2001-2010 Apache Cayenne. All Rights Reserved.