Class ForwardingStructReader

    • Constructor Detail

      • ForwardingStructReader

        public ForwardingStructReader​(StructReader delegate)
      • ForwardingStructReader

        public ForwardingStructReader​(com.google.common.base.Supplier<? extends StructReader> delegate)
    • Method Detail

      • checkValidState

        protected void checkValidState()
        Called before each forwarding call to allow sub classes to do additional state checking. Sub classes should throw an Exception if the current state is not valid for reading data from this ForwardingStructReader. The default implementation does nothing.
      • getType

        public Type getType()
        Description copied from interface: StructReader
        Returns the type of the underlying data. This will always be a STRUCT type, with fields corresponding to the data's columns. For the result of a read or query, this will always match the columns passed to the read() call or named in the query text, in order.
        Specified by:
        getType in interface StructReader
      • getColumnCount

        public int getColumnCount()
        Description copied from interface: StructReader
        Returns the number of columns in the underlying data. This includes any columns with NULL values.
        Specified by:
        getColumnCount in interface StructReader
      • getColumnIndex

        public int getColumnIndex​(String columnName)
        Description copied from interface: StructReader
        Returns the index of the column named columnName.
        Specified by:
        getColumnIndex in interface StructReader
      • isNull

        public boolean isNull​(int columnIndex)
        Description copied from interface: StructReader
        Returns true if a column contains a NULL value.
        Specified by:
        isNull in interface StructReader
      • isNull

        public boolean isNull​(String columnName)
        Description copied from interface: StructReader
        Returns true if a column contains a NULL value.
        Specified by:
        isNull in interface StructReader
      • getBoolean

        public boolean getBoolean​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.bool().
        Specified by:
        getBoolean in interface StructReader
      • getBytes

        public com.google.cloud.ByteArray getBytes​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.bytes().
        Specified by:
        getBytes in interface StructReader
      • getDate

        public com.google.cloud.Date getDate​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.date().
        Specified by:
        getDate in interface StructReader
      • getBooleanArray

        public boolean[] getBooleanArray​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.bool()).
        Specified by:
        getBooleanArray in interface StructReader
      • getBooleanArray

        public boolean[] getBooleanArray​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.bool()).
        Specified by:
        getBooleanArray in interface StructReader
      • getBooleanList

        public List<Boolean> getBooleanList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.bool()).
        Specified by:
        getBooleanList in interface StructReader
      • getLongArray

        public long[] getLongArray​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.int64()).
        Specified by:
        getLongArray in interface StructReader
      • getLongArray

        public long[] getLongArray​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.int64()).
        Specified by:
        getLongArray in interface StructReader
      • getLongList

        public List<Long> getLongList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.int64()).
        Specified by:
        getLongList in interface StructReader
      • getLongList

        public List<Long> getLongList​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.int64()).
        Specified by:
        getLongList in interface StructReader
      • getDoubleArray

        public double[] getDoubleArray​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.float64()).
        Specified by:
        getDoubleArray in interface StructReader
      • getDoubleArray

        public double[] getDoubleArray​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.float64()).
        Specified by:
        getDoubleArray in interface StructReader
      • getDoubleList

        public List<Double> getDoubleList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.float64()).
        Specified by:
        getDoubleList in interface StructReader
      • getStringList

        public List<String> getStringList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.string()).
        Specified by:
        getStringList in interface StructReader
      • getJsonList

        public List<String> getJsonList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.string()).
        Specified by:
        getJsonList in interface StructReader
      • getBytesList

        public List<com.google.cloud.ByteArray> getBytesList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.bytes()).
        Specified by:
        getBytesList in interface StructReader
      • getBytesList

        public List<com.google.cloud.ByteArray> getBytesList​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.bytes()).
        Specified by:
        getBytesList in interface StructReader
      • getTimestampList

        public List<com.google.cloud.Timestamp> getTimestampList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.timestamp()).
        Specified by:
        getTimestampList in interface StructReader
      • getTimestampList

        public List<com.google.cloud.Timestamp> getTimestampList​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.timestamp()).
        Specified by:
        getTimestampList in interface StructReader
      • getDateList

        public List<com.google.cloud.Date> getDateList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.date()).
        Specified by:
        getDateList in interface StructReader
      • getDateList

        public List<com.google.cloud.Date> getDateList​(String columnName)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.date()).
        Specified by:
        getDateList in interface StructReader
      • getStructList

        public List<Struct> getStructList​(int columnIndex)
        Description copied from interface: StructReader
        Returns the value of a non-NULL column with type Type.array(Type.struct(...)).
        Specified by:
        getStructList in interface StructReader