org.drools
Class QueryResults

java.lang.Object
  extended by org.drools.QueryResults
All Implemented Interfaces:
Iterable<QueryResult>

public class QueryResults
extends Object
implements Iterable<QueryResult>

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
QueryResults(List<QueryRowWithSubruleIndex> results, Map<String,Declaration>[] declarations, WorkingMemory workingMemory, Declaration[] parameters)
           
 
Method Summary
 QueryResult get(int i)
           
 Map<String,Declaration>[] getDeclarations()
           
 Map<String,Declaration> getDeclarations(int subruleIndex)
           
 Declaration[] getParameters()
           
 Iterator<QueryResult> iterator()
          Returns an Iterator for the results.
 int size()
          The results 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

QueryResults

public QueryResults(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 QueryResult get(int i)

iterator

public Iterator<QueryResult> iterator()
Returns an Iterator for the results.

Specified by:
iterator in interface Iterable<QueryResult>
Returns:

size

public int size()
The results size

Returns:


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