Drools :: Core 6.1.0.Final

org.drools.core
Class QueryResultsImpl

java.lang.Object
  extended by 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
protected  Declaration[] parameters
           
protected  List<QueryRowWithSubruleIndex> results
           
protected  WorkingMemory workingMemory
           
 
Constructor Summary
QueryResultsImpl(List<QueryRowWithSubruleIndex> results, Map<String,Declaration>[] declarations, WorkingMemory workingMemory, Declaration[] parameters)
           
 
Method Summary
 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
 

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 interface org.kie.api.runtime.rule.QueryResults

getIdentifiers

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

iterator

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

Drools :: Core 6.1.0.Final

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.