Class 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 Detail

      • resultSets

        protected java.util.ArrayList resultSets
      • totalRowCount

        protected int totalRowCount
    • Constructor Detail

      • MergedResultSet

        public MergedResultSet()
    • Method Detail

      • addResultSet

        public void addResultSet​(IResultSet set)
      • getRow

        public IResultRow getRow​(int rowNumber)
        Get a specific row in the resultset.
        Specified by:
        getRow in interface IResultSet
        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:
        getRowCount in interface IResultSet
        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:
        getRows in interface IResultSet
        Returns:
        the array.