@ -58,9 +58,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%') )) "
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true )) "
,
countQuery = "" +
"SELECT count(a) " + //alarms with relations only
@ -75,9 +75,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%'))) " )
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " )
Page < AlarmInfoEntity > findAlarms ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "affectedEntityId" ) UUID affectedEntityId ,
@Param ( "affectedEntityType" ) String affectedEntityType ,
@ -105,9 +105,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%') )) "
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true )) "
,
countQuery = "" +
"SELECT count(a) " + //alarms with relations only
@ -124,9 +124,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%'))) " )
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " )
Page < AlarmInfoEntity > findAlarmsV2 ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "affectedEntityId" ) UUID affectedEntityId ,
@Param ( "affectedEntityType" ) String affectedEntityType ,
@ -150,9 +150,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%') )) " ,
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true )) " ,
countQuery = "" +
"SELECT count(a) " +
"FROM AlarmInfoEntity a " +
@ -162,9 +162,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%'))) " )
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " )
Page < AlarmInfoEntity > findAllAlarms ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "startTime" ) Long startTime ,
@Param ( "endTime" ) Long endTime ,
@ -186,9 +186,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%') )) " ,
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true )) " ,
countQuery = "" +
"SELECT count(a) " +
"FROM AlarmInfoEntity a " +
@ -200,9 +200,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%'))) " )
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " )
Page < AlarmInfoEntity > findAllAlarmsV2 ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "startTime" ) Long startTime ,
@Param ( "endTime" ) Long endTime ,
@ -224,9 +224,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%') )) "
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true )) "
,
countQuery = "" +
"SELECT count(a) " +
@ -237,9 +237,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%'))) " )
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " )
Page < AlarmInfoEntity > findCustomerAlarms ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "customerId" ) UUID customerId ,
@Param ( "startTime" ) Long startTime ,
@ -262,9 +262,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%') )) "
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true )) "
,
countQuery = "" +
"SELECT count(a) " +
@ -277,9 +277,9 @@ public interface AlarmRepository extends JpaRepository<AlarmEntity, UUID> {
"AND ((:clearFilterEnabled) IS FALSE OR a.cleared = :clearFilter) " +
"AND ((:ackFilterEnabled) IS FALSE OR a.acknowledged = :ackFilter) " +
"AND (:assigneeId IS NULL OR a.assigneeId = uuid(:assigneeId)) " +
"AND (LOWER(a.type) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.severity) LIKE LOWER(CONCAT('%', :searchText, '%')) " +
" OR LOWER(a.status) LIKE LOWER(CONCAT('%', :searchText, '%'))) " )
"AND (:searchText IS NULL OR (ilike(a.type, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.severity, CONCAT('%', :searchText, '%')) = true " +
" OR ilike(a.status, CONCAT('%', :searchText, '%')) = true)) " )
Page < AlarmInfoEntity > findCustomerAlarmsV2 ( @Param ( "tenantId" ) UUID tenantId ,
@Param ( "customerId" ) UUID customerId ,
@Param ( "startTime" ) Long startTime ,