public class ForwardingStructReader implements StructReader
Forwarding implements of StructReader
Constructors
ForwardingStructReader(StructReader delegate)
public ForwardingStructReader(StructReader delegate)
Parameter
ForwardingStructReader(Supplier<? extends StructReader> delegate)
public ForwardingStructReader(Supplier<? extends StructReader> delegate)
Parameter
Name | Description |
delegate | com.google.common.base.Supplier<? extends com.google.cloud.spanner.StructReader>
|
Methods
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.
getBigDecimal(int columnIndex)
public BigDecimal getBigDecimal(int columnIndex)
Parameter
Name | Description |
columnIndex | int
|
Returns
getBigDecimal(String columnName)
public BigDecimal getBigDecimal(String columnName)
Parameter
Name | Description |
columnName | String
|
Returns
getBigDecimalList(int columnIndex)
public List<BigDecimal> getBigDecimalList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.numeric())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getBigDecimalList(String columnName)
public List<BigDecimal> getBigDecimalList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.numeric())
.
Parameter
Name | Description |
columnName | String
|
Returns
getBoolean(int columnIndex)
public boolean getBoolean(int columnIndex)
Returns the value of a non-NULL
column with type Type#bool().
Parameter
Name | Description |
columnIndex | int
|
Returns
getBoolean(String columnName)
public boolean getBoolean(String columnName)
Returns the value of a non-NULL
column with type Type#bool().
Parameter
Name | Description |
columnName | String
|
Returns
getBooleanArray(int columnIndex)
public boolean[] getBooleanArray(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.bool())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getBooleanArray(String columnName)
public boolean[] getBooleanArray(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.bool())
.
Parameter
Name | Description |
columnName | String
|
Returns
getBooleanList(int columnIndex)
public List<Boolean> getBooleanList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.bool())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getBooleanList(String columnName)
public List<Boolean> getBooleanList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.bool())
.
Parameter
Name | Description |
columnName | String
|
Returns
getBytes(int columnIndex)
public ByteArray getBytes(int columnIndex)
Returns the value of a non-NULL
column with type Type#bytes().
Parameter
Name | Description |
columnIndex | int
|
Returns
Type | Description |
com.google.cloud.ByteArray | |
getBytes(String columnName)
public ByteArray getBytes(String columnName)
Returns the value of a non-NULL
column with type Type#bytes().
Parameter
Name | Description |
columnName | String
|
Returns
Type | Description |
com.google.cloud.ByteArray | |
getBytesList(int columnIndex)
public List<ByteArray> getBytesList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.bytes())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
Type | Description |
List<com.google.cloud.ByteArray> | |
getBytesList(String columnName)
public List<ByteArray> getBytesList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.bytes())
.
Parameter
Name | Description |
columnName | String
|
Returns
Type | Description |
List<com.google.cloud.ByteArray> | |
getColumnCount()
public int getColumnCount()
Returns the number of columns in the underlying data. This includes any columns with
NULL
values.
Returns
getColumnIndex(String columnName)
public int getColumnIndex(String columnName)
Returns the index of the column named columnName
.
Parameter
Name | Description |
columnName | String
|
Returns
getColumnType(int columnIndex)
public Type getColumnType(int columnIndex)
Returns the type of a column.
Parameter
Name | Description |
columnIndex | int
|
Returns
getColumnType(String columnName)
public Type getColumnType(String columnName)
Returns the type of a column.
Parameter
Name | Description |
columnName | String
|
Returns
getDate(int columnIndex)
public Date getDate(int columnIndex)
Returns the value of a non-NULL
column with type Type#date().
Parameter
Name | Description |
columnIndex | int
|
Returns
Type | Description |
com.google.cloud.Date | |
getDate(String columnName)
public Date getDate(String columnName)
Returns the value of a non-NULL
column with type Type#date().
Parameter
Name | Description |
columnName | String
|
Returns
Type | Description |
com.google.cloud.Date | |
getDateList(int columnIndex)
public List<Date> getDateList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.date())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
Type | Description |
List<com.google.cloud.Date> | |
getDateList(String columnName)
public List<Date> getDateList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.date())
.
Parameter
Name | Description |
columnName | String
|
Returns
Type | Description |
List<com.google.cloud.Date> | |
getDouble(int columnIndex)
public double getDouble(int columnIndex)
Parameter
Name | Description |
columnIndex | int
|
Returns
getDouble(String columnName)
public double getDouble(String columnName)
Parameter
Name | Description |
columnName | String
|
Returns
getDoubleArray(int columnIndex)
public double[] getDoubleArray(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.float64())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getDoubleArray(String columnName)
public double[] getDoubleArray(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.float64())
.
Parameter
Name | Description |
columnName | String
|
Returns
getDoubleList(int columnIndex)
public List<Double> getDoubleList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.float64())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getDoubleList(String columnName)
public List<Double> getDoubleList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.float64())
.
Parameter
Name | Description |
columnName | String
|
Returns
getJson(int columnIndex)
public String getJson(int columnIndex)
Parameter
Name | Description |
columnIndex | int
|
Returns
getJson(String columnName)
public String getJson(String columnName)
Parameter
Name | Description |
columnName | String
|
Returns
getJsonList(int columnIndex)
public List<String> getJsonList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.string())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getJsonList(String columnName)
public List<String> getJsonList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.string())
.
Parameter
Name | Description |
columnName | String
|
Returns
getLong(int columnIndex)
public long getLong(int columnIndex)
Returns the value of a non-NULL
column with type Type#int64().
Parameter
Name | Description |
columnIndex | int
|
Returns
getLong(String columnName)
public long getLong(String columnName)
Returns the value of a non-NULL
column with type Type#int64().
Parameter
Name | Description |
columnName | String
|
Returns
getLongArray(int columnIndex)
public long[] getLongArray(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.int64())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getLongArray(String columnName)
public long[] getLongArray(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.int64())
.
Parameter
Name | Description |
columnName | String
|
Returns
getLongList(int columnIndex)
public List<Long> getLongList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.int64())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getLongList(String columnName)
public List<Long> getLongList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.int64())
.
Parameter
Name | Description |
columnName | String
|
Returns
getString(int columnIndex)
public String getString(int columnIndex)
Parameter
Name | Description |
columnIndex | int
|
Returns
getString(String columnName)
public String getString(String columnName)
Parameter
Name | Description |
columnName | String
|
Returns
getStringList(int columnIndex)
public List<String> getStringList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.string())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getStringList(String columnName)
public List<String> getStringList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.string())
.
Parameter
Name | Description |
columnName | String
|
Returns
getStructList(int columnIndex)
public List<Struct> getStructList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.struct(...))
.
Parameter
Name | Description |
columnIndex | int
|
Returns
getStructList(String columnName)
public List<Struct> getStructList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.struct(...))
.
Parameter
Name | Description |
columnName | String
|
Returns
getTimestamp(int columnIndex)
public Timestamp getTimestamp(int columnIndex)
Parameter
Name | Description |
columnIndex | int
|
Returns
Type | Description |
com.google.cloud.Timestamp | |
getTimestamp(String columnName)
public Timestamp getTimestamp(String columnName)
Parameter
Name | Description |
columnName | String
|
Returns
Type | Description |
com.google.cloud.Timestamp | |
getTimestampList(int columnIndex)
public List<Timestamp> getTimestampList(int columnIndex)
Returns the value of a non-NULL
column with type Type.array(Type.timestamp())
.
Parameter
Name | Description |
columnIndex | int
|
Returns
Type | Description |
List<com.google.cloud.Timestamp> | |
getTimestampList(String columnName)
public List<Timestamp> getTimestampList(String columnName)
Returns the value of a non-NULL
column with type Type.array(Type.timestamp())
.
Parameter
Name | Description |
columnName | String
|
Returns
Type | Description |
List<com.google.cloud.Timestamp> | |
getType()
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.
Returns
getValue(int columnIndex)
public Value getValue(int columnIndex)
Returns the value of a nullable column as a Value.
Parameter
Name | Description |
columnIndex | int
|
Returns
getValue(String columnName)
public Value getValue(String columnName)
Returns the value of a nullable column as a Value.
Parameter
Name | Description |
columnName | String
|
Returns
isNull(int columnIndex)
public boolean isNull(int columnIndex)
Returns true
if a column contains a NULL
value.
Parameter
Name | Description |
columnIndex | int
|
Returns
isNull(String columnName)
public boolean isNull(String columnName)
Returns true
if a column contains a NULL
value.
Parameter
Name | Description |
columnName | String
|
Returns