Interface Neo4JRepository<T,K>
- Type Parameters:
T- the entity type representing nodes in the Neo4J database.K- the entity ID type, typically aStringcorresponding to the element ID.
- All Superinterfaces:
jakarta.data.repository.BasicRepository<T,,K> jakarta.data.repository.CrudRepository<T,,K> jakarta.data.repository.DataRepository<T,,K> org.eclipse.jnosql.mapping.NoSQLRepository<T,K>
public interface Neo4JRepository<T,K>
extends org.eclipse.jnosql.mapping.NoSQLRepository<T,K>
A repository interface for interacting with Neo4J databases using the Jakarta Data API.
This interface extends NoSQLRepository, providing
generic CRUD operations for entities stored in a Neo4J database.
It also allows defining custom Cypher queries using the Cypher annotation.
Example usage:
@Repository
public interface PersonRepository extends Neo4JRepository<Person, String> {
@Cypher("MATCH (p:Person) WHERE p.name = $name RETURN p")
List<Person> findByName(@Param("name") String name);
}
- See Also:
-
NoSQLRepositoryCypher
-
Method Summary
Methods inherited from interface jakarta.data.repository.BasicRepository
delete, deleteAll, deleteById, findAll, findAll, findById, save, saveAllMethods inherited from interface jakarta.data.repository.CrudRepository
insert, insertAll, update, updateAllMethods inherited from interface org.eclipse.jnosql.mapping.NoSQLRepository
countBy, deleteAll, deleteByIdIn, existsById, findByIdIn