Examples of LiteralConstraint


Examples of org.drools.rule.LiteralConstraint

        };

        /*
         * Creates a constraint with the given expression
         */
        LiteralConstraint constraint0 = new LiteralConstraint( isCheddar,
                                                               new StringConstraintComparator( ConstraintComparator.EQUAL ) );

        /* Without Memory */
        AlphaNode alphaNode = new AlphaNode( 2,
                                             constraint0,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

        };

        /*
         * Creates a constraint with the given expression
         */
        LiteralConstraint constraint0 = new LiteralConstraint( isCheddar,
                                                               new StringConstraintComparator( ConstraintComparator.EQUAL ) );

        /* With Memory */
        AlphaNode alphaNode = new AlphaNode( 2,
                                             constraint0,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

        MockObjectSource source = new MockObjectSource( 15 );

        /*
         * just create a dummy constraint, as no evaluation happens in retract
         */
        LiteralConstraint constraint0 = new LiteralConstraint( null,
                                                               null );

        /* With Memory */
        AlphaNode alphaNode = new AlphaNode( 2,
                                             constraint0,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

        };

        /*
         * Creates a constraint with the given expression
         */
        LiteralConstraint constraint0 = new LiteralConstraint( isCheddar,
                                                               new StringConstraintComparator( ConstraintComparator.EQUAL ) );

        /* With Memory */
        AlphaNode alphaNode = new AlphaNode( 2,
                                             constraint0,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

                                                            DroolsQuery.class.getClassLoader() );

        FieldValue field = FieldFactory.getFieldValue( "query-1" );

        final Evaluator evaluator = equals.getEvaluator( ValueType.STRING_TYPE, Operator.EQUAL );
        LiteralConstraint constraint = new LiteralConstraint( extractor,
                                                              evaluator,
                                                              field );

        AlphaNode alphaNode = new AlphaNode( this.buildContext.getNextId(),
                                             constraint,
                                             queryObjectTypeNode,
                                             buildContext );
        alphaNode.attach();

        final LeftInputAdapterNode liaNode = new LeftInputAdapterNode( this.buildContext.getNextId(),
                                                                       alphaNode,
                                                                       this.buildContext );
        liaNode.attach();

        final ClassObjectType cheeseObjectType = new ClassObjectType( Cheese.class );
        final ObjectTypeNode cheeseObjectTypeNode = new ObjectTypeNode( this.buildContext.getNextId(),
                                                                        this.entryPoint,
                                                                        cheeseObjectType,
                                                                        buildContext );
        cheeseObjectTypeNode.attach();

        extractor = store.getReader( Cheese.class,
                                        "type",
                                        getClass().getClassLoader() );

        field = FieldFactory.getFieldValue( "stilton" );

        constraint = new LiteralConstraint( extractor,
                                            evaluator,
                                            field );

        alphaNode = new AlphaNode( this.buildContext.getNextId(),
                                   constraint,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

        final FieldValue field = FieldFactory.getFieldValue( "cheddar" );

        final Evaluator evaluator = equals.getEvaluator( ValueType.OBJECT_TYPE,
                                                         Operator.EQUAL );
        final LiteralConstraint constraint = new LiteralConstraint( extractor,
                                                                    evaluator,
                                                                    field );

        // With Memory
        final AlphaNode alphaNode = new AlphaNode( buildContext.getNextId(),
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

        final FieldValue field = FieldFactory.getFieldValue( "cheddar" );

        final Evaluator evaluator = equals.getEvaluator( ValueType.OBJECT_TYPE,
                                                         Operator.EQUAL );
        final LiteralConstraint constraint = new LiteralConstraint( extractor,
                                                                    evaluator,
                                                                    field );

        final AlphaNode alphaNode = new AlphaNode( buildContext.getNextId(),
                                                   constraint,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

        final FieldValue field = FieldFactory.getFieldValue( "cheddar" );

        final Evaluator evaluator = equals.getEvaluator( ValueType.OBJECT_TYPE,
                                                         Operator.EQUAL );
        final LiteralConstraint constraint = new LiteralConstraint( extractor,
                                                                    evaluator,
                                                                    field );

        final AlphaNode alphaNode = new AlphaNode( buildContext.getNextId(),
                                                   constraint,
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

                                                                fieldName,
                                                                getClass().getClassLoader() );

        final FieldValue field = new LongFieldImpl( fieldValue );

        return new LiteralConstraint( extractor,
                                      evaluator,
                                      field );
    }
View Full Code Here

Examples of org.drools.rule.LiteralConstraint

                                                                fieldName,
                                                                getClass().getClassLoader() );

        final FieldValue field = new BooleanFieldImpl( fieldValue );

        return new LiteralConstraint( extractor,
                                      evaluator,
                                      field );
    }
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.