re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / tosca / constraints / LessThanConstraint.java
index 2fc43fe..e2db77b 100644 (file)
 
 package org.openecomp.sdc.be.model.tosca.constraints;
 
-import java.io.Serializable;
-
-import javax.validation.constraints.NotNull;
-
 import org.openecomp.sdc.be.model.tosca.ToscaType;
 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintValueDoNotMatchPropertyTypeException;
 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintViolationException;
 
-public class LessThanConstraint extends AbstractComparablePropertyConstraint implements Serializable {
+import javax.validation.constraints.NotNull;
 
-       /**
-        * 
-        */
-       private static final long serialVersionUID = 2267623014703859501L;
+public class LessThanConstraint extends AbstractComparablePropertyConstraint {
 
-       @NotNull
-       private String lessThan;
+    @NotNull
+    private String lessThan;
 
-       public LessThanConstraint(String lessThan) {
-               super();
-               this.lessThan = lessThan;
-       }
+    public LessThanConstraint(String lessThan) {
+        this.lessThan = lessThan;
+    }
 
-       @Override
-       public void initialize(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
-               initialize(lessThan, propertyType);
-       }
+    @Override
+    public void initialize(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
+        initialize(lessThan, propertyType);
+    }
 
-       @Override
-       protected void doValidate(Object propertyValue) throws ConstraintViolationException {
-               if (getComparable().compareTo(propertyValue) <= 0) {
-                       throw new ConstraintViolationException(propertyValue + " > " + lessThan);
-               }
-       }
+    @Override
+    protected void doValidate(Object propertyValue) throws ConstraintViolationException {
+        if (getComparable().compareTo(propertyValue) <= 0) {
+            throw new ConstraintViolationException(propertyValue + " > " + lessThan);
+        }
+    }
 
 }