Interface ConnectionLimitViolationRepository

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

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

    Modifier and Type
    Method
    Description
     
    findOverlapping(UUID permissionId, Instant from, Instant to)
     

    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

    • findByEndedAtIsNull

      List<ConnectionLimitViolation> findByEndedAtIsNull()
    • findOverlapping

      @Query("SELECT v\nFROM ConnectionLimitViolation v\nWHERE v.permissionId = :permissionId\n AND v.startedAt <= :to\n AND (v.endedAt IS NULL OR v.endedAt >= :from)\nORDER BY v.startedAt\n") List<ConnectionLimitViolation> findOverlapping(@Param("permissionId") UUID permissionId, @Param("from") Instant from, @Param("to") Instant to)