Package org.hibernate.validator.internal.metadata.core

Examples of org.hibernate.validator.internal.metadata.core.ConstraintHelper


  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
    );

    AnnotationDescriptor<Size> sizeAnnotationDescriptor = new AnnotationDescriptor<Size>( Size.class );
    Size size = AnnotationFactory.create( sizeAnnotationDescriptor );
    sizeDescriptor = new ConstraintDescriptorImpl<Size>(
        new ConstraintHelper(),
        null,
        size,
        java.lang.annotation.ElementType.FIELD
    );
View Full Code Here


    );
  }

  private <T> BeanConfiguration<T> getBeanConfiguration(Class<T> type) {
    Set<BeanConfiguration<?>> beanConfigurations = mapping.getBeanConfigurations(
        new ConstraintHelper(),
        new DefaultParameterNameProvider()
    );

    for ( BeanConfiguration<?> beanConfiguration : beanConfigurations ) {
      if ( beanConfiguration.getBeanClass() == type ) {
View Full Code Here

  private XmlMappingParser xmlMappingParser;
  private ConstraintHelper constraintHelper;

  @BeforeMethod
  public void setupParserHelper() {
    constraintHelper = new ConstraintHelper();
    xmlMappingParser = new XmlMappingParser( constraintHelper, new DefaultParameterNameProvider() );
  }
View Full Code Here

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

    AnnotationDescriptor<Size> sizeAnnotationDescriptor = new AnnotationDescriptor<Size>( Size.class );
    size = AnnotationFactory.create( sizeAnnotationDescriptor );
    sizeDescriptor = new ConstraintDescriptorImpl<Size>(
        new ConstraintHelper(),
        null,
        size,
        java.lang.annotation.ElementType.FIELD
    );
  }
View Full Code Here

    descriptor.setValue( "message", "{replace.in.user.bundle1}" );
    descriptor.setValue( "value", 10L );
    Max max = AnnotationFactory.create( descriptor );

    ConstraintDescriptorImpl<Max> constraintDescriptor = new ConstraintDescriptorImpl<Max>(
        new ConstraintHelper(),
        null,
        max,
        java.lang.annotation.ElementType.FIELD
    );
View Full Code Here

    descriptor.setValue( "message", message );
    descriptor.setValue( "value", 10L );
    Max max = AnnotationFactory.create( descriptor );

    ConstraintDescriptorImpl<Max> constraintDescriptor = new ConstraintDescriptorImpl<Max>(
        new ConstraintHelper(),
        null,
        max,
        java.lang.annotation.ElementType.FIELD
    );
View Full Code Here

  private Method barMethod;
  private NotNull constraintAnnotation;

  @BeforeClass
  public void setUp() throws Exception {
    constraintHelper = new ConstraintHelper();
    barMethod = Foo.class.getMethod( "getBar" );
    constraintAnnotation = barMethod.getAnnotation( NotNull.class );
  }
View Full Code Here

  private static ConstraintHelper constraintHelper;

  @BeforeClass
  public static void init() {
    constraintHelper = new ConstraintHelper();
  }
View Full Code Here

  private TypeAnnotationAwareMetaDataProvider provider;

  @BeforeClass
  public void setup() {
    provider = new TypeAnnotationAwareMetaDataProvider(
        new ConstraintHelper(),
        new DefaultParameterNameProvider(),
        new AnnotationProcessingOptionsImpl()
    );
  }
View Full Code Here

  private BeanMetaData<CustomerRepositoryExt> beanMetaData;

  @BeforeMethod
  public void setupBeanMetaData() {
    BeanMetaDataManager beanMetaDataManager = new BeanMetaDataManager(
        new ConstraintHelper(),
        new ExecutableHelper( new TypeResolutionHelper() ),
        new DefaultParameterNameProvider(),
        Collections.<MetaDataProvider>emptyList()
    );
View Full Code Here

TOP

Related Classes of org.hibernate.validator.internal.metadata.core.ConstraintHelper

Copyright © 2018 www.massapicom. 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.