diff options
Diffstat (limited to 'catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraint.java')
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraint.java | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraint.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraint.java index f92e5fbb2c..bc51f4fa5a 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraint.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/MinLengthConstraint.java @@ -20,43 +20,36 @@ 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 MinLengthConstraint extends AbstractStringPropertyConstraint implements Serializable { +import javax.validation.constraints.NotNull; - /** - * - */ - private static final long serialVersionUID = 32422424680811240L; +public class MinLengthConstraint extends AbstractStringPropertyConstraint { - @NotNull - private Integer minLength; + @NotNull + private Integer minLength; - public MinLengthConstraint(Integer minLength) { - this.minLength = minLength; - } + public MinLengthConstraint(Integer minLength) { + this.minLength = minLength; + } - public MinLengthConstraint() { - super(); - } + public MinLengthConstraint() { + super(); + } - @Override - protected void doValidate(String propertyValue) throws ConstraintViolationException { - if (propertyValue.length() < minLength) { - throw new ConstraintViolationException("The length of the value is less than [" + minLength + "]"); - } - } + @Override + protected void doValidate(String propertyValue) throws ConstraintViolationException { + if (propertyValue.length() < minLength) { + throw new ConstraintViolationException("The length of the value is less than [" + minLength + "]"); + } + } - public Integer getMinLength() { - return minLength; - } + public Integer getMinLength() { + return minLength; + } - public void setMinLength(Integer minLength) { - this.minLength = minLength; - } + public void setMinLength(Integer minLength) { + this.minLength = minLength; + } } |