Package org.drools.common

Examples of org.drools.common.QueryElementFactHandle


                decl = decls[this.variables[i]];
                objects[this.variables[i]] = decl.getValue( workingMemory,
                                                            resultLeftTuple.get( decl ).getObject() );
            }

            QueryElementFactHandle handle = (QueryElementFactHandle) rightTuple.getFactHandle();

            handle.setRecency( workingMemory.getFactHandleFactory().getAtomicRecency().incrementAndGet() );
            handle.setObject( objects );

            if ( query.isOpen() ) {
                rightTuple.setLeftTuple( resultLeftTuple );
                resultLeftTuple.setObject( rightTuple );
            }
View Full Code Here


                                                entryPoint );
                break;

            }
            case 1: {
                handle = new QueryElementFactHandle( object,
                                                     id,
                                                     recency );
                break;
            }
            case 2: {
View Full Code Here

                                                _handle.getRecency(),
                                                entryPoint );
                break;
            }
            case QUERY : {
                handle = new QueryElementFactHandle( object,
                                                     _handle.getId(),
                                                     _handle.getRecency() );
                break;
            }
            case EVENT : {
View Full Code Here

        LeftTuple childLeftTuple = leftTuple.firstChild;
        LeftTuple temp = null;
        while ( childLeftTuple != null ) {
            int varsLength = this.queryElement.getVariableIndexes().length;
            if ( srcVarIndexes != null ) {
                QueryElementFactHandle qeh = (QueryElementFactHandle) childLeftTuple.getLastHandle();
                Object[] resultObjects = (Object[]) qeh.getObject();
                for ( int j = 0, i = varsLength; i < varIndexes.length; i++, j++ ) {
                    Variable v = trgVars.get( j );
                    v.setValue( resultObjects[i] );
                }
            }

            temp = childLeftTuple;
            this.sink.doPropagateAssertLeftTuple( context,
                                                  workingMemory,
                                                  childLeftTuple,
                                                  childLeftTuple.getLeftTupleSink() );
            if ( srcVarIndexes != null ) {
                QueryElementFactHandle qeh = (QueryElementFactHandle) childLeftTuple.getLastHandle();
                for ( int i = 0; i < trgVars.size(); i++ ) {
                    Variable v = trgVars.get( i );
                    v.unSet();
                }
            }
View Full Code Here

            for ( int i = 0, length = this.variables.length; i < length; i++ ) {
                objects[i] = vars[this.variables[i]].getValue();
            }

            QueryElementFactHandle handle = new QueryElementFactHandle( objects );
            RightTuple rightTuple = new RightTuple( handle );

            this.sink.createChildLeftTuplesforQuery( this.leftTuple,
                                                     rightTuple,
                                                     this.tupleMemoryEnabled );
View Full Code Here

            for ( int i = 0, length = this.variables.length; i < length; i++ ) {
                objects[i] = ((Variable) args[ this.variables[i]] ).getValue();
            }       

            QueryElementFactHandle handle = new QueryElementFactHandle(objects );
            RightTuple rightTuple = new RightTuple( handle );
           
            this.sink.createChildLeftTuplesforQuery( this.leftTuple,
                                                     rightTuple,
                                                     this.tupleMemoryEnabled );
View Full Code Here

                                                recency,
                                                entryPoint );
                break;
            }
            case 1: {
                handle = new QueryElementFactHandle( object,
                                                     id,
                                                     recency );               
                break;
            }
            default: {
View Full Code Here

                decl = decls[this.variables[i]];
                objects[this.variables[i]] = decl.getValue( workingMemory,
                                                            resultLeftTuple.get( decl ).getObject() );
            }

            QueryElementFactHandle resultHandle = new QueryElementFactHandle( objects,
                                                                              workingMemory.getFactHandleFactory().getAtomicId().incrementAndGet(),
                                                                              workingMemory.getFactHandleFactory().getAtomicRecency().incrementAndGet() );
            RightTuple rightTuple = new RightTuple( resultHandle );
            if ( query.isOpen() ) {
                rightTuple.setLeftTuple( resultLeftTuple );
View Full Code Here

                decl = decls[this.variables[i]];
                objects[this.variables[i]] = decl.getValue( workingMemory,
                                                            resultLeftTuple.get( decl ).getObject() );
            }

            QueryElementFactHandle handle = (QueryElementFactHandle)rightTuple.getFactHandle();
           
            handle.setRecency( workingMemory.getFactHandleFactory().getAtomicRecency().incrementAndGet() );
            handle.setObject( objects );
           
            if ( query.isOpen() ) {
                rightTuple.setLeftTuple( resultLeftTuple );
                resultLeftTuple.setBlocker( rightTuple );
            }
View Full Code Here

                decl = decls[this.variables[i]];
                objects[this.variables[i]] = decl.getValue( workingMemory,
                                                            resultLeftTuple.get( decl ).getObject() );
            }

            QueryElementFactHandle resultHandle = createQueryResultHandle( context,
                                                                           workingMemory,
                                                                           objects );
           
            RightTuple rightTuple = new RightTuple( resultHandle );
            if ( query.isOpen() ) {
View Full Code Here

TOP

Related Classes of org.drools.common.QueryElementFactHandle

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.