public class PropertiesWrapper extends Object
Constructor and Description |
---|
PropertiesWrapper(Properties properties)
Construct without prefix of serverName.
|
PropertiesWrapper(String prefix,
String serverName,
Properties properties)
Construct with a prefix, serverName and properties.
|
Modifier and Type | Method and Description |
---|---|
Properties |
asPropertiesLowerCase()
Return as Properties with lower case keys and after evaluation and additional properties loading has occurred.
|
String |
get(String key)
Get a property with no default value.
|
String |
get(String key,
String defaultValue)
Get a property with a default value.
|
boolean |
getBoolean(String key,
boolean defaultValue)
Return a boolean property value.
|
double |
getDouble(String key,
double defaultValue)
Return a double property value.
|
<T extends Enum<T>> |
getEnum(Class<T> enumType,
String key,
T defaultValue)
Return a Enum property value.
|
int |
getInt(String key,
int defaultValue)
Return an int property value.
|
long |
getLong(String key,
long defaultValue)
Return a long property value.
|
String |
getServerName()
Return the serverName (optional).
|
PropertiesWrapper |
withPrefix(String prefix)
Return a PropertiesWrapper instance with a different prefix but same underlying properties.
|
public PropertiesWrapper(String prefix, String serverName, Properties properties)
public PropertiesWrapper(Properties properties)
public PropertiesWrapper withPrefix(String prefix)
public String getServerName()
public Properties asPropertiesLowerCase()
Ebean has historically ignored the case of keys hence returning the Properties with all the keys lower cased.
public String get(String key, String defaultValue)
This performs a search using the prefix and server name (if supplied) to search for the property value in order based on:
prefix.serverName.key
prefix.key
key
public boolean getBoolean(String key, boolean defaultValue)
Copyright © 2017. All rights reserved.