Class QueryResultsImpl

  • All Implemented Interfaces:
    java.lang.Iterable<org.kie.api.runtime.rule.QueryResultsRow>, org.kie.api.runtime.rule.QueryResults

    public class QueryResultsImpl
    extends java.lang.Object
    implements org.kie.api.runtime.rule.QueryResults
    Returned QueryResults instance for a requested named query. from here you can iterate the returned data, or get a specific row. All the available Declarations used in the query can also be accessed.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryResultsImpl​(java.util.List<QueryRowWithSubruleIndex> results, java.util.Map<java.lang.String,​org.drools.base.rule.Declaration>[] declarations, ReteEvaluator reteEvaluator, org.drools.base.rule.Declaration[] parameters)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      QueryResultsRowImpl get​(int i)  
      java.util.Map<java.lang.String,​org.drools.base.rule.Declaration>[] getDeclarations()  
      java.util.Map<java.lang.String,​org.drools.base.rule.Declaration> getDeclarations​(int subruleIndex)  
      java.lang.String[] getIdentifiers()  
      org.drools.base.rule.Declaration[] getParameters()  
      java.util.Iterator<org.kie.api.runtime.rule.QueryResultsRow> iterator()  
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface org.kie.api.runtime.rule.QueryResults

        toList, toList
    • Constructor Detail

      • QueryResultsImpl

        public QueryResultsImpl​(java.util.List<QueryRowWithSubruleIndex> results,
                                java.util.Map<java.lang.String,​org.drools.base.rule.Declaration>[] declarations,
                                ReteEvaluator reteEvaluator,
                                org.drools.base.rule.Declaration[] parameters)
    • Method Detail

      • getDeclarations

        public java.util.Map<java.lang.String,​org.drools.base.rule.Declaration>[] getDeclarations()
      • getParameters

        public org.drools.base.rule.Declaration[] getParameters()
      • getDeclarations

        public java.util.Map<java.lang.String,​org.drools.base.rule.Declaration> getDeclarations​(int subruleIndex)
      • size

        public int size()
        Specified by:
        size in interface org.kie.api.runtime.rule.QueryResults
      • getIdentifiers

        public java.lang.String[] getIdentifiers()
        Specified by:
        getIdentifiers in interface org.kie.api.runtime.rule.QueryResults
      • iterator

        public java.util.Iterator<org.kie.api.runtime.rule.QueryResultsRow> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<org.kie.api.runtime.rule.QueryResultsRow>
        Specified by:
        iterator in interface org.kie.api.runtime.rule.QueryResults