Interface AnswerDAO

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Answer,Integer>, org.springframework.data.repository.Repository<Answer,Integer>

public interface AnswerDAO extends org.springframework.data.repository.CrudRepository<Answer,Integer>
DAO for the Answer class.
Version:
0.4.1
Author:
Davide Costantini
  • Method Summary

    Modifier and Type
    Method
    Description
    findSurveyAnswersForUser(int surveyId, int userId)
     

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

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
  • Method Details

    • findSurveyAnswersForUser

      @Query("SELECT a FROM Answer a WHERE a.survey.id = :surveyId AND a.user.id = :userId") Iterable<Answer> findSurveyAnswersForUser(@Param("surveyId") int surveyId, @Param("userId") int userId)