Interface PropertiesService
- All Known Implementing Classes:
PropertiesServiceImpl
public interface PropertiesService
A service that provides a way to store simple properties (key/value pairs)
persistently in the database.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) Returns true, if a property with the given key exists.Returns the property value or null.Returns all propertiesgetPropertyById(Long id) Retrieves a property by ID (note that the id is not the property's key)getPropertyByKey(String name) Retrieves a property by key.Merges a propertyvoidPersists a propertyvoidRemoves a propertyvoidremoveByKey(String key) Removes a property by key.setProperty(String key, String value) Updates the property with the given key, or creates a new one if none exists.
-
Method Details
-
getPropertyById
Retrieves a property by ID (note that the id is not the property's key)- Parameters:
id-- See Also:
-
getPropertyByKey
Retrieves a property by key.- Parameters:
name-
-
containsKey
Returns true, if a property with the given key exists.- Parameters:
key-
-
removeByKey
Removes a property by key.- Parameters:
key-
-
setProperty
Updates the property with the given key, or creates a new one if none exists.- Parameters:
key-value-
-
get
Returns the property value or null.- Parameters:
key-
-
persist
Persists a property- Parameters:
property-
-
merge
Merges a property- Parameters:
property-
-
remove
Removes a property- Parameters:
property-
-
getAllProperties
Returns all properties
-