Interface StatusMessageRepository

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

@Repository public interface StatusMessageRepository extends org.springframework.data.jpa.repository.JpaRepository<StatusMessage,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    org.springframework.data.domain.Page<StatusMessage>
    findLatestStatusMessageForPaginatedPermissions(org.springframework.data.domain.Pageable pageable)
     

    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

    • findLatestStatusMessageForAllPermissions

      @Query(value=" SELECT * FROM (\n SELECT DISTINCT ON (permission_id) *\n FROM admin_console.status_messages\n ORDER BY permission_id, start_date DESC\n ) AS latest_status_message ORDER BY start_date DESC;\n", nativeQuery=true) List<StatusMessage> findLatestStatusMessageForAllPermissions()
    • findLatestStatusMessageForPaginatedPermissions

      @Query(value=" WITH latest_status_message AS (\n SELECT DISTINCT ON (permission_id) *\n FROM admin_console.status_messages\n ORDER BY permission_id, start_date DESC\n )\n SELECT * FROM latest_status_message\n ORDER BY start_date DESC;\n", countQuery=" SELECT count(*) FROM (\n SELECT DISTINCT ON (permission_id) *\n FROM admin_console.status_messages\n ORDER BY permission_id, start_date DESC\n );\n", nativeQuery=true) org.springframework.data.domain.Page<StatusMessage> findLatestStatusMessageForPaginatedPermissions(org.springframework.data.domain.Pageable pageable)
    • findByPermissionIdOrderByStartDateDescIdDesc

      List<StatusMessage> findByPermissionIdOrderByStartDateDescIdDesc(String permissionId)