ca.uhn.cache
Interface IQueryResult

All Known Implementing Classes:
QueryResult

public interface IQueryResult

Represents a set of IDataItem s that correspond to a query.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:08 $ by $Author: btripp $
Author:
Bryan Tripp

Method Summary
 void add(IDataItem theItem)
          Adds a new item to the data set.
 IQueryResult append(IQueryResult theQueryResult)
          Appends the specified query result to the end of this query result.
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 int size()
          Returns the number of elements in this query result.
 

Method Detail

add

public void add(IDataItem theItem)
Adds a new item to the data set.

Parameters:
theItem - the IDataItem to add

iterator

public java.util.Iterator iterator()
Returns:
an Iterator over all the IDataItem s in this data set

append

public IQueryResult append(IQueryResult theQueryResult)
Appends the specified query result to the end of this query result.

If the argument query result is empty, the this query result is returned. Otherwise a new IQueryResult is created, containing the query result items of this query result and the ones of the argument one.

Parameters:
theQueryResult - The query result to be appended.
Returns:
A query result that contains the query result items of this query result and the ones of the argument query result.

isEmpty

public boolean isEmpty()
Returns:
true if this query result contains no data items

size

public int size()
Returns the number of elements in this query result. If this query result contains more than Integer.MAX_VALUE data items, returns Integer.MAX_VALUE.

Returns:
the number of elements in this query result.


Copyright © 2004-2005 University Health Network. All Rights Reserved.