Class MemoryData

  • All Implemented Interfaces:
    Data
    Direct Known Subclasses:
    RewindableData

    public class MemoryData
    extends Object
    implements Data
    An implementation of Data that stores the complete result in memory
    • Field Detail

      • currentRow

        protected int currentRow
    • Constructor Detail

      • MemoryData

        public MemoryData()
    • Method Detail

      • next

        public boolean next()
                     throws SQLException
        goto the next (or first) row
        Specified by:
        next in interface Data
        Returns:
        true if row exits, false if not
        Throws:
        SQLException
      • get

        public Object get​(int index)
        get the data at a certain column
        Specified by:
        get in interface Data
        Parameters:
        index - the column to get
      • getRow

        public Object[] getRow​(int index)
      • addRow

        public void addRow​(Object[] row)
        Add a row of data
      • sort

        public void sort​(int[] sortBy,
                         boolean[] ascending)
                  throws SQLException
        sort the data set by the given columns each column is sorted seperate
        Throws:
        SQLException
      • dump

        public void dump()