Interface StatisticsJpaRepository

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

public interface StatisticsJpaRepository extends org.springframework.data.jpa.repository.JpaRepository<Statistics,Long>
  • Method Details

    • findByStatisticsTypeAndTargetId

      List<Statistics> findByStatisticsTypeAndTargetId(StatisticsType statisticsType, Long targetId)
    • findBySemesterIdAndStatisticsType

      List<Statistics> findBySemesterIdAndStatisticsType(Long semesterId, StatisticsType statisticsType)
    • findByFieldIdAndStatisticsType

      List<Statistics> findByFieldIdAndStatisticsType(Long fieldId, StatisticsType statisticsType)
    • findByCategoryIdAndStatisticsType

      List<Statistics> findByCategoryIdAndStatisticsType(Long categoryId, StatisticsType statisticsType)
    • findByStatisticsTypeAndTargetIdAndSemesterIdAndFieldIdAndCategoryIdWithPessimisticLock

      @Lock(PESSIMISTIC_WRITE) @QueryHints() @Query("SELECT s FROM Statistics s WHERE s.statisticsType = :statisticsType AND (:targetId IS NULL AND s.targetId IS NULL OR s.targetId = :targetId) AND s.semesterId = :semesterId AND s.fieldId = :fieldId AND s.categoryId = :categoryId") Optional<Statistics> findByStatisticsTypeAndTargetIdAndSemesterIdAndFieldIdAndCategoryIdWithPessimisticLock(@Param("statisticsType") StatisticsType statisticsType, @Param("targetId") Long targetId, @Param("semesterId") Long semesterId, @Param("fieldId") Long fieldId, @Param("categoryId") Long categoryId)