Class MemoryResultSet

    • Field Detail

      • peekRow

        protected Object[] peekRow
      • rowIndex

        protected int rowIndex
    • Constructor Detail

      • MemoryResultSet

        public MemoryResultSet()
    • Method Detail

      • setRows

        public void setRows​(List rows)
      • getRows

        public List getRows()
      • addRow

        public int addRow​(Object[] row)
      • peek

        public Object[] peek()
        Description copied from interface: IPeekable
        Peeks into a result set object to get a preview of the next row of data. This is an optional interface that IPentahoResultSet objects can implement
        Specified by:
        peek in interface IPeekable
        Returns:
      • next

        public Object[] next()
        Specified by:
        next in interface IPentahoResultSet
        Returns:
        an object array that represents the data in each column of the next row.
      • dispose

        public void dispose()
        Description copied from interface: IDisposable
        Disposes of this object's resources
        Specified by:
        dispose in interface IDisposable
      • createFromLists

        public static MemoryResultSet createFromLists​(List colHeaders,
                                                      List data)
        Parameters:
        colHeaders - List of Objects, where each object represents a column header in the metadata of the result set. Most likely will be a List of String.
        data - List of (List of Objects). Each List of Objects will become a row of the ResultSet.
        Returns:
        MemoryResultSet
      • createList

        public static MemoryResultSet createList​(String name,
                                                 List items)
        Parameters:
        name -
        items - List of Object[] (list of array of objects). Each item in the list will become an row of the ResultSet
        Returns:
        MemoryResultSet
      • createFromActionSequenceInputsNode

        public static MemoryResultSet createFromActionSequenceInputsNode​(org.dom4j.Node rootNode)
      • getNodeText

        public static String getNodeText​(String xpath,
                                         org.dom4j.Node rootNode)
      • getNodeText

        public static String getNodeText​(String xpath,
                                         org.dom4j.Node rootNode,
                                         String defaultValue)
      • isScrollable

        public boolean isScrollable()
        Description copied from interface: IPentahoResultSet
        Indicates whether the result set is scrollable
        Specified by:
        isScrollable in interface IPentahoResultSet
        Returns:
        true if the resultset can be scrolled through.
      • getValueAt

        public Object getValueAt​(int row,
                                 int column)
        Returns the value of the specified row and the specified column from within the resultset.
        Specified by:
        getValueAt in interface IPentahoResultSet
        Parameters:
        row - the row index.
        column - the column index.
        Returns:
        the value.
      • memoryCopy

        public IPentahoResultSet memoryCopy()
        Attention: It does not clone data! It is create the shallow copy of metadata! It is create the shallow copy of data. You must avoid to use this method.
        Specified by:
        memoryCopy in interface IPentahoResultSet
        Returns:
        new instance the MemoryResultSet with same metadata
      • getDataColumn

        public Object[] getDataColumn​(int column)
        Description copied from interface: IPentahoResultSet
        Get a column of data.
        Specified by:
        getDataColumn in interface IPentahoResultSet
        Parameters:
        column - the zero based column number
        Returns:
        array represeting a column of data. 0th element is the first column
      • getDataRow

        public Object[] getDataRow​(int row)
        Description copied from interface: IPentahoResultSet
        Get a specified row of data
        Specified by:
        getDataRow in interface IPentahoResultSet
        Parameters:
        row - the zero base row number
        Returns:
        array representing a row of data. 0th element is the top row