commit 8490c92c36461b989df68520ecbe65bbdb4124cb
Author: Vojtěch Danišík <32537562+danisik@users.noreply.github.com>
Date:   Fri Apr 24 17:53:32 2020 +0200

    Updating last merge.

diff --git a/src/main/java/vldc/aswi/domain/Configuration.java b/src/main/java/vldc/aswi/domain/Configuration.java
index d25c3727..6856f989 100644
--- a/src/main/java/vldc/aswi/domain/Configuration.java
+++ b/src/main/java/vldc/aswi/domain/Configuration.java
@@ -4,11 +4,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import vldc.aswi.domain.parameter.ParameterInConfiguration;
-import vldc.aswi.utils.validator.OperatorValueConstraint;
 
 import javax.persistence.*;
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
 import java.util.List;
 
 /**
diff --git a/src/main/java/vldc/aswi/domain/parameter/Parameter.java b/src/main/java/vldc/aswi/domain/parameter/Parameter.java
index c0a503cd..5c8a206f 100644
--- a/src/main/java/vldc/aswi/domain/parameter/Parameter.java
+++ b/src/main/java/vldc/aswi/domain/parameter/Parameter.java
@@ -38,11 +38,6 @@ public class Parameter extends EntityParent {
     @Column(name = "default_hodnota")
     private String defaultValue;
 
-    /** Specific type of parameter, which represents type of entry. */
-    @ManyToOne(fetch=FetchType.LAZY)
-    @JoinColumn(name = "parametr_typ_id")
-    private ParameterType parameterType;
-
     /** List of parametersInConfiguration, which using this parameter. */
     @OneToMany(mappedBy = "parameter", cascade = {CascadeType.ALL})
     private List<ParameterInConfiguration> parametersInConfiguration;
diff --git a/src/main/java/vldc/aswi/domain/parameter/ParameterInConfiguration.java b/src/main/java/vldc/aswi/domain/parameter/ParameterInConfiguration.java
index 53d71eec..42a50a25 100644
--- a/src/main/java/vldc/aswi/domain/parameter/ParameterInConfiguration.java
+++ b/src/main/java/vldc/aswi/domain/parameter/ParameterInConfiguration.java
@@ -4,7 +4,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import vldc.aswi.domain.*;
-import vldc.aswi.utils.validator.OperatorValueConstraint;
+import vldc.aswi.validators.operator.value.OperatorValueConstraint;
 
 import javax.persistence.*;
 import java.util.List;
