Examples of FieldConstraint


Examples of org.drools.workbench.models.datamodel.rule.FieldConstraint

                    preGenerateNestedConstraint( gctx );
                    if ( gctx.getDepth() > 0 ) {
                        buf.append( "( " );
                    }
                    for ( int nestedConstraintIndex = 0; nestedConstraintIndex < nestedConstraints.length; nestedConstraintIndex++ ) {
                        FieldConstraint nestedConstr = nestedConstraints[ nestedConstraintIndex ];
                        nestedGctx.setFieldConstraint( nestedConstr );
                        generateConstraint( nestedConstr,
                                            nestedGctx );
                    }
                    gctx.setHasOutput( nestedGctx.isHasOutput() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FieldConstraint

    private Set<String> visitCompositeFieldConstraint( CompositeFieldConstraint cfc ) {
        final Set<String> factTypes = new HashSet<String>();
        if ( cfc.getConstraints() != null ) {
            for ( int i = 0; i < cfc.getConstraints().length; i++ ) {
                FieldConstraint fc = cfc.getConstraints()[ i ];
                factTypes.addAll( visit( fc ) );
            }
        }
        return factTypes;
    }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FieldConstraint

                      fp.getFactType() );

        assertEquals( 1,
                      fp.getNumberOfConstraints() );

        FieldConstraint fc = fp.getConstraint( 0 );
        assertNotNull( fc );
        assertTrue( fc instanceof SingleFieldConstraint );

        SingleFieldConstraint sfc = (SingleFieldConstraint) fc;
        assertEquals( "<=",
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FieldConstraint

        assertNotNull( pattern.getFactPattern() );
        FactPattern factPattern = pattern.getFactPattern();
        assertEquals( "total", factPattern.getBoundName() );
        assertNotNull( factPattern.getConstraintList() );
        assertEquals( 1, factPattern.getConstraintList().getNumberOfConstraints() );
        FieldConstraint constraint = factPattern.getConstraintList().getConstraint( 0 );
        assertTrue( constraint instanceof SingleFieldConstraint );
        SingleFieldConstraint fieldConstraint = (SingleFieldConstraint) constraint;
        assertEquals( "Number", fieldConstraint.getFactType() );
        assertEquals( "intValue", fieldConstraint.getFieldName() );
        assertEquals( "Integer", fieldConstraint.getFieldType() );
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.