Examples of NotNull


Examples of javax.validation.constraints.NotNull

    FrenchAddress address = getFrenchAddressWithoutZipCode();
    Set<ConstraintViolation<FrenchAddress>> constraintViolations = validator.validate( address );
    assertCorrectNumberOfViolations( constraintViolations, 1 );
    ConstraintViolation<FrenchAddress> constraintViolation = constraintViolations.iterator().next();
    assertCorrectConstraintTypes( constraintViolations, NotNull.class );
    NotNull notNull = ( NotNull ) constraintViolation.getConstraintDescriptor().getAnnotation();
    List<Class<?>> groups = Arrays.asList( notNull.groups() );
    assertTrue( groups.size() == 2, "There should be two groups" );
    assertTrue( groups.contains( Default.class ), "The default group should be in the list." );
    assertTrue(
        groups.contains( FrenchAddress.FullAddressCheck.class ),
        "The FrenchAddress.FullAddressCheck group should be inherited."
View Full Code Here

Examples of javax.validation.constraints.NotNull

*/
public class GetAnnotationsParameterTest {

  @Test
  public void testGetMessageParameter() {
    NotNull testAnnotation = new NotNull() {
      @Override
      public String message() {
        return "test";
      }

View Full Code Here

Examples of javax.validation.constraints.NotNull

  @BeforeTest
  public void setUp() {
    // Create some annotations for testing using AnnotationProxies
    AnnotationDescriptor<NotNull> descriptor = new AnnotationDescriptor<NotNull>( NotNull.class );
    NotNull notNull = AnnotationFactory.create( descriptor );
    notNullDescriptor = new ConstraintDescriptorImpl<NotNull>(
        new ConstraintHelper(),
        null,
        notNull,
        java.lang.annotation.ElementType.FIELD
View Full Code Here

Examples of javax.validation.constraints.NotNull

        }
    }

    @Override
    public Boolean hasRequiredMarker(AnnotatedMember m) {
        NotNull annotation = m.getAnnotation(NotNull.class);
        if (annotation == null) {
            return null;
        }
        return Boolean.TRUE;
    }
View Full Code Here

Examples of javax.validation.constraints.NotNull

            return dataType;
        }

        public boolean notNull()
        {
            final NotNull n = mMethod.getAnnotation(NotNull.class);
            return n != null;
        }
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.NotNull

        super(NotNull.class);
    }

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        NotNull annotation = (NotNull) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return ! this.nullFunc((this.getPropertyValue(");
        sb.append(wrapAndEscapeJsString(fieldName));// field
        sb.append(")), (null))}");
View Full Code Here

Examples of org.supercsv.cellprocessor.constraint.NotNull

                break;
            } else if (name.equalsIgnoreCase("NotNull")) {
                if (params.length > 0) {
                    throw SupportLogger.LOGGER.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new NotNull() : new NotNull(previous);
            } else if (name.equalsIgnoreCase("Optional")) {
                if (params.length > 0) {
                    throw SupportLogger.LOGGER.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new Optional() : new Optional(previous);
View Full Code Here

Examples of org.supercsv.cellprocessor.constraint.NotNull

                break;
            } else if (name.equalsIgnoreCase("NotNull")) {
                if (params.length > 0) {
                    throw SupportLogger.LOGGER.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new NotNull() : new NotNull(previous);
            } else if (name.equalsIgnoreCase("Optional")) {
                if (params.length > 0) {
                    throw SupportLogger.LOGGER.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new Optional() : new Optional(previous);
View Full Code Here

Examples of org.supercsv.cellprocessor.constraint.NotNull

                break;
            } else if (name.equalsIgnoreCase("NotNull")) {
                if (params.length > 0) {
                    throw SupportMessages.MESSAGES.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new NotNull() : new NotNull(previous);
            } else if (name.equalsIgnoreCase("Optional")) {
                if (params.length > 0) {
                    throw SupportMessages.MESSAGES.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new Optional() : new Optional(previous);
View Full Code Here

Examples of org.supercsv.cellprocessor.constraint.NotNull

                break;
            } else if (name.equalsIgnoreCase("NotNull")) {
                if (params.length > 0) {
                    throw SupportMessages.MESSAGES.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new NotNull() : new NotNull(previous);
            } else if (name.equalsIgnoreCase("Optional")) {
                if (params.length > 0) {
                    throw SupportMessages.MESSAGES.invalidParamsForCellProcessor(name, params);
                }
                current = previous == null ? new Optional() : new Optional(previous);
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.