Class OContextConfiguration
java.lang.Object
com.orientechnologies.orient.core.config.OContextConfiguration
- All Implemented Interfaces:
Serializable
Represents a context configuration where custom setting could be defined for the context only. If
not defined, globals will be taken.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor to create just a proxy for the OGlobalConfiguration.OContextConfiguration(Map<String, Object> iConfig) Initializes the context with custom parameters. -
Method Summary
Modifier and TypeMethodDescriptionintgetValue(OGlobalConfiguration iConfig) <T> TbooleangetValueAsBoolean(OGlobalConfiguration iConfig) <T extends Enum<T>>
TgetValueAsEnum(OGlobalConfiguration config, Class<T> enumType) floatgetValueAsFloat(OGlobalConfiguration iConfig) intgetValueAsInteger(OGlobalConfiguration iConfig) longgetValueAsLong(OGlobalConfiguration iConfig) getValueAsString(OGlobalConfiguration iConfig) getValueAsString(String iName, String iDefaultValue) voidmerge(OContextConfiguration contextConfiguration) setValue(OGlobalConfiguration iConfig, Object iValue)
-
Constructor Details
-
OContextConfiguration
public OContextConfiguration()Empty constructor to create just a proxy for the OGlobalConfiguration. No values are setted. -
OContextConfiguration
Initializes the context with custom parameters.- Parameters:
iConfig- Map of parameters of type Map<String, Object>.
-
OContextConfiguration
-
-
Method Details
-
setValue
-
setValue
-
getValue
-
getValueAsEnum
- Parameters:
config- Global configuration parameter.- Returns:
- Value of configuration parameter stored in this context as enumeration if such one
exists, otherwise value stored in passed in
OGlobalConfigurationinstance. - Throws:
ClassCastException- if stored value can not be casted and parsed from string to passed in enumeration class.IllegalArgumentException- if value associated with configuration parameter is a string bug can not be converted to instance of passed in enumeration class.
-
getValue
-
getValueAsBoolean
-
getValueAsString
-
getValueAsString
-
getValueAsInteger
-
getValueAsLong
-
getValueAsFloat
-
getContextSize
public int getContextSize() -
getContextKeys
-
merge
-