@Test public void testAttach() throws Exception { QueryElement queryElement = new QueryElement(null, null, new QueryArgument[0], null, null, false, false); final MockTupleSource source = new MockTupleSource( 12 ); final QueryElementNode node = new QueryElementNode( 18, source, queryElement, true, false, buildContext ); assertEquals( 18, node.getId() ); assertEquals( 0, source.getAttached() ); node.attach(buildContext); assertEquals( 1, source.getAttached() ); }
@Override public void attach(BuildContext context ) { this.leftInput.addTupleSink( this, context ); }
QueryElementNode extends LeftTupleSource implements
    LeftTupleSinkNode,
    MemoryFactory<QueryElementNode.QueryElementNodeMemory> { @Override public void attach(BuildContext context ) { this.leftInput.addTupleSink( this, context ); } }
QueryElementNode extends LeftTupleSource implements
    LeftTupleSinkNode,
    MemoryFactory<QueryElementNode.QueryElementNodeMemory> { @Override public void attach(BuildContext context ) { this.leftInput.addTupleSink( this, context ); } QueryElementNode();  QueryElementNode(final int id,
                            final LeftTupleSource tupleSource,
                            final QueryElement queryElement,
                            final boolean tupleMemoryEnabled,
                            final boolean openQuery,
                            final BuildContext context); }
QueryElementNode extends LeftTupleSource implements
    LeftTupleSinkNode,
    MemoryFactory<QueryElementNode.QueryElementNodeMemory> { @Override public void attach(BuildContext context ) { this.leftInput.addTupleSink( this, context ); } QueryElementNode();  QueryElementNode(final int id,
                            final LeftTupleSource tupleSource,
                            final QueryElement queryElement,
                            final boolean tupleMemoryEnabled,
                            final boolean openQuery,
                            final BuildContext context); @Override void readExternal(ObjectInput in); @Override void writeExternal(ObjectOutput out); @Override void networkUpdated(UpdateContext updateContext); @Override short getType(); @Override boolean isLeftTupleMemoryEnabled(); QueryElement getQueryElement(); boolean isOpenQuery(); @SuppressWarnings("unchecked") InternalFactHandle createFactHandle(final PropagationContext context,
                                               final InternalWorkingMemory workingMemory,
                                               final LeftTuple leftTuple ); DroolsQuery createDroolsQuery(LeftTuple leftTuple,
                                         InternalFactHandle handle,
                                         StackEntry stackEntry,
                                         final List<PathMemory> pmems,
                                         QueryElementNodeMemory qmem,
                                         LeftTupleSink sink,
                                         InternalWorkingMemory workingMemory); Object[] getActualArguments( LeftTuple leftTuple, InternalWorkingMemory workingMemory ); @Override void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled); @Override LeftTupleSinkNode getNextLeftTupleSinkNode(); @Override void setNextLeftTupleSinkNode(final LeftTupleSinkNode next); @Override LeftTupleSinkNode getPreviousLeftTupleSinkNode(); @Override void setPreviousLeftTupleSinkNode(final LeftTupleSinkNode previous); @Override LeftTuple createLeftTuple(InternalFactHandle factHandle,
                                     boolean leftTupleMemoryEnabled); @Override LeftTuple createLeftTuple(final InternalFactHandle factHandle,
                                     final LeftTuple leftTuple,
                                     final Sink sink); @Override LeftTuple createLeftTuple(LeftTuple leftTuple,
                                     Sink sink,
                                     PropagationContext pctx, boolean leftTupleMemoryEnabled); @Override LeftTuple createLeftTuple(LeftTuple leftTuple,
                                     RightTuple rightTuple,
                                     Sink sink); @Override LeftTuple createLeftTuple(LeftTuple leftTuple,
                                     RightTuple rightTuple,
                                     LeftTuple currentLeftChild,
                                     LeftTuple currentRightChild,
                                     Sink sink,
                                     boolean leftTupleMemoryEnabled); @Override boolean equals(Object object); @Override QueryElementNodeMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm); @Override ObjectTypeNode getObjectTypeNode(); @Override LeftTuple createPeer(LeftTuple original); @Override String toString(); @Override void attach(BuildContext context ); }
QueryElementNode extends LeftTupleSource implements
    LeftTupleSinkNode,
    MemoryFactory<QueryElementNode.QueryElementNodeMemory> { @Override public void attach(BuildContext context ) { this.leftInput.addTupleSink( this, context ); } QueryElementNode();  QueryElementNode(final int id,
                            final LeftTupleSource tupleSource,
                            final QueryElement queryElement,
                            final boolean tupleMemoryEnabled,
                            final boolean openQuery,
                            final BuildContext context); @Override void readExternal(ObjectInput in); @Override void writeExternal(ObjectOutput out); @Override void networkUpdated(UpdateContext updateContext); @Override short getType(); @Override boolean isLeftTupleMemoryEnabled(); QueryElement getQueryElement(); boolean isOpenQuery(); @SuppressWarnings("unchecked") InternalFactHandle createFactHandle(final PropagationContext context,
                                               final InternalWorkingMemory workingMemory,
                                               final LeftTuple leftTuple ); DroolsQuery createDroolsQuery(LeftTuple leftTuple,
                                         InternalFactHandle handle,
                                         StackEntry stackEntry,
                                         final List<PathMemory> pmems,
                                         QueryElementNodeMemory qmem,
                                         LeftTupleSink sink,
                                         InternalWorkingMemory workingMemory); Object[] getActualArguments( LeftTuple leftTuple, InternalWorkingMemory workingMemory ); @Override void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled); @Override LeftTupleSinkNode getNextLeftTupleSinkNode(); @Override void setNextLeftTupleSinkNode(final LeftTupleSinkNode next); @Override LeftTupleSinkNode getPreviousLeftTupleSinkNode(); @Override void setPreviousLeftTupleSinkNode(final LeftTupleSinkNode previous); @Override LeftTuple createLeftTuple(InternalFactHandle factHandle,
                                     boolean leftTupleMemoryEnabled); @Override LeftTuple createLeftTuple(final InternalFactHandle factHandle,
                                     final LeftTuple leftTuple,
                                     final Sink sink); @Override LeftTuple createLeftTuple(LeftTuple leftTuple,
                                     Sink sink,
                                     PropagationContext pctx, boolean leftTupleMemoryEnabled); @Override LeftTuple createLeftTuple(LeftTuple leftTuple,
                                     RightTuple rightTuple,
                                     Sink sink); @Override LeftTuple createLeftTuple(LeftTuple leftTuple,
                                     RightTuple rightTuple,
                                     LeftTuple currentLeftChild,
                                     LeftTuple currentRightChild,
                                     Sink sink,
                                     boolean leftTupleMemoryEnabled); @Override boolean equals(Object object); @Override QueryElementNodeMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm); @Override ObjectTypeNode getObjectTypeNode(); @Override LeftTuple createPeer(LeftTuple original); @Override String toString(); @Override void attach(BuildContext context );  }