Interface CouchbaseRepository<T,K>
- Type Parameters:
T- the entity typeK- the entity ID type
- 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 CouchbaseRepository<T,K>
extends org.eclipse.jnosql.mapping.NoSQLRepository<T,K>
A Couchbase-specific extension of
NoSQLRepository.
This repository interface provides built-in CRUD operations and supports dynamic queries
using the N1QL annotation for executing Couchbase N1QL queries.
Example Usage
@Repository
interface UserRepository extends CouchbaseRepository<User, String> {
@N1QL("SELECT * FROM users WHERE name = $name")
List<User> findByName(@Param("name") String name);
@N1QL("SELECT * FROM users WHERE age > $age")
List<User> findByAgeGreaterThan(@Param("age") int age);
}
-
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