Interface CassandraRepository<T,K>
- Type Parameters:
T- the entity typeK- the primary key type of the entity
- 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 CassandraRepository<T,K>
extends org.eclipse.jnosql.mapping.NoSQLRepository<T,K>
A Cassandra-specific extension of
NoSQLRepository, providing repository-style data access.
This interface extends the generic NoSQLRepository, allowing seamless integration with Cassandra's
schema-less NoSQL database model while leveraging query capabilities provided by CQL.
Example usage:
@Repository
public interface UserRepository extends CassandraRepository<User, String> {
@CQL("SELECT * FROM users WHERE username = :username")
List<User> findByUsername(@Param("username") String username);
@CQL("DELETE FROM users WHERE id = :id")
void deleteById(@Param("id") String id);
}
-
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