Fixed or criterias

This commit is contained in:
anhefti 2022-12-06 15:07:45 +01:00
parent 6a7d565e88
commit bb660f3953

View file

@ -636,10 +636,10 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
SqlBuilder.isEqualTo(examId)) SqlBuilder.isEqualTo(examId))
.and( .and(
ClientConnectionRecordDynamicSqlSupport.status, ClientConnectionRecordDynamicSqlSupport.status,
SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name())) SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name()),
.or( SqlBuilder.or(
ClientConnectionRecordDynamicSqlSupport.status, ClientConnectionRecordDynamicSqlSupport.status,
SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name())) SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name())))
.build() .build()
.execute() .execute()
.stream() .stream()
@ -702,10 +702,10 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
SqlBuilder.isEqualTo(examId)) SqlBuilder.isEqualTo(examId))
.and( .and(
ClientConnectionRecordDynamicSqlSupport.status, ClientConnectionRecordDynamicSqlSupport.status,
SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name())) SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name()),
.or( SqlBuilder.or(
ClientConnectionRecordDynamicSqlSupport.status, ClientConnectionRecordDynamicSqlSupport.status,
SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name())) SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name())))
.build() .build()
.execute() .execute()
.stream() .stream()
@ -791,7 +791,8 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
SqlBuilder.isIn(ClientConnection.SECURE_CHECK_STATES)) SqlBuilder.isIn(ClientConnection.SECURE_CHECK_STATES))
.and( .and(
ClientConnectionRecordDynamicSqlSupport.securityCheckGranted, ClientConnectionRecordDynamicSqlSupport.securityCheckGranted,
SqlBuilder.isEqualTo(Constants.BYTE_FALSE), SqlBuilder.or( SqlBuilder.isEqualTo(Constants.BYTE_FALSE),
SqlBuilder.or(
ClientConnectionRecordDynamicSqlSupport.securityCheckGranted, ClientConnectionRecordDynamicSqlSupport.securityCheckGranted,
SqlBuilder.isNull())) SqlBuilder.isNull()))
.and(ClientConnectionRecordDynamicSqlSupport.ask, SqlBuilder.isNotNull()) .and(ClientConnectionRecordDynamicSqlSupport.ask, SqlBuilder.isNotNull())