Interface Neo4JRepository<T,K>

Type Parameters:
T - the entity type representing nodes in the Neo4J database.
K - the entity ID type, typically a String corresponding 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:
  • Method Summary

    Methods inherited from interface jakarta.data.repository.BasicRepository

    delete, deleteAll, deleteById, findAll, findAll, findById, save, saveAll

    Methods inherited from interface jakarta.data.repository.CrudRepository

    insert, insertAll, update, updateAll

    Methods inherited from interface org.eclipse.jnosql.mapping.NoSQLRepository

    countBy, deleteAll, deleteByIdIn, existsById, findByIdIn