Class KeyValueStore

java.lang.Object
org.localify.common.KeyValueStore

@Service @Transactional(propagation=REQUIRES_NEW) public class KeyValueStore extends Object
A simple key-value store backed by a database table.
  • Constructor Details

    • KeyValueStore

      public KeyValueStore()
  • Method Details

    • getValueForKey

      public String getValueForKey(String key)
      Gets the value for a given key.
      Parameters:
      key - The key.
      Returns:
      The value, or null if the key is not found.
    • upsertKeyValue

      public void upsertKeyValue(String key, String value)
      Inserts or updates a key-value pair.
      Parameters:
      key - The key.
      value - The value.