Class MergedResultSet
- java.lang.Object
-
- org.apache.manifoldcf.core.database.MergedResultSet
-
- All Implemented Interfaces:
IResultSet
public class MergedResultSet extends java.lang.Object implements IResultSet
This class merges several resultsets together to make what appears to be a single one. This is very useful when queries are broken up due to restrictions in the length of an IN clause, but the results may need to be merged at the end.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected java.util.ArrayListresultSetsprotected inttotalRowCount
-
Constructor Summary
Constructors Constructor Description MergedResultSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResultSet(IResultSet set)IResultRowgetRow(int rowNumber)Get a specific row in the resultset.intgetRowCount()Get the number of rows in this resultset.IResultRow[]getRows()Get an array of all the rows.
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
resultSets
protected java.util.ArrayList resultSets
-
totalRowCount
protected int totalRowCount
-
-
Method Detail
-
addResultSet
public void addResultSet(IResultSet set)
-
getRow
public IResultRow getRow(int rowNumber)
Get a specific row in the resultset.- Specified by:
getRowin interfaceIResultSet- Parameters:
rowNumber- is the number of the row.- Returns:
- the immutable row description, or null if there is no such row.
-
getRowCount
public int getRowCount()
Get the number of rows in this resultset.- Specified by:
getRowCountin interfaceIResultSet- Returns:
- the number of rows the resultset contains.
-
getRows
public IResultRow[] getRows()
Get an array of all the rows. This method is NOT preferred because it requires a new array object to be constructed.- Specified by:
getRowsin interfaceIResultSet- Returns:
- the array.
-
-