re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / tosca / constraints / MaxLengthConstraint.java
index b6a80af..8b7ce49 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 MaxLengthConstraint extends AbstractStringPropertyConstraint implements Serializable {
+import javax.validation.constraints.NotNull;
 
-       /**
-        * 
-        */
-       private static final long serialVersionUID = 6377603705670201256L;
+public class MaxLengthConstraint extends AbstractStringPropertyConstraint {
 
-       @NotNull
-       private Integer maxLength;
+    @NotNull
+    private Integer maxLength;
 
-       public MaxLengthConstraint(Integer maxLength) {
-               this.maxLength = maxLength;
-       }
+    public MaxLengthConstraint(Integer maxLength) {
+        this.maxLength = maxLength;
+    }
 
-       public MaxLengthConstraint() {
-               super();
-       }
+    public MaxLengthConstraint() {
+        super();
+    }
 
-       @Override
-       protected void doValidate(String propertyValue) throws ConstraintViolationException {
-               if (propertyValue.length() > maxLength) {
-                       throw new ConstraintViolationException("The length of the value is greater than [" + maxLength + "]");
-               }
-       }
+    @Override
+    protected void doValidate(String propertyValue) throws ConstraintViolationException {
+        if (propertyValue.length() > maxLength) {
+            throw new ConstraintViolationException("The length of the value is greater than [" + maxLength + "]");
+        }
+    }
 
-       public Integer getMaxLength() {
-               return maxLength;
-       }
+    public Integer getMaxLength() {
+        return maxLength;
+    }
 
-       public void setMaxLength(Integer maxLength) {
-               this.maxLength = maxLength;
-       }
+    public void setMaxLength(Integer maxLength) {
+        this.maxLength = maxLength;
+    }
 }