Search in sources :

Example 6 with QueryImpl

use of org.drools.core.rule.QueryImpl in project drools by kiegroup.

the class KiePackagesBuilder method compileQuery.

private QueryImpl compileQuery(KnowledgePackageImpl pkg, Query query) {
    QueryImpl queryImpl = new QueryImpl(query.getName());
    queryImpl.setPackage(query.getPackage());
    RuleContext ctx = new RuleContext(this, pkg, queryImpl);
    addQueryPattern(query, queryImpl, ctx);
    populateLHS(ctx, pkg, query.getView());
    return queryImpl;
}
Also used : QueryImpl(org.drools.core.rule.QueryImpl)

Aggregations

QueryImpl (org.drools.core.rule.QueryImpl)6 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 List (java.util.List)1 TimeUnit (java.util.concurrent.TimeUnit)1 Assertions (org.assertj.core.api.Assertions)1 DescrBuildError (org.drools.compiler.compiler.DescrBuildError)1 PackageRegistry (org.drools.compiler.compiler.PackageRegistry)1 AnnotationDescr (org.drools.compiler.lang.descr.AnnotationDescr)1 ClockType (org.drools.core.ClockType)1 ClassObjectType (org.drools.core.base.ClassObjectType)1 ArrayElementReader (org.drools.core.base.extractors.ArrayElementReader)1 Abductive (org.drools.core.beliefsystem.abductive.Abductive)1 RuleImpl (org.drools.core.definitions.rule.impl.RuleImpl)1 AbductiveQuery (org.drools.core.rule.AbductiveQuery)1 Declaration (org.drools.core.rule.Declaration)1 Pattern (org.drools.core.rule.Pattern)1 PredicateConstraint (org.drools.core.rule.PredicateConstraint)1 RuleConditionElement (org.drools.core.rule.RuleConditionElement)1 EvaluatorConstraint (org.drools.core.rule.constraint.EvaluatorConstraint)1