public class DefaultRuntimeProperties extends Object implements RuntimeProperties
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).| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
properties |
| Constructor and Description |
|---|
DefaultRuntimeProperties(Map<String,String> properties) |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key)
Returns a String property value for a given key.
|
String |
get(String key,
String defaultValue)
Returns a String property value for a given key or a default value if a
value is not present in properties or is null.
|
boolean |
getBoolean(String key,
boolean defaultValue) |
int |
getInt(String key,
int defaultValue) |
long |
getLong(String key,
long defaultValue) |
public String get(String key)
RuntimePropertiesget in interface RuntimePropertiespublic String get(String key, String defaultValue)
RuntimePropertiesget in interface RuntimePropertiespublic long getLong(String key, long defaultValue)
getLong in interface RuntimePropertiespublic int getInt(String key, int defaultValue)
getInt in interface RuntimePropertiespublic boolean getBoolean(String key, boolean defaultValue)
getBoolean in interface RuntimePropertiesCopyright © 2001–2023 Apache Cayenne. All rights reserved.