Package sonia.scm.store
Interface DataStore<T>
- Type Parameters:
T
- type of store items
- All Superinterfaces:
MultiEntryStore<T>
- All Known Subinterfaces:
ConfigurationEntryStore<V>
,QueryableMutableStore<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 Summary
Methods inherited from interface sonia.scm.store.MultiEntryStore
clear, get, getOptional, remove
-
Method Details
-
put
Put an item into the store. If the item has an attribute that is annotated withId
, 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
Put the item with the given id to the store. If the item has an attribute that is annotated withId
, then this field will be set to the given id.- Parameters:
id
- id of the itemitem
- item to store
-
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
-