re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / tosca / constraints / LengthConstraint.java
index 2ba0071..c07ac7e 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.constraints.exception.ConstraintViolationException;
 
-public class LengthConstraint extends AbstractStringPropertyConstraint implements Serializable {
+import javax.validation.constraints.NotNull;
 
-       /**
-        * 
-        */
-       private static final long serialVersionUID = 6249912030281791233L;
+public class LengthConstraint extends AbstractStringPropertyConstraint {
 
-       @NotNull
-       private Integer length;
+    @NotNull
+    private Integer length;
 
-       @Override
-       protected void doValidate(String propertyValue) throws ConstraintViolationException {
-               if (propertyValue.length() != length) {
-                       throw new ConstraintViolationException("The length of the value is not equals to [" + length + "]");
-               }
-       }
+    @Override
+    protected void doValidate(String propertyValue) throws ConstraintViolationException {
+        if (propertyValue.length() != length) {
+            throw new ConstraintViolationException("The length of the value is not equals to [" + length + "]");
+        }
+    }
 
-       public Integer getLength() {
-               return length;
-       }
+    public Integer getLength() {
+        return length;
+    }
 
-       public void setLength(Integer length) {
-               this.length = length;
-       }
+    public void setLength(Integer length) {
+        this.length = length;
+    }
 
 }