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 TypeMethodDescriptionboolean
Checks 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.boolean
Gets the configured value of the specified boolean-valued property.void
Sets 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,
null
if 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,
defaultValue
if property is not configured
-
is
Gets the configured value of the specified boolean-valued property.- Parameters:
property
- Property whose value to get- Returns:
true
if the specified property is configured and its value is the boolean true,false
otherwise
-
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:
true
if the specified property is configured,false
otherwise
-
getProperties
Gets an unmodifiable view of the underlying map of configuration.- Returns:
- Unmodifiable Map
-