Interface QuestionCommentJpaRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<QuestionComment,,Integer> org.springframework.data.jpa.repository.JpaRepository<QuestionComment,,Integer> org.springframework.data.repository.ListCrudRepository<QuestionComment,,Integer> org.springframework.data.repository.ListPagingAndSortingRepository<QuestionComment,,Integer> org.springframework.data.repository.PagingAndSortingRepository<QuestionComment,,Integer> org.springframework.data.repository.query.QueryByExampleExecutor<QuestionComment>,org.springframework.data.repository.Repository<QuestionComment,Integer>
public interface QuestionCommentJpaRepository
extends org.springframework.data.jpa.repository.JpaRepository<QuestionComment,Integer>
QuestionCommentJpaRepository는 QuestionComment 엔티티에 대한 데이터 액세스 기능을 제공.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsByUserIdAndQuestionIdAndDeletedatIsNull(Integer userId, Integer questionId) findAllByQuestionAndStateOrderByIdAsc(Question question, BaseEntity.State state) findByIdAndState(Integer commentIdx, BaseEntity.State state) findByIdAndStateWithPessimisticLock(Integer commentIdx, BaseEntity.State state) 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
-
findByIdAndState
-
findAllByQuestionAndStateOrderByIdAsc
List<QuestionComment> findAllByQuestionAndStateOrderByIdAsc(Question question, BaseEntity.State state) -
findByIdAndStateWithPessimisticLock
@Lock(PESSIMISTIC_WRITE) @QueryHints() @Query("SELECT c FROM QuestionComment c WHERE c.id = :commentIdx AND c.state = :state") Optional<QuestionComment> findByIdAndStateWithPessimisticLock(Integer commentIdx, BaseEntity.State state) -
existsByUserIdAndQuestionIdAndDeletedatIsNull
-