From e55d7ad07fcb64ea1fbefab0e42c3b2159914c2f Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Mon, 10 Dec 2018 09:33:25 +0100 Subject: [PATCH] =?UTF-8?q?Optimalizace=20na=C4=8D=C3=ADt=C3=A1n=C3=AD=20g?= =?UTF-8?q?rid=C5=AF=20p=C5=99i=20otev=C5=99en=C3=AD=20p=C5=99es=20URL.=20?= =?UTF-8?q?Entita=20TripBill=20se=20cachuje=20p=C5=99es=20Hibernate=20Cach?= =?UTF-8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/info/bukova/isspst/data/TripBill.java | 1 + src/main/java/info/bukova/isspst/ui/ListViewModel.java | 9 +-------- src/main/webapp/app/template.zhtml | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/info/bukova/isspst/data/TripBill.java b/src/main/java/info/bukova/isspst/data/TripBill.java index 20957fc4..f3460bcc 100644 --- a/src/main/java/info/bukova/isspst/data/TripBill.java +++ b/src/main/java/info/bukova/isspst/data/TripBill.java @@ -29,6 +29,7 @@ import java.util.List; @Entity @Table(name = "TRIP_BILL") @Indexed +@Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class TripBill extends BaseData implements EntityWithAttachment, SeasonsAware { @OneToOne(fetch = FetchType.EAGER) diff --git a/src/main/java/info/bukova/isspst/ui/ListViewModel.java b/src/main/java/info/bukova/isspst/ui/ListViewModel.java index 5f42c815..6686c70e 100644 --- a/src/main/java/info/bukova/isspst/ui/ListViewModel.java +++ b/src/main/java/info/bukova/isspst/ui/ListViewModel.java @@ -69,11 +69,7 @@ public class ListViewModel extends DocumentViewModel { super.initDocumentViewModel(); seasons = seasonService.getAllSeasons(); - - Map map = Executions.getCurrent().getParameterMap(); - if (map.get("select") == null) { - selSeason = seasonService.getActive(); - } + selSeason = seasonService.getActive(); setHqlFilter(); } @@ -328,9 +324,6 @@ public class ListViewModel extends DocumentViewModel } if (id > 0) { - selSeason = null; - setHqlFilter(); - dataList = getListFromService(); for (int i = 0; i < dataList.size(); i++) { if (dataList.get(i).getId() == id) { selIndex = i; diff --git a/src/main/webapp/app/template.zhtml b/src/main/webapp/app/template.zhtml index 2b7ad2c3..ed254032 100644 --- a/src/main/webapp/app/template.zhtml +++ b/src/main/webapp/app/template.zhtml @@ -51,6 +51,6 @@
- + \ No newline at end of file