Interface DataStore<T>

Type Parameters:
T - type of store items
All Superinterfaces:
MultiEntryStore<T>
All Known Subinterfaces:
ConfigurationEntryStore<V>, QueryableMutableStore<T>

public interface DataStore<T> extends MultiEntryStore<T>
A DataStore can be used to store any structured data. Note: the default implementation use JAXB to marshall the items.
Since:
1.23
  • Method Details

    • put

      String put(T item)
      Put an item into the store. If the item has an attribute that is annotated with Id, then the value from this field will be taken as an id if it is not null. Otherwise, a new id will be generated and used.
      Parameters:
      item - item to store
      Returns:
      automatically generated id of the item
    • put

      void put(String id, T item)
      Put the item with the given id to the store. If the item has an attribute that is annotated with Id, then this field will be set to the given id.
      Parameters:
      id - id of the item
      item - item to store
    • getAll

      Map<String,T> getAll()
      Returns a map of all stored items. The key of the map is the item id and the value is item.
      Returns:
      map of all stored items