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 Summary
Modifier and TypeMethodDescriptionfindByCategoryIdAndStatisticsType(Long categoryId, StatisticsType statisticsType) findByFieldIdAndStatisticsType(Long fieldId, StatisticsType statisticsType) findBySemesterIdAndStatisticsType(Long semesterId, StatisticsType statisticsType) findByStatisticsTypeAndTargetId(StatisticsType statisticsType, Long targetId) findByStatisticsTypeAndTargetIdAndSemesterIdAndFieldIdAndCategoryIdWithPessimisticLock(StatisticsType statisticsType, Long targetId, Long semesterId, Long fieldId, Long categoryId) 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
-
findByStatisticsTypeAndTargetId
-
findBySemesterIdAndStatisticsType
-
findByFieldIdAndStatisticsType
-
findByCategoryIdAndStatisticsType
-
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)
-