Interface CacheReader

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface CacheReader
    extends java.lang.AutoCloseable
    Reads one or more than forward-only stream of result sets by executing OQ commands on cache source.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.math.BigDecimal getBigDecimal​(int index)
      Gets value of specified index as decimal.
      boolean getBoolean​(int index)
      Gets value of specified index as bool.
      java.util.Date getDate​(int index)
      Returns Date at specified column index
      double getDouble​(int index)
      Gets value of specified index as double.
      int getFieldCount()
      Gets number of columns.
      int getInt​(int index)
      Gets value of specified index as integer.
      boolean getIsClosed()
      True, if reader is closed else false.
      long getLong​(int index)
      Gets value of specified index as long.
      java.lang.String getName​(int index)
      Returns name of specified column index.
      int getOrdinal​(java.lang.String columnName)
      Returns index of specified column name.
      short getShort​(int index)
      Gets value of specified index as short.
      java.lang.String getString​(int index)
      Gets value of specified index as string.
      <T> T getValue​(int index, java.lang.Class<?> cls)
      Gets value at specified column index.
      <T> T getValue​(java.lang.String columnName, java.lang.Class<?> cls)
      Gets value of specified column name.
      int getValues​(java.lang.Object[] objects, java.lang.Class<?> cls)
      Populates array of objects with values in current row.
      boolean read()
      Advances ICacheReader to next record.
      • Methods inherited from interface java.lang.AutoCloseable

        close
    • Method Detail

      • getFieldCount

        int getFieldCount()
        Gets number of columns.
      • getIsClosed

        boolean getIsClosed()
        True, if reader is closed else false.
      • read

        boolean read()
              throws CacheException
        Advances ICacheReader to next record.
        Returns:
        true if there are more rows; else false.
        Throws:
        CacheException
      • getString

        java.lang.String getString​(int index)
                            throws OperationFailedException
        Gets value of specified index as string.
        Parameters:
        index - Index of column.
        Returns:
        string value on specified column.
        Throws:
        OperationFailedException
      • getBigDecimal

        java.math.BigDecimal getBigDecimal​(int index)
                                    throws OperationFailedException
        Gets value of specified index as decimal.
        Parameters:
        index - Index of column.
        Returns:
        decimal value on specified index.
        Throws:
        OperationFailedException
      • getValue

        <T> T getValue​(int index,
                       java.lang.Class<?> cls)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException,
                       OperationFailedException
        Gets value at specified column index.
        Type Parameters:
        T - get generic type value at specified column index.
        Parameters:
        index - Index of column.
        cls - Specifies the class of value obtained from the cache.
        Returns:
        Object value on specified index.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
        OperationFailedException
      • getValue

        <T> T getValue​(java.lang.String columnName,
                       java.lang.Class<?> cls)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException,
                       OperationFailedException
        Gets value of specified column name.
        Parameters:
        columnName - Name of column.
        cls - Specifies the class of value obtained from the cache.
        Returns:
        Object value of specified column.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
        OperationFailedException
      • getValues

        int getValues​(java.lang.Object[] objects,
                      java.lang.Class<?> cls)
               throws java.io.IOException,
                      java.lang.ClassNotFoundException,
                      OperationFailedException
        Populates array of objects with values in current row.
        Parameters:
        objects - array of objects to be populated.
        cls - Specifies the class of values obtained from the array.
        Returns:
        No of objects copied in specified array.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
        OperationFailedException
      • getName

        java.lang.String getName​(int index)
        Returns name of specified column index.
        Parameters:
        index - Index of column.
        Returns:
        Name of column.
      • getOrdinal

        int getOrdinal​(java.lang.String columnName)
        Returns index of specified column name.
        Parameters:
        columnName - Name of column.
        Returns:
        Index of column.