Interface ReactionRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ReactionEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<ReactionEntity,,Long> org.springframework.data.repository.ListCrudRepository<ReactionEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<ReactionEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<ReactionEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ReactionEntity>,org.springframework.data.repository.Repository<ReactionEntity,Long>
public interface ReactionRepository
extends org.springframework.data.jpa.repository.JpaRepository<ReactionEntity,Long>
JPA repository for managing reaction persistence operations.
-
Method Summary
Modifier and TypeMethodDescriptionfindByPostIdAndUserId(Long postId, Long userId) Finds a reaction by post ID and user ID.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByPostIdAndUserId
Finds a reaction by post ID and user ID.- Parameters:
postId- the ID of the postuserId- the ID of the user- Returns:
- optional containing the reaction if found, empty otherwise
-