Package org.hibernate.validator.cfg.defs

Examples of org.hibernate.validator.cfg.defs.AssertTrueDef


    mapping.type( Marathon.class )
        .property( "runners", METHOD )
        .valid()
        .type( Runner.class )
        .property( "paidEntryFee", FIELD )
        .constraint( new AssertTrueDef() );
    config.addMapping( mapping );
    Validator validator = config.buildValidatorFactory().getValidator();

    Marathon marathon = new Marathon();
    marathon.setName( "New York Marathon" );
View Full Code Here


        .property( "runners", METHOD )
        .valid()
        .convertGroup( Default.class ).to( Foo.class )
        .type( Runner.class )
        .property( "paidEntryFee", FIELD )
        .constraint( new AssertTrueDef().groups( Foo.class ) );
    config.addMapping( mapping );
    Validator validator = config.buildValidatorFactory().getValidator();

    Marathon marathon = new Marathon();
    marathon.setName( "New York Marathon" );
View Full Code Here

        .valid()
        .convertGroup( Default.class ).to( Foo.class )
        .convertGroup( Bar.class ).to( Default.class )
        .type( Runner.class )
        .property( "paidEntryFee", FIELD )
        .constraint( new AssertTrueDef().groups( Foo.class ) )
        .constraint( new AssertTrueDef().message( "really, it must be true" ) );
    config.addMapping( mapping );
    Validator validator = config.buildValidatorFactory().getValidator();

    Marathon marathon = new Marathon();
    marathon.setName( "New York Marathon" );
View Full Code Here

TOP

Related Classes of org.hibernate.validator.cfg.defs.AssertTrueDef

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.