Interface QuizResultRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<QuizResultEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<QuizResultEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<QuizResultEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<QuizResultEntity>, org.springframework.data.repository.Repository<QuizResultEntity,Long>

@Repository public interface QuizResultRepository extends org.springframework.data.jpa.repository.JpaRepository<QuizResultEntity,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    void
    updateQuizId(Integer newQuizId, Integer oldQuizId)
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findAllByQuizId

      List<QuizResultEntity> findAllByQuizId(Integer quizId)
    • findTopByQuizIdOrderByPositionDesc

      Optional<QuizResultEntity> findTopByQuizIdOrderByPositionDesc(Integer quizId)
    • updateQuizId

      @Transactional @Modifying @Query("UPDATE QuizResultEntity SET quizId = :newQuizId WHERE quizId = :oldQuizId") void updateQuizId(@Param("newQuizId") Integer newQuizId, @Param("oldQuizId") Integer oldQuizId)