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 Details

    • getPropertyById

      Property getPropertyById(Long id)
      Retrieves a property by ID (note that the id is not the property's key)
      Parameters:
      id -
      See Also:
    • getPropertyByKey

      Property getPropertyByKey(String name)
      Retrieves a property by key.
      Parameters:
      name -
    • containsKey

      boolean containsKey(String key)
      Returns true, if a property with the given key exists.
      Parameters:
      key -
    • removeByKey

      void removeByKey(String key)
      Removes a property by key.
      Parameters:
      key -
    • setProperty

      Property setProperty(String key, String value)
      Updates the property with the given key, or creates a new one if none exists.
      Parameters:
      key -
      value -
    • get

      String get(String key)
      Returns the property value or null.
      Parameters:
      key -
    • persist

      void persist(Property property)
      Persists a property
      Parameters:
      property -
    • merge

      Property merge(Property property)
      Merges a property
      Parameters:
      property -
    • remove

      void remove(Property property)
      Removes a property
      Parameters:
      property -
    • getAllProperties

      List<Property> getAllProperties()
      Returns all properties