Package com.eduix.genexp.storage
Interface StorageService
-
- All Known Implementing Classes:
AbstractStorageService,DatabaseStorageService
public interface StorageServiceAn interface for study element storage service.- Author:
- Jarkko Leponiemi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists(String id, String type)<T> Tget(String id, String type, Class<T> clazz)Get one element from storage.StringgetName()booleanisApplicable(String type)<T> StorageSearchResult<T>search(StorageQuery query, Class<T> clazz)Query study elements from the storagevoidstore(StorageContext storageContext)Stores a study element.
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- the name of the storage service
-
isApplicable
boolean isApplicable(String type)
- Parameters:
type- study element type- Returns:
- true, if storage service is applicable for the given study element type
-
store
void store(StorageContext storageContext)
Stores a study element.- Parameters:
storageContext- a contect including the study element
-
exists
boolean exists(String id, String type)
- Parameters:
id- study element idtype- study element type- Returns:
- true, if the study element defined by type and id exists in the storage
-
get
<T> T get(String id, String type, Class<T> clazz)
Get one element from storage.- Type Parameters:
T- study element or null- Parameters:
id- study element idtype- study element type- Returns:
-
search
<T> StorageSearchResult<T> search(StorageQuery query, Class<T> clazz)
Query study elements from the storage- Type Parameters:
T- the type used for representing the study elements- Parameters:
query- the query objectclazz- the class used for representing study elements- Returns:
- the result of the query in a result object
-
-