Examples of BetaConstraints


Examples of org.drools.common.BetaConstraints

                                                                              declaration,
                                                                              equals.getEvaluator( ValueType.PINTEGER_TYPE, Operator.EQUAL ) );
        final RuleBaseConfiguration configuration = new RuleBaseConfiguration();
        configuration.setIndexRightBetaMemory( false );
        configuration.setIndexLeftBetaMemory( false );
        final BetaConstraints betaConstraints = new SingleBetaConstraints( variableConstraint,
                                                                           configuration );

        final List list = new ArrayList();
        final Cheese cheese1 = new Cheese( "cheddar",
                                           18 );
View Full Code Here

Examples of org.drools.common.BetaConstraints

        MvelConstraint variableConstraint = new MvelConstraintTestUtil("price == age", declaration, priceExtractor);

        final RuleBaseConfiguration configuration = new RuleBaseConfiguration();
        configuration.setIndexRightBetaMemory( false );
        configuration.setIndexLeftBetaMemory( false );
        final BetaConstraints betaConstraints = new SingleBetaConstraints( variableConstraint,
                                                                           configuration );

        final List list = new ArrayList();
        final Cheese cheese1 = new Cheese( "cheddar",
                                           18 );
View Full Code Here

Examples of org.drools.common.BetaConstraints

    @Test
    public void testGetConstraints_ReturnsNullEvenWithEmptyBinder() {
        when( constraint.isAllowedCachedLeft( any( ContextEntry.class ), any( InternalFactHandle.class ) )).thenReturn(true);
        when( constraint.isAllowedCachedRight( any( LeftTupleImpl.class ), any( ContextEntry.class ) )).thenReturn(true);

        final BetaConstraints nullConstraints = EmptyBetaConstraints.getInstance();

        ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        BuildContext buildContext = new BuildContext( ruleBase,
                                                      ruleBase.getReteooBuilder().getIdGenerator() );
View Full Code Here

Examples of org.drools.common.BetaConstraints

                                                             with( any( ContextEntry.class ) ) );
                will( returnValue( true ) );
            }
        } );

        final BetaConstraints nullConstraints = EmptyBetaConstraints.getInstance();

        ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        BuildContext buildContext = new BuildContext( ruleBase,
                                                      ruleBase.getReteooBuilder().getIdGenerator() );
View Full Code Here

Examples of org.drools.common.BetaConstraints

                                                            e );
                    }
                }
            }
           
            BetaConstraints betaSourceConstraints;
            switch ( list.size() ) {
                case 0:
                    betaSourceConstraints = new EmptyBetaConstraints();
                    break;
                case 1:
View Full Code Here

Examples of org.drools.common.BetaConstraints

        VariableConstraint constraint0 = ( VariableConstraint ) getConstraint( "d", Operator.EQUAL, "this", Foo.class );
        VariableConstraint[] constraints = new VariableConstraint[] { constraint0 };
       
        RuleBaseConfiguration config = new RuleBaseConfiguration();

        BetaConstraints betaConstraints = null;
       
        betaConstraints = new SingleBetaConstraints(constraints, config);
       
        BetaMemory betaMemory = betaConstraints.createBetaMemory( config, NodeTypeEnums.JoinNode );
       
        RuleBase rb = RuleBaseFactory.newRuleBase();
        StatefulSession ss = rb.newStatefulSession();
       
        InternalFactHandle fh1 = (InternalFactHandle) ss.insert( new Foo( "brie", 1) );
View Full Code Here

Examples of org.drools.common.BetaConstraints

                                                                              equals.getEvaluator( ValueType.PINTEGER_TYPE,
                                                                                                   Operator.EQUAL ) );
        final RuleBaseConfiguration configuration = new RuleBaseConfiguration();
        configuration.setIndexRightBetaMemory( false );
        configuration.setIndexLeftBetaMemory( false );
        final BetaConstraints betaConstraints = new SingleBetaConstraints( variableConstraint,
                                                                           configuration );

        final List list = new ArrayList();
        final Cheese cheese1 = new Cheese( "cheddar",
                                           18 );
View Full Code Here

Examples of org.drools.common.BetaConstraints

    @Test
    public void testGetConstraints_ReturnsNullEvenWithEmptyBinder() {
        when( constraint.isAllowedCachedLeft( any( ContextEntry.class ), any( InternalFactHandle.class ) )).thenReturn(true);
        when( constraint.isAllowedCachedRight( any( LeftTupleImpl.class ), any( ContextEntry.class ) )).thenReturn(true);

        final BetaConstraints nullConstraints = EmptyBetaConstraints.getInstance();

        ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        BuildContext buildContext = new BuildContext( ruleBase,
                                                      ruleBase.getReteooBuilder().getIdGenerator() );
View Full Code Here

Examples of org.drools.common.BetaConstraints

                } catch ( IntrospectionException e ) {
                    throw new IllegalArgumentException();
                }
            }
           
            BetaConstraints constraints;
            switch ( list.size() ) {
                case 0:
                    constraints = new EmptyBetaConstraints();
                    break;
                case 1:
View Full Code Here

Examples of org.drools.common.BetaConstraints

                                                            e );
                    }
                }
            }
           
            BetaConstraints betaSourceConstraints;
            switch ( list.size() ) {
                case 0:
                    betaSourceConstraints = new EmptyBetaConstraints();
                    break;
                case 1:
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.