Interface GraphProvider
- All Known Implementing Classes:
InMemoryGraphProvider
public interface GraphProvider
Service Provider Interface (SPI) for persisting scientific object graphs.
Implementations of this interface handle the actual storage and retrieval
of entities marked with the Persistent annotation.
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescription<T> voiddelete(T entity) Deletes an entity from the persistent store.getName()Returns the unique name of this provider.<T> TLoads an entity from the persistent store.<T> List<T> Queries the persistent store for entities matching the given criteria.<T> voidsave(T entity) Saves an entity to the persistent store.
-
Method Details
-
getName
-
save
<T> void save(T entity) Saves an entity to the persistent store.- Type Parameters:
T- the type of the entity- Parameters:
entity- the entity to save
-
load
-
delete
<T> void delete(T entity) Deletes an entity from the persistent store.- Type Parameters:
T- the type of the entity- Parameters:
entity- the entity to delete
-
query
Queries the persistent store for entities matching the given criteria.- Type Parameters:
T- the type of the entities- Parameters:
type- the class of the entities to search forquery- symbols or criteria for the search (implementation-specific)- Returns:
- a list of matching entities
-