Package io.ebean.config
Class PropertiesWrapper
java.lang.Object
io.ebean.config.PropertiesWrapper
-
Constructor Summary
ConstructorDescriptionPropertiesWrapper(String prefix, String serverName, Properties properties, ClassLoadConfig classLoadConfig)
Construct with a prefix, serverName and properties.PropertiesWrapper(Properties properties, ClassLoadConfig classLoadConfig)
Construct without prefix of serverName. -
Method Summary
Modifier and TypeMethodDescription<T> T
createInstance(Class<T> pluginType, String classname)
Return the instance to use (can be null) for the given plugin.<T> T
createInstance(Class<T> pluginType, String key, T instance)
Return the instance to use (can be null) for the given plugin.Get a property with no default value.Get a property with a default value.boolean
getBoolean(String key, boolean defaultValue)
Return a boolean property value.double
Return a double property value.<T extends Enum<T>>
TReturn a Enum property value.int
Return an int property value.long
Return a long property value.Return the serverName (optional).
-
Constructor Details
-
PropertiesWrapper
public PropertiesWrapper(String prefix, String serverName, Properties properties, ClassLoadConfig classLoadConfig)Construct with a prefix, serverName and properties. -
PropertiesWrapper
Construct without prefix of serverName.
-
-
Method Details
-
getServerName
Return the serverName (optional). -
get
Get a property with no default value. -
get
Get a property with a default value.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
-
getDouble
Return a double property value. -
getInt
Return an int property value. -
getLong
Return a long property value. -
getBoolean
Return a boolean property value. -
getEnum
Return a Enum property value. -
createInstance
Return the instance to use (can be null) for the given plugin.- Parameters:
pluginType
- the type of pluginkey
- properties keyinstance
- existing instance
-
createInstance
Return the instance to use (can be null) for the given plugin.- Parameters:
pluginType
- the type of pluginclassname
- the implementation class as per properties
-