From bb660f39534fa1681afee670bba96a18d48588d2 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 6 Dec 2022 15:07:45 +0100 Subject: [PATCH] Fixed or criterias --- .../dao/impl/ClientConnectionDAOImpl.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java index 6d19183a..9e7f7573 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java @@ -636,10 +636,10 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO { SqlBuilder.isEqualTo(examId)) .and( ClientConnectionRecordDynamicSqlSupport.status, - SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name())) - .or( - ClientConnectionRecordDynamicSqlSupport.status, - SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name())) + SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name()), + SqlBuilder.or( + ClientConnectionRecordDynamicSqlSupport.status, + SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name()))) .build() .execute() .stream() @@ -702,10 +702,10 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO { SqlBuilder.isEqualTo(examId)) .and( ClientConnectionRecordDynamicSqlSupport.status, - SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name())) - .or( - ClientConnectionRecordDynamicSqlSupport.status, - SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name())) + SqlBuilder.isEqualTo(ConnectionStatus.ACTIVE.name()), + SqlBuilder.or( + ClientConnectionRecordDynamicSqlSupport.status, + SqlBuilder.isEqualTo(ConnectionStatus.CONNECTION_REQUESTED.name()))) .build() .execute() .stream() @@ -791,7 +791,8 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO { SqlBuilder.isIn(ClientConnection.SECURE_CHECK_STATES)) .and( ClientConnectionRecordDynamicSqlSupport.securityCheckGranted, - SqlBuilder.isEqualTo(Constants.BYTE_FALSE), SqlBuilder.or( + SqlBuilder.isEqualTo(Constants.BYTE_FALSE), + SqlBuilder.or( ClientConnectionRecordDynamicSqlSupport.securityCheckGranted, SqlBuilder.isNull())) .and(ClientConnectionRecordDynamicSqlSupport.ask, SqlBuilder.isNotNull())