Examples of MaxLength


Examples of com.bleujin.framework.valid.validator.MaxLength

   
  }
 
 
  public void testMaxLength() throws Exception {
    assertEquals(true, new MaxLength(b, SVALUE, 2).isValid()) ;

    b.setSvalue("abc") ;
    assertEquals(true, new MaxLength(b, SVALUE, 3).isValid()) ;
    assertEquals(false, new MaxLength(b, SVALUE, 2).isValid()) ;

    b.setSvalue("�ѱ�") ;
    assertEquals(true, new MaxLength(b, SVALUE, 2).isValid()) ;
    assertEquals(true, new MaxLength(b, SVALUE, 3).isValid()) ;
    assertEquals(false, new MaxLength(b, SVALUE, 1).isValid()) ;

  }
View Full Code Here

Examples of com.bleujin.framework.valid.validator.MaxLength

  }

 
  public void testMaxUTF8ByteLength() throws Exception {
    assertEquals(true, new MaxLength(b, SVALUE, 1).isValid()) ;

    b.setSvalue("abc") ;
    assertEquals(true, new MaxLength(b, SVALUE, 3).isValid()) ;
    assertEquals(false, new MaxLength(b, SVALUE, 2).isValid()) ;

    b.setSvalue("�ѱ�") ;
    assertEquals(true, new MaxUTFByteLength(b, SVALUE, 6).isValid()) ;
    assertEquals(false, new MaxUTFByteLength(b, SVALUE, 5).isValid()) ;
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

    public void processParams(final ProcessParameterContext processParameterContext) {
        final java.lang.annotation.Annotation[] parameterAnnotations = Annotations.getParameterAnnotations(processParameterContext.getMethod())[processParameterContext.getParamNum()];

        for (final Annotation parameterAnnotation : parameterAnnotations) {
            if (parameterAnnotation instanceof MaxLength) {
                final MaxLength annotation = (MaxLength) parameterAnnotation;
                FacetUtil.addFacet(create(annotation, processParameterContext.getFacetHolder()));
                return;
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

        super(FeatureType.PROPERTIES_ONLY);
    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        final MaxLength annotation = Annotations.getAnnotation(processMethodContext.getMethod(), MaxLength.class);
        FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

    /**
     * In readiness for supporting <tt>@Value</tt> in the future.
     */
    @Override
    public void process(final ProcessClassContext processClassContaxt) {
        final MaxLength annotation = Annotations.getAnnotation(processClassContaxt.getCls(), MaxLength.class);
        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

        super(FeatureType.ACTIONS_ONLY);
    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        final MaxLength annotation = Annotations.getAnnotation(processMethodContext.getMethod(), MaxLength.class);
        FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

        super(FeatureType.PROPERTIES_ONLY);
    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        final MaxLength annotation = Annotations.getAnnotation(processMethodContext.getMethod(), MaxLength.class);
        FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

    /**
     * In readiness for supporting <tt>@Value</tt> in the future.
     */
    @Override
    public void process(final ProcessClassContext processClassContaxt) {
        final MaxLength annotation = Annotations.getAnnotation(processClassContaxt.getCls(), MaxLength.class);
        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

    public void processParams(final ProcessParameterContext processParameterContext) {
        final java.lang.annotation.Annotation[] parameterAnnotations = Annotations.getParameterAnnotations(processParameterContext.getMethod())[processParameterContext.getParamNum()];

        for (final Annotation parameterAnnotation : parameterAnnotations) {
            if (parameterAnnotation instanceof MaxLength) {
                final MaxLength annotation = (MaxLength) parameterAnnotation;
                FacetUtil.addFacet(create(annotation, processParameterContext.getFacetHolder()));
                return;
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.applib.annotation.MaxLength

    public void processParams(final ProcessParameterContext processParameterContext) {
        final java.lang.annotation.Annotation[] parameterAnnotations = getParameterAnnotations(processParameterContext.getMethod())[processParameterContext.getParamNum()];

        for (final Annotation parameterAnnotation : parameterAnnotations) {
            if (parameterAnnotation instanceof MaxLength) {
                final MaxLength annotation = (MaxLength) parameterAnnotation;
                FacetUtil.addFacet(create(annotation, processParameterContext.getFacetHolder()));
                return;
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.