Package org.drools.spi

Examples of org.drools.spi.BetaNodeFieldConstraint


    public void setUnificationJoin() {
        // If this join uses a indexed, ==, constraint on a query parameter then set indexedUnificationJoin to true
        // This ensure we get the correct iterator
        LinkedList list = this.constraints.getConstraints();
        if ( !list.isEmpty() ) {
            BetaNodeFieldConstraint c = ( BetaNodeFieldConstraint ) ((LinkedListEntry) list.getFirst()).getObject();
            if ( DefaultBetaConstraints.isIndexable( c ) && ((VariableConstraint) c).getRestriction() instanceof UnificationRestriction) {
                if ( this.constraints instanceof SingleBetaConstraints ) {
                    this.constraints = new SingleNonIndexSkipBetaConstraints( ( SingleBetaConstraints ) this.constraints );
                }else if ( this.constraints instanceof DoubleBetaConstraints ) {
                    this.constraints = new DoubleNonIndexSkipBetaConstraints( ( DoubleBetaConstraints ) this.constraints );
View Full Code Here


    }
   
    public static void swap(final BetaNodeFieldConstraint[] constraints,
                      final int p1,
                      final int p2) {
        final BetaNodeFieldConstraint temp = constraints[p2];
        constraints[p2] = constraints[p1];
        constraints[p1] = temp;
    }
View Full Code Here

    public ContextEntry[] createContext() {
        // Now create the ContextEntries  in the same order the constraints
        ContextEntry[] contexts = new ContextEntry[this.constraints.size()];
        int i = 0;
        for ( LinkedListEntry entry = (LinkedListEntry) this.constraints.getFirst(); entry != null; entry = (LinkedListEntry) entry.getNext() ) {
            final BetaNodeFieldConstraint constraint = (BetaNodeFieldConstraint) entry.getObject();
            contexts[i++] = constraint.createContextEntry();
        }
        return contexts;
    }
View Full Code Here

    }
    private void swap(final BetaNodeFieldConstraint[] constraints,
                      final int p1,
                      final int p2) {
        final BetaNodeFieldConstraint temp = constraints[p2];
        constraints[p2] = constraints[p1];
        constraints[p1] = temp;
    }
View Full Code Here

    public ContextEntry[] createContext() {
        // Now create the ContextEntries  in the same order the constraints
        ContextEntry[] contexts = new ContextEntry[this.constraints.size()];
        int i = 0;
        for ( LinkedListEntry entry = (LinkedListEntry) this.constraints.getFirst(); entry != null; entry = (LinkedListEntry) entry.getNext() ) {
            final BetaNodeFieldConstraint constraint = (BetaNodeFieldConstraint) entry.getObject();
            contexts[i++] = constraint.createContextEntry();
        }
        return contexts;
    }
View Full Code Here

    }

    private void swap(final BetaNodeFieldConstraint[] constraints,
                      final int p1,
                      final int p2) {
        final BetaNodeFieldConstraint temp = constraints[p2];
        constraints[p2] = constraints[p1];
        constraints[p1] = temp;
    }
View Full Code Here

    }

    private void swap(final BetaNodeFieldConstraint[] constraints,
                      final int p1,
                      final int p2) {
        final BetaNodeFieldConstraint temp = constraints[p2];
        constraints[p2] = constraints[p1];
        constraints[p1] = temp;
    }
View Full Code Here

                String operator = a[1].trim();
                String var = a[2].trim();

                Declaration declr = (Declaration) context.get( var );

                BetaNodeFieldConstraint betaConstraint;
                try {
                    betaConstraint = this.reteTesterHelper.getBoundVariableConstraint( declr.getPattern(),
                                                                                       fieldName,
                                                                                       declr,
                                                                                       operator );
View Full Code Here

                String val = a[3];

                if ( "source".equals( type ) ) {
                    Declaration declr = (Declaration) context.get( val );
                    try {
                        BetaNodeFieldConstraint sourceBetaConstraint = this.reteTesterHelper.getBoundVariableConstraint( sourcePattern,
                                                                                                                         fieldName,
                                                                                                                         declr,
                                                                                                                         operator );
                        betaSourceConstraints = new SingleBetaConstraints( sourceBetaConstraint,
                                                                           buildContext.getRuleBase().getConfiguration() );
View Full Code Here

                throw new IllegalArgumentException( "Not possible to process arguments: "+Arrays.toString( a ));
            }
           
            Declaration declr = (Declaration) context.get( var );

            BetaNodeFieldConstraint betaConstraint;
            try {
                betaConstraint = this.reteTesterHelper.getBoundVariableConstraint( rightSidePattern,
                                                                                   fieldName,
                                                                                   declr,
                                                                                   operator );
View Full Code Here

TOP

Related Classes of org.drools.spi.BetaNodeFieldConstraint

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.