diff --git a/src/main/java/vldc/aswi/utils/validator/OperatorValueConstraint.java b/src/main/java/vldc/aswi/utils/validator/OperatorValueConstraint.java
deleted file mode 100644
index 68fe8cf1..00000000
--- a/src/main/java/vldc/aswi/utils/validator/OperatorValueConstraint.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package vldc.aswi.utils.validator;
-
-import javax.validation.Constraint;
-import javax.validation.Payload;
-import java.lang.annotation.*;
-
-/**
- * Annotation used for validation of operator value
- */
-@Documented
-@Constraint(validatedBy = OperatorValueValidator.class)
-@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface OperatorValueConstraint {
-
-    /**
-     * Message of operator value is invalid
-     * @return error message
-     */
-    String message() default "Neplatná hodnota filtru!";
-
-    /**
-     * Array of classes
-     * @return array of classes
-     */
-    Class<?>[] groups() default {};
-
-    /**
-     * Class payload
-     * @return class payload
-     */
-    Class<? extends Payload>[] payload() default {};
-}
diff --git a/src/main/java/vldc/aswi/utils/validator/OperatorValueValidator.java b/src/main/java/vldc/aswi/utils/validator/OperatorValueValidator.java
deleted file mode 100644
index 932c27dc..00000000
--- a/src/main/java/vldc/aswi/utils/validator/OperatorValueValidator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package vldc.aswi.utils.validator;
-
-import vldc.aswi.domain.parameter.ParameterInConfiguration;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * Validator class for validation operator value according to used operator
- */
-public class OperatorValueValidator implements
-        ConstraintValidator<OperatorValueConstraint, Object> {
-
-    /**
-     * Initialize validator
-     * @param operatorValue operator value
-     */
-    @Override
-    public void initialize(OperatorValueConstraint operatorValue) {
-    }
-
-    /**
-     * Validation process of operator value
-     * @param o object to be validated
-     * @param constraintValidatorContext context
-     * @return true if operator value is valid
-     */
-    @Override
-    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
-        ParameterInConfiguration parameterInConfiguration = (ParameterInConfiguration) o;
-        if (parameterInConfiguration.getOperator() != null && parameterInConfiguration.getOperator().getName().equals("BETWEEN")) {
-            return parameterInConfiguration.getOperatorValue().matches(".;.");
-        }
-
-        return true;
-    }
-}
diff --git a/src/main/java/vldc/aswi/validators/operator/value/OperatorValueConstraint.java b/src/main/java/vldc/aswi/validators/operator/value/OperatorValueConstraint.java
new file mode 100644
index 00000000..37f4520a
--- /dev/null
+++ b/src/main/java/vldc/aswi/validators/operator/value/OperatorValueConstraint.java
@@ -0,0 +1,33 @@
+package vldc.aswi.validators.operator.value;
+
+import javax.validation.Constraint;
+import javax.validation.Payload;
+import java.lang.annotation.*;
+
+/**
+ * Annotation used for validation of operator value
+ */
+@Documented
+@Constraint(validatedBy = OperatorValueValidator.class)
+@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface OperatorValueConstraint {
+
+    /**
+     * Message of operator value is invalid
+     * @return error message
+     */
+    String message() default "Neplatná hodnota filtru!";
+
+    /**
+     * Array of classes
+     * @return array of classes
+     */
+    Class<?>[] groups() default {};
+
+    /**
+     * Class payload
+     * @return class payload
+     */
+    Class<? extends Payload>[] payload() default {};
+}
diff --git a/src/main/java/vldc/aswi/validators/operator/value/OperatorValueValidator.java b/src/main/java/vldc/aswi/validators/operator/value/OperatorValueValidator.java
new file mode 100644
index 00000000..ae54bf5f
--- /dev/null
+++ b/src/main/java/vldc/aswi/validators/operator/value/OperatorValueValidator.java
@@ -0,0 +1,37 @@
+package vldc.aswi.validators.operator.value;
+
+import vldc.aswi.domain.parameter.ParameterInConfiguration;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * Validator class for validation operator value according to used operator
+ */
+public class OperatorValueValidator implements
+        ConstraintValidator<OperatorValueConstraint, Object> {
+
+    /**
+     * Initialize validator
+     * @param operatorValue operator value
+     */
+    @Override
+    public void initialize(OperatorValueConstraint operatorValue) {
+    }
+
+    /**
+     * Validation process of operator value
+     * @param o object to be validated
+     * @param constraintValidatorContext context
+     * @return true if operator value is valid
+     */
+    @Override
+    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
+        ParameterInConfiguration parameterInConfiguration = (ParameterInConfiguration) o;
+        if (parameterInConfiguration.getOperator() != null && parameterInConfiguration.getOperator().getName().equals("BETWEEN")) {
+            return parameterInConfiguration.getOperatorValue().matches(".;.");
+        }
+
+        return true;
+    }
+}
diff --git a/src/main/java/vldc/aswi/web/controller/AssemblyController.java b/src/main/java/vldc/aswi/web/controller/AssemblyController.java
index 17082fcc..0cc1fff5 100644
--- a/src/main/java/vldc/aswi/web/controller/AssemblyController.java
+++ b/src/main/java/vldc/aswi/web/controller/AssemblyController.java
@@ -13,6 +13,11 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import vldc.aswi.domain.Assembly;
+import vldc.aswi.domain.Configuration;
+import vldc.aswi.domain.Location;
+import vldc.aswi.domain.Operator;
+import vldc.aswi.domain.parameter.Parameter;
+import vldc.aswi.domain.parameter.ParameterInConfiguration;
 import vldc.aswi.service.*;
 import vldc.aswi.service.parameter.ParameterManager;
 import vldc.aswi.service.parameter.ParameterTypeManager;
@@ -63,6 +68,9 @@ public class AssemblyController extends BasicController {
     @Autowired
     private AssemblyValidator assemblyValidator;
 
+    @Autowired
+    private ConfigurationManager configurationManager;
+
     /** Name of thymeleaf parameter, which will contain text in assembly form. */
     private String assemblyTitleName = "title";
 
@@ -167,7 +175,6 @@ public class AssemblyController extends BasicController {
 
         long assemblyID = assembly.getId();
         System.out.println(assemblyID);
-        Assembly assembly2 = assemblyManager.getAssemblyById(assemblyID);
 
         Assembly assembly2 = this.assemblyManager.getAssemblyById(assemblyID);
 
