@ -57,7 +57,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND (:endTime IS NULL OR (a.createdTime <= :endTime AND ea.createdTime <= :endTime)) " +
"AND (:endTime IS NULL OR (a.createdTime <= :endTime AND ea.createdTime <= :endTime)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
@ -74,7 +74,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND (:endTime IS NULL OR (a.createdTime <= :endTime AND ea.createdTime <= :endTime)) " +
"AND (:endTime IS NULL OR (a.createdTime <= :endTime AND ea.createdTime <= :endTime)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
@ -87,7 +87,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ,
@Param ( "assigneeId" ) UUID assigneeId ,
@Param ( "searchText" ) String searchText ,
@Param ( "searchText" ) String searchText ,
Pageable pageable ) ;
Pageable pageable ) ;
@ -106,7 +106,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
@ -127,7 +127,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
@ -142,7 +142,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ,
@Param ( "assigneeId" ) UUID assigneeId ,
@Param ( "searchText" ) String searchText ,
@Param ( "searchText" ) String searchText ,
Pageable pageable ) ;
Pageable pageable ) ;
@ -153,7 +153,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " ,
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " ,
@ -165,7 +165,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
@ -176,7 +176,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ,
@Param ( "assigneeId" ) UUID assigneeId ,
@Param ( "searchText" ) String searchText ,
@Param ( "searchText" ) String searchText ,
Pageable pageable ) ;
Pageable pageable ) ;
@ -191,7 +191,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " ,
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " ,
@ -207,7 +207,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
@ -220,7 +220,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ,
@Param ( "assigneeId" ) UUID assigneeId ,
@Param ( "searchText" ) String searchText ,
@Param ( "searchText" ) String searchText ,
Pageable pageable ) ;
Pageable pageable ) ;
@ -231,7 +231,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
@ -244,7 +244,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND (:endTime IS NULL OR a.createdTime <= :endTime) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
@ -256,7 +256,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ,
@Param ( "assigneeId" ) UUID assigneeId ,
@Param ( "searchText" ) String searchText ,
@Param ( "searchText" ) String searchText ,
Pageable pageable ) ;
Pageable pageable ) ;
@ -271,7 +271,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) "
@ -288,7 +288,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
// "AND ((:alarmSeverities) IS NULL OR a.severity IN (:alarmSeverities)) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) ) " +
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId) " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true))" )
@ -302,7 +302,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ,
@Param ( "assigneeId" ) UUID assigneeId ,
@Param ( "searchText" ) String searchText ,
@Param ( "searchText" ) String searchText ,
Pageable pageable ) ;
Pageable pageable ) ;
@ -314,7 +314,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ea.entityType = :affectedEntityType " +
"AND ea.entityType = :affectedEntityType " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:clearFilterEnabled) = FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND ((:ackFilterEnabled) = FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid( :assigneeId) )" )
"AND (:assigneeId IS NULL OR a.assigneeId = :assigneeId)" )
Set < AlarmSeverity > findAlarmSeverities ( @Param ( "tenantId" ) UUID tenantId ,
Set < AlarmSeverity > findAlarmSeverities ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "affectedEntityId" ) UUID affectedEntityId ,
@Param ( "affectedEntityId" ) UUID affectedEntityId ,
@Param ( "affectedEntityType" ) String affectedEntityType ,
@Param ( "affectedEntityType" ) String affectedEntityType ,
@ -322,7 +322,7 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "clearFilter" ) boolean clearFilter ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilterEnabled" ) boolean ackFilterEnabled ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "ackFilter" ) boolean ackFilter ,
@Param ( "assigneeId" ) String assigneeId ) ;
@Param ( "assigneeId" ) UUID assigneeId ) ;
@Query ( "SELECT a.id FROM AlarmEntity a WHERE a.tenantId = :tenantId AND a.createdTime < :time AND a.endTs < :time" )
@Query ( "SELECT a.id FROM AlarmEntity a WHERE a.tenantId = :tenantId AND a.createdTime < :time AND a.endTs < :time" )
Page < UUID > findAlarmsIdsByEndTsBeforeAndTenantId ( @Param ( "time" ) Long time , @Param ( "tenantId" ) UUID tenantId , Pageable pageable ) ;
Page < UUID > findAlarmsIdsByEndTsBeforeAndTenantId ( @Param ( "time" ) Long time , @Param ( "tenantId" ) UUID tenantId , Pageable pageable ) ;