From ed9ded57db5046655e98667bf3f30068b39d56ab Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 11 Mar 2021 13:05:24 +0100 Subject: [PATCH] SEBSERV-176 fixed --- .../sebserver/gui/content/SEBClientEvents.java | 16 +++++++++++----- .../dao/impl/ClientEventDAOImpl.java | 3 +++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/SEBClientEvents.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/SEBClientEvents.java index a3b1f244..e3aa051c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/SEBClientEvents.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/SEBClientEvents.java @@ -224,9 +224,14 @@ public class SEBClientEvents implements TemplateComposer { .publishIf(() -> writeGrant, table.hasAnyContent()); } - private PageAction getOpenDelete(final PageAction pageAction, final MultiValueMap filterCriteria) { + private PageAction getOpenDelete( + final PageAction pageAction, + final MultiValueMap filterCriteria) { + try { - final List ids = this.restService.getBuilder(GetClientEventNames.class) + + final List ids = this.restService + .getBuilder(GetClientEventNames.class) .withQueryParams(filterCriteria) .call() .getOrThrow() @@ -234,9 +239,10 @@ public class SEBClientEvents implements TemplateComposer { .map(EntityName::getModelId) .collect(Collectors.toList()); - final PageAction deleteAction = pageAction.withAttribute( - PageContext.AttributeKeys.ENTITY_ID_LIST, - StringUtils.join(ids, Constants.COMMA)) + final PageAction deleteAction = pageAction + .withAttribute( + PageContext.AttributeKeys.ENTITY_ID_LIST, + StringUtils.join(ids, Constants.COMMA)) .withAttribute( PageContext.AttributeKeys.ENTITY_LIST_TYPE, EntityType.CLIENT_EVENT.name()); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientEventDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientEventDAOImpl.java index 7b850519..12c747ed 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientEventDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientEventDAOImpl.java @@ -92,6 +92,9 @@ public class ClientEventDAOImpl implements ClientEventDAO { .and( ClientConnectionRecordDynamicSqlSupport.examId, isEqualToWhenPresent(filterMap.getClientEventExamId())) + .and( + ClientConnectionRecordDynamicSqlSupport.examUserSessionId, + SqlBuilder.isLikeWhenPresent(filterMap.getSQLWildcard(ClientConnection.FILTER_ATTR_SESSION_ID))) .and( ClientEventRecordDynamicSqlSupport.clientConnectionId, isEqualToWhenPresent(filterMap.getClientEventConnectionId()))