public class PropertiesServiceImpl extends java.lang.Object implements PropertiesService
Constructor and Description |
---|
PropertiesServiceImpl(<any> entityManagerProvider) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.String key)
Returns true, if a property with the given key exists.
|
java.lang.String |
get(java.lang.String key)
Returns the property value or null.
|
java.util.List<Property> |
getAllProperties()
Returns all properties
|
Property |
getPropertyById(java.lang.Long id)
Retrieves a property by ID (note that the id is not the property's key)
|
Property |
getPropertyByKey(java.lang.String key)
Retrieves a property by key.
|
Property |
merge(Property property)
Merges a property
|
void |
persist(Property property)
Persists a property
|
void |
remove(Property property)
Removes a property
|
void |
removeByKey(java.lang.String key)
Removes a property by key.
|
Property |
setProperty(java.lang.String key,
java.lang.String value)
Updates the property with the given key, or creates a new one if none exists.
|
@QueryById public Property getPropertyById(java.lang.Long id)
PropertiesService
getPropertyById
in interface PropertiesService
PropertiesService.getPropertyByKey(String)
@QueryByAttribute(where=<error>) public Property getPropertyByKey(java.lang.String key)
PropertiesService
getPropertyByKey
in interface PropertiesService
@SimpleQuery public java.util.List<Property> getAllProperties()
PropertiesService
getAllProperties
in interface PropertiesService
public java.lang.String get(java.lang.String key)
PropertiesService
get
in interface PropertiesService
public void persist(Property property)
PropertiesService
persist
in interface PropertiesService
public Property merge(Property property)
PropertiesService
merge
in interface PropertiesService
public void remove(Property property)
PropertiesService
remove
in interface PropertiesService
public void removeByKey(java.lang.String key)
PropertiesService
removeByKey
in interface PropertiesService
public boolean containsKey(java.lang.String key)
PropertiesService
containsKey
in interface PropertiesService
public Property setProperty(java.lang.String key, java.lang.String value)
PropertiesService
setProperty
in interface PropertiesService