Package cz.cvut.kbss.jopa.utils
Class Configuration
java.lang.Object
cz.cvut.kbss.jopa.utils.Configuration
Contains configuration for the persistence provider and utility access methods for it.
This class is thread safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether this configuration contains an explicitly set value of the specified property.Gets the configured value of the specified property.Gets the configured value of the specified property.Gets an unmodifiable view of the underlying map of configuration.booleanGets the configured value of the specified boolean-valued property.voidSets the specified value for the specified property.
-
Constructor Details
-
Configuration
public Configuration() -
Configuration
-
-
Method Details
-
get
Gets the configured value of the specified property.- Parameters:
property- Property whose value to get- Returns:
- Configured value,
nullif property is not configured
-
get
Gets the configured value of the specified property.The specified default value is returned if the property is not configured.
- Parameters:
property- Property whose value to getdefaultValue- Default value to return if no value is configured- Returns:
- Configured value,
defaultValueif property is not configured
-
is
Gets the configured value of the specified boolean-valued property.- Parameters:
property- Property whose value to get- Returns:
trueif the specified property is configured and its value is the boolean true,falseotherwise
-
set
Sets the specified value for the specified property.- Parameters:
property- Property whose value to setvalue- Value to set
-
contains
Checks whether this configuration contains an explicitly set value of the specified property.- Parameters:
property- Property whose presence to check- Returns:
trueif the specified property is configured,falseotherwise
-
getProperties
Gets an unmodifiable view of the underlying map of configuration.- Returns:
- Unmodifiable Map
-