buildContext );
this.entryPoint.attach();
}
public void testQueryTerminalNode() {
final ClassObjectType queryObjectType = new ClassObjectType( DroolsQuery.class );
final ObjectTypeNode queryObjectTypeNode = new ObjectTypeNode( this.buildContext.getNextId(),
this.entryPoint,
queryObjectType,
buildContext );
queryObjectTypeNode.attach();
ClassFieldReader extractor = store.getReader( DroolsQuery.class,
"name",
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();