Package org.drools.core
Class QueryResultsImpl
- java.lang.Object
-
- org.drools.core.QueryResultsImpl
-
- All Implemented Interfaces:
Iterable<org.kie.api.runtime.rule.QueryResultsRow>
,org.kie.api.runtime.rule.QueryResults
public class QueryResultsImpl extends 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected Declaration[]
parameters
protected List<QueryRowWithSubruleIndex>
results
protected WorkingMemory
workingMemory
-
Constructor Summary
Constructors Constructor Description QueryResultsImpl(List<QueryRowWithSubruleIndex> results, Map<String,Declaration>[] declarations, WorkingMemory workingMemory, Declaration[] parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryResultsRowImpl
get(int i)
Map<String,Declaration>[]
getDeclarations()
Map<String,Declaration>
getDeclarations(int subruleIndex)
String[]
getIdentifiers()
Declaration[]
getParameters()
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
-
-
-
-
Field Detail
-
results
protected List<QueryRowWithSubruleIndex> results
-
workingMemory
protected WorkingMemory workingMemory
-
parameters
protected Declaration[] parameters
-
-
Constructor Detail
-
QueryResultsImpl
public QueryResultsImpl(List<QueryRowWithSubruleIndex> results, Map<String,Declaration>[] declarations, WorkingMemory workingMemory, Declaration[] parameters)
-
-
Method Detail
-
getDeclarations
public Map<String,Declaration>[] getDeclarations()
-
getParameters
public Declaration[] getParameters()
-
getDeclarations
public Map<String,Declaration> getDeclarations(int subruleIndex)
-
get
public QueryResultsRowImpl get(int i)
-
size
public int size()
- Specified by:
size
in interfaceorg.kie.api.runtime.rule.QueryResults
-
getIdentifiers
public String[] getIdentifiers()
- Specified by:
getIdentifiers
in interfaceorg.kie.api.runtime.rule.QueryResults
-
-