Package org.drools.workbench.models.datamodel.rule

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


                //Add the constraint from this cell
                switch ( c.getConstraintValueType() ) {
                    case BaseSingleFieldConstraint.TYPE_LITERAL:
                    case BaseSingleFieldConstraint.TYPE_RET_VALUE:
                        if ( !isOtherwise ) {
                            FieldConstraint fc = makeSingleFieldConstraint( c,
                                                                            cell );
                            fp.addConstraint( fc );
                        } else {
                            FieldConstraint fc = makeSingleFieldConstraint( c,
                                                                            allColumns,
                                                                            data );
                            fp.addConstraint( fc );
                        }
                        break;
View Full Code Here


                //Add the constraint from this cell
                switch ( c.getConstraintValueType() ) {
                    case BaseSingleFieldConstraint.TYPE_LITERAL:
                    case BaseSingleFieldConstraint.TYPE_RET_VALUE:
                        if ( !isOtherwise ) {
                            FieldConstraint fc = makeSingleFieldConstraint( c,
                                                                            cell );
                            fp.addConstraint( fc );
                        } else {
                            FieldConstraint fc = makeSingleFieldConstraint( c,
                                                                            allColumns,
                                                                            data );
                            fp.addConstraint( fc );
                        }
                        break;
View Full Code Here

        private void generateConstraints( final FactPattern pattern ) {
            GeneratorContext gctx = generatorContextFactory.newGeneratorContext();
            preGenerateConstraints( gctx );
            for ( int constraintIndex = 0; constraintIndex < pattern.getFieldConstraints().length; constraintIndex++ ) {
                FieldConstraint constr = pattern.getConstraintList().getConstraints()[ constraintIndex ];
                gctx.setFieldConstraint( constr );
                generateConstraint( constr,
                                    gctx );
            }
        }
View Full Code Here

                    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

        private void generateConstraints( final FactPattern pattern ) {
            GeneratorContext gctx = generatorContextFactory.newGeneratorContext();
            preGenerateConstraints( gctx );
            for ( int constraintIndex = 0; constraintIndex < pattern.getFieldConstraints().length; constraintIndex++ ) {
                FieldConstraint constr = pattern.getConstraintList().getConstraints()[ constraintIndex ];
                gctx.setFieldConstraint( constr );
                generateConstraint( constr,
                                    gctx );
            }
        }
View Full Code Here

                    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

        private void generateConstraints( final FactPattern pattern,
                                          final LHSGeneratorContext parentContext ) {
            LHSGeneratorContext gctx = null;
            for ( int constraintIndex = 0; constraintIndex < pattern.getFieldConstraints().length; constraintIndex++ ) {
                FieldConstraint constr = pattern.getConstraintList().getConstraints()[ constraintIndex ];

                if ( constraintIndex == 0 ) {
                    gctx = generatorContextFactory.newChildGeneratorContext( parentContext,
                                                                             constr );
                } else {
View Full Code Here

                    if ( parentContext.getParent().getFieldConstraint() instanceof CompositeFieldConstraint ) {
                        buf.append( "( " );
                    }
                    LHSGeneratorContext gctx = null;
                    for ( int nestedConstraintIndex = 0; nestedConstraintIndex < nestedConstraints.length; nestedConstraintIndex++ ) {
                        FieldConstraint nestedConstr = nestedConstraints[ nestedConstraintIndex ];

                        if ( nestedConstraintIndex == 0 ) {
                            gctx = generatorContextFactory.newChildGeneratorContext( nestedGctx,
                                                                                     nestedConstr );
                        } else {
View Full Code Here

        private void generateConstraints( final FactPattern pattern,
                                          final LHSGeneratorContext parentContext ) {
            LHSGeneratorContext gctx = null;
            for ( int constraintIndex = 0; constraintIndex < pattern.getFieldConstraints().length; constraintIndex++ ) {
                FieldConstraint constr = pattern.getConstraintList().getConstraints()[ constraintIndex ];

                if ( constraintIndex == 0 ) {
                    gctx = generatorContextFactory.newChildGeneratorContext( parentContext,
                                                                             constr );
                } else {
View Full Code Here

                    if ( parentContext.getParent().getFieldConstraint() instanceof CompositeFieldConstraint ) {
                        buf.append( "( " );
                    }
                    LHSGeneratorContext gctx = null;
                    for ( int nestedConstraintIndex = 0; nestedConstraintIndex < nestedConstraints.length; nestedConstraintIndex++ ) {
                        FieldConstraint nestedConstr = nestedConstraints[ nestedConstraintIndex ];

                        if ( nestedConstraintIndex == 0 ) {
                            gctx = generatorContextFactory.newChildGeneratorContext( nestedGctx,
                                                                                     nestedConstr );
                        } else {
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.FieldConstraint

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.