Interface SurveyRepository

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

public interface SurveyRepository extends org.springframework.data.jpa.repository.JpaRepository<Survey,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    findByKey(String key, LocalDateTime pointInTime)
     

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    findAll, findAllById, saveAll

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

    findAll

    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

    • fetchActiveSurveys

      @Query("select s from Survey s where :pointInTime between s.validFrom and s.validTo") List<Survey> fetchActiveSurveys(@Param("pointInTime") LocalDateTime pointInTime)
    • fetchAllSurveys

      @Query("select s from Survey s ") List<Survey> fetchAllSurveys()
    • findByKey

      @Query("select s from Survey s where s.key = :key and :pointInTime between s.validFrom and s.validTo") Survey findByKey(@Param("key") String key, @Param("pointInTime") LocalDateTime pointInTime)