public class ForwardingStructReader extends Object implements StructReader
Constructor and Description |
---|
ForwardingStructReader(StructReader delegate) |
ForwardingStructReader(com.google.common.base.Supplier<? extends StructReader> delegate) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkValidState()
Called before each forwarding call to allow sub classes to do additional state checking.
|
BigDecimal |
getBigDecimal(int columnIndex)
Returns the value of a non-
NULL column with type Type.numeric() . |
BigDecimal |
getBigDecimal(String columnName)
Returns the value of a non-
NULL column with type Type.numeric() . |
List<BigDecimal> |
getBigDecimalList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.numeric()) . |
List<BigDecimal> |
getBigDecimalList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.numeric()) . |
boolean |
getBoolean(int columnIndex)
Returns the value of a non-
NULL column with type Type.bool() . |
boolean |
getBoolean(String columnName)
Returns the value of a non-
NULL column with type Type.bool() . |
boolean[] |
getBooleanArray(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.bool()) . |
boolean[] |
getBooleanArray(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.bool()) . |
List<Boolean> |
getBooleanList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.bool()) . |
List<Boolean> |
getBooleanList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.bool()) . |
com.google.cloud.ByteArray |
getBytes(int columnIndex)
Returns the value of a non-
NULL column with type Type.bytes() . |
com.google.cloud.ByteArray |
getBytes(String columnName)
Returns the value of a non-
NULL column with type Type.bytes() . |
List<com.google.cloud.ByteArray> |
getBytesList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.bytes()) . |
List<com.google.cloud.ByteArray> |
getBytesList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.bytes()) . |
int |
getColumnCount()
Returns the number of columns in the underlying data.
|
int |
getColumnIndex(String columnName)
Returns the index of the column named
columnName . |
Type |
getColumnType(int columnIndex)
Returns the type of a column.
|
Type |
getColumnType(String columnName)
Returns the type of a column.
|
com.google.cloud.Date |
getDate(int columnIndex)
Returns the value of a non-
NULL column with type Type.date() . |
com.google.cloud.Date |
getDate(String columnName)
Returns the value of a non-
NULL column with type Type.date() . |
List<com.google.cloud.Date> |
getDateList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.date()) . |
List<com.google.cloud.Date> |
getDateList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.date()) . |
double |
getDouble(int columnIndex)
Returns the value of a non-
NULL column with type Type.float64() . |
double |
getDouble(String columnName)
Returns the value of a non-
NULL column with type Type.float64() . |
double[] |
getDoubleArray(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.float64()) . |
double[] |
getDoubleArray(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.float64()) . |
List<Double> |
getDoubleList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.float64()) . |
List<Double> |
getDoubleList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.float64()) . |
String |
getJson(int columnIndex)
Returns the value of a non-
NULL column with type Type.string() . |
String |
getJson(String columnName)
Returns the value of a non-
NULL column with type Type.string() . |
List<String> |
getJsonList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.string()) . |
List<String> |
getJsonList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.string()) . |
long |
getLong(int columnIndex)
Returns the value of a non-
NULL column with type Type.int64() . |
long |
getLong(String columnName)
Returns the value of a non-
NULL column with type Type.int64() . |
long[] |
getLongArray(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.int64()) . |
long[] |
getLongArray(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.int64()) . |
List<Long> |
getLongList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.int64()) . |
List<Long> |
getLongList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.int64()) . |
String |
getString(int columnIndex)
Returns the value of a non-
NULL column with type Type.string() . |
String |
getString(String columnName)
Returns the value of a non-
NULL column with type Type.string() . |
List<String> |
getStringList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.string()) . |
List<String> |
getStringList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.string()) . |
List<Struct> |
getStructList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.struct(...)) . |
List<Struct> |
getStructList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.struct(...)) . |
com.google.cloud.Timestamp |
getTimestamp(int columnIndex)
Returns the value of a non-
NULL column with type Type.timestamp() . |
com.google.cloud.Timestamp |
getTimestamp(String columnName)
Returns the value of a non-
NULL column with type Type.timestamp() . |
List<com.google.cloud.Timestamp> |
getTimestampList(int columnIndex)
Returns the value of a non-
NULL column with type Type.array(Type.timestamp()) . |
List<com.google.cloud.Timestamp> |
getTimestampList(String columnName)
Returns the value of a non-
NULL column with type Type.array(Type.timestamp()) . |
Type |
getType()
Returns the type of the underlying data.
|
Value |
getValue(int columnIndex)
Returns the value of a nullable column as a
Value . |
Value |
getValue(String columnName)
Returns the value of a nullable column as a
Value . |
boolean |
isNull(int columnIndex)
Returns
true if a column contains a NULL value. |
boolean |
isNull(String columnName)
Returns
true if a column contains a NULL value. |
public ForwardingStructReader(StructReader delegate)
public ForwardingStructReader(com.google.common.base.Supplier<? extends StructReader> delegate)
protected void checkValidState()
Exception
if the current state is not valid for reading data
from this ForwardingStructReader
. The default implementation does nothing.public Type getType()
StructReader
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.getType
in interface StructReader
public int getColumnCount()
StructReader
NULL
values.getColumnCount
in interface StructReader
public int getColumnIndex(String columnName)
StructReader
columnName
.getColumnIndex
in interface StructReader
public Type getColumnType(int columnIndex)
StructReader
getColumnType
in interface StructReader
public Type getColumnType(String columnName)
StructReader
getColumnType
in interface StructReader
public boolean isNull(int columnIndex)
StructReader
true
if a column contains a NULL
value.isNull
in interface StructReader
public boolean isNull(String columnName)
StructReader
true
if a column contains a NULL
value.isNull
in interface StructReader
public boolean getBoolean(int columnIndex)
StructReader
NULL
column with type Type.bool()
.getBoolean
in interface StructReader
public boolean getBoolean(String columnName)
StructReader
NULL
column with type Type.bool()
.getBoolean
in interface StructReader
public long getLong(int columnIndex)
StructReader
NULL
column with type Type.int64()
.getLong
in interface StructReader
public long getLong(String columnName)
StructReader
NULL
column with type Type.int64()
.getLong
in interface StructReader
public double getDouble(int columnIndex)
StructReader
NULL
column with type Type.float64()
.getDouble
in interface StructReader
public double getDouble(String columnName)
StructReader
NULL
column with type Type.float64()
.getDouble
in interface StructReader
public BigDecimal getBigDecimal(int columnIndex)
StructReader
NULL
column with type Type.numeric()
.getBigDecimal
in interface StructReader
public BigDecimal getBigDecimal(String columnName)
StructReader
NULL
column with type Type.numeric()
.getBigDecimal
in interface StructReader
public String getString(int columnIndex)
StructReader
NULL
column with type Type.string()
.getString
in interface StructReader
public String getString(String columnName)
StructReader
NULL
column with type Type.string()
.getString
in interface StructReader
public String getJson(int columnIndex)
StructReader
NULL
column with type Type.string()
.getJson
in interface StructReader
public String getJson(String columnName)
StructReader
NULL
column with type Type.string()
.getJson
in interface StructReader
public com.google.cloud.ByteArray getBytes(int columnIndex)
StructReader
NULL
column with type Type.bytes()
.getBytes
in interface StructReader
public com.google.cloud.ByteArray getBytes(String columnName)
StructReader
NULL
column with type Type.bytes()
.getBytes
in interface StructReader
public com.google.cloud.Timestamp getTimestamp(int columnIndex)
StructReader
NULL
column with type Type.timestamp()
.getTimestamp
in interface StructReader
public com.google.cloud.Timestamp getTimestamp(String columnName)
StructReader
NULL
column with type Type.timestamp()
.getTimestamp
in interface StructReader
public com.google.cloud.Date getDate(int columnIndex)
StructReader
NULL
column with type Type.date()
.getDate
in interface StructReader
public com.google.cloud.Date getDate(String columnName)
StructReader
NULL
column with type Type.date()
.getDate
in interface StructReader
public boolean[] getBooleanArray(int columnIndex)
StructReader
NULL
column with type Type.array(Type.bool())
.getBooleanArray
in interface StructReader
public boolean[] getBooleanArray(String columnName)
StructReader
NULL
column with type Type.array(Type.bool())
.getBooleanArray
in interface StructReader
public List<Boolean> getBooleanList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.bool())
.getBooleanList
in interface StructReader
public List<Boolean> getBooleanList(String columnName)
StructReader
NULL
column with type Type.array(Type.bool())
.getBooleanList
in interface StructReader
public long[] getLongArray(int columnIndex)
StructReader
NULL
column with type Type.array(Type.int64())
.getLongArray
in interface StructReader
public long[] getLongArray(String columnName)
StructReader
NULL
column with type Type.array(Type.int64())
.getLongArray
in interface StructReader
public List<Long> getLongList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.int64())
.getLongList
in interface StructReader
public List<Long> getLongList(String columnName)
StructReader
NULL
column with type Type.array(Type.int64())
.getLongList
in interface StructReader
public double[] getDoubleArray(int columnIndex)
StructReader
NULL
column with type Type.array(Type.float64())
.getDoubleArray
in interface StructReader
public double[] getDoubleArray(String columnName)
StructReader
NULL
column with type Type.array(Type.float64())
.getDoubleArray
in interface StructReader
public List<Double> getDoubleList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.float64())
.getDoubleList
in interface StructReader
public List<Double> getDoubleList(String columnName)
StructReader
NULL
column with type Type.array(Type.float64())
.getDoubleList
in interface StructReader
public List<BigDecimal> getBigDecimalList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.numeric())
.getBigDecimalList
in interface StructReader
public List<BigDecimal> getBigDecimalList(String columnName)
StructReader
NULL
column with type Type.array(Type.numeric())
.getBigDecimalList
in interface StructReader
public List<String> getStringList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.string())
.getStringList
in interface StructReader
public List<String> getStringList(String columnName)
StructReader
NULL
column with type Type.array(Type.string())
.getStringList
in interface StructReader
public List<String> getJsonList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.string())
.getJsonList
in interface StructReader
public List<String> getJsonList(String columnName)
StructReader
NULL
column with type Type.array(Type.string())
.getJsonList
in interface StructReader
public List<com.google.cloud.ByteArray> getBytesList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.bytes())
.getBytesList
in interface StructReader
public List<com.google.cloud.ByteArray> getBytesList(String columnName)
StructReader
NULL
column with type Type.array(Type.bytes())
.getBytesList
in interface StructReader
public List<com.google.cloud.Timestamp> getTimestampList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.timestamp())
.getTimestampList
in interface StructReader
public List<com.google.cloud.Timestamp> getTimestampList(String columnName)
StructReader
NULL
column with type Type.array(Type.timestamp())
.getTimestampList
in interface StructReader
public List<com.google.cloud.Date> getDateList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.date())
.getDateList
in interface StructReader
public List<com.google.cloud.Date> getDateList(String columnName)
StructReader
NULL
column with type Type.array(Type.date())
.getDateList
in interface StructReader
public List<Struct> getStructList(int columnIndex)
StructReader
NULL
column with type Type.array(Type.struct(...))
.getStructList
in interface StructReader
public List<Struct> getStructList(String columnName)
StructReader
NULL
column with type Type.array(Type.struct(...))
.getStructList
in interface StructReader
public Value getValue(int columnIndex)
StructReader
Value
.getValue
in interface StructReader
public Value getValue(String columnName)
StructReader
Value
.getValue
in interface StructReader
Copyright © 2022 Google LLC. All rights reserved.