Class PersistenceManager
java.lang.Object
org.episteme.core.util.persistence.PersistenceManager
Central manager for persistent scientific object graphs.
This manager discovers GraphProvider implementations via the
Java Service Provider Interface (SPI).
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescription<T> voiddelete(T entity) Deletes an entity using the current provider.static PersistenceManagerReturns the singleton instance of the persistence manager.Returns the current graph provider.<T> TLoads an entity using the current provider.<T> List<T> Queries for entities using the current provider.<T> voidsave(T entity) Saves an entity using the current provider.voidsetProvider(GraphProvider provider) Sets the graph provider to use.
-
Method Details
-
getInstance
Returns the singleton instance of the persistence manager.- Returns:
- the manager instance.
-
getProvider
-
setProvider
Sets the graph provider to use.- Parameters:
provider- the provider to set.
-
save
public <T> void save(T entity) Saves an entity using the current provider.- Type Parameters:
T- the type of the entity- Parameters:
entity- the entity to save
-
load
-
delete
public <T> void delete(T entity) Deletes an entity using the current provider.- Type Parameters:
T- the type of the entity- Parameters:
entity- the entity to delete
-
query
-