Package org.hippoecm.frontend.model.ocm
Interface IStore<T>
- Type Parameters:
T
-
- All Superinterfaces:
org.apache.wicket.util.io.IClusterable
,Serializable
- All Known Subinterfaces:
ITypeStore
- All Known Implementing Classes:
BuiltinTypeStore
public interface IStore<T>
extends org.apache.wicket.util.io.IClusterable
Store and retrieve objects. It uses a lifecycle for objects that
requires them to be saved explicitly. The ids that are used must
not be interpreted.
-
Method Summary
-
Method Details
-
find
Search for objects that meet the specified criteria.- Parameters:
criteria
-- Returns:
- iterator over objects that meet the criteria
- Throws:
StoreException
-
load
Load an object by its id. A StoreException is thrown if the object cannot be found.- Parameters:
id
-- Returns:
- object with the specified id
- Throws:
StoreException
-
save
Store an object. The object need not be created by the store, it only needs to conform to the interface T. An id is generated for the object when one did not exist yet, otherwise the existing id is returned.- Parameters:
object
-- Returns:
- id of the object
- Throws:
StoreException
-
delete
Remove an object from storage.- Parameters:
object
-- Throws:
StoreException
-