From 88c75461da4ecc624513b002ae1e8392506f2c0a Mon Sep 17 00:00:00 2001 From: stebjan Date: Tue, 26 Jan 2016 10:30:21 +0100 Subject: [PATCH] removing unnecessary operations --- .../ui/experiments/ExperimentFormPage.java | 39 +------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/src/main/java/cz/zcu/kiv/eegdatabase/wui/ui/experiments/ExperimentFormPage.java b/src/main/java/cz/zcu/kiv/eegdatabase/wui/ui/experiments/ExperimentFormPage.java index dc869e4f..e5df2d1f 100644 --- a/src/main/java/cz/zcu/kiv/eegdatabase/wui/ui/experiments/ExperimentFormPage.java +++ b/src/main/java/cz/zcu/kiv/eegdatabase/wui/ui/experiments/ExperimentFormPage.java @@ -22,7 +22,6 @@ ******************************************************************************/ package cz.zcu.kiv.eegdatabase.wui.ui.experiments; -import cz.zcu.kiv.eegdatabase.data.dao.GenericDao; import cz.zcu.kiv.eegdatabase.data.pojo.*; import cz.zcu.kiv.eegdatabase.wui.app.EEGDataBaseApplication; import cz.zcu.kiv.eegdatabase.wui.app.session.EEGDataBaseSession; @@ -32,9 +31,6 @@ import cz.zcu.kiv.eegdatabase.wui.components.page.MenuPage; import cz.zcu.kiv.eegdatabase.wui.components.utils.PageParametersUtils; import cz.zcu.kiv.eegdatabase.wui.components.utils.ResourceUtils; -import cz.zcu.kiv.eegdatabase.wui.core.common.DigitizationFacade; -import cz.zcu.kiv.eegdatabase.wui.core.common.ElectrodeConfService; -import cz.zcu.kiv.eegdatabase.wui.core.common.WeatherFacade; import cz.zcu.kiv.eegdatabase.wui.core.experimentLicense.ExperimentLicenseFacade; import cz.zcu.kiv.eegdatabase.wui.core.experiments.ExperimentsFacade; import cz.zcu.kiv.eegdatabase.wui.core.file.FileFacade; @@ -78,17 +74,6 @@ public class ExperimentFormPage extends MenuPage { @SpringBean private FileFacade fileFacade; - @SpringBean - private DigitizationFacade digitizationFacade; - - @SpringBean - private WeatherFacade weatherFacade; - - @SpringBean(name = "subjectGroupDao") - private GenericDao subjectGroupFacade; - - @SpringBean - private ElectrodeConfService electrodeConfService; @SpringBean private LicenseFacade licenseFacade; @@ -132,31 +117,9 @@ private void setupComponents(final Model model) { @Override public void onFinish() { - if (digitizationFacade.getCountRecords() == 0) { - Digitization dig = new Digitization(); - dig.setSamplingRate(1000f); - dig.setGain(1f); - dig.setFilter("filter"); - digitizationFacade.create(dig); - } - if (electrodeConfService.getCountRecords() == 0) { - ElectrodeConf conf = new ElectrodeConf(); - conf.setImpedance(10); - electrodeConfService.create(conf); - } - - if (subjectGroupFacade.getCountRecords() == 0) { - SubjectGroup group = new SubjectGroup(); - group.setDescription("xxx"); - group.setTitle("Title"); - subjectGroupFacade.create(group); - } Experiment experiment = model.getObject(); - experiment.setDigitization(digitizationFacade.read(1)); - experiment.setElectrodeConf(electrodeConfService.read(1)); - experiment.setSubjectGroup(subjectGroupFacade.read(1)); - experiment.setWeather(weatherFacade.read(1)); + ResearchGroup group = experiment.getResearchGroup(); if (group != null && group.isLock()) {