Class AbstractStructReader (6.71.0)

public abstract class AbstractStructReader implements StructReader

Base class for assisting StructReader implementations.

This class implements the majority of the StructReader interface, leaving subclasses to implement core data access via the getTypeNameInternal() methods. AbstractStructReader guarantees that these will only be called for non-NULL columns of a type appropriate for the method.

Inheritance

Object > AbstractStructReader

Implements

StructReader

Constructors

AbstractStructReader()

public AbstractStructReader()

Methods

<T>getProtoEnum(int columnIndex, Function<Integer,ProtocolMessageEnum> method)

public T <T>getProtoEnum(int columnIndex, Function<Integer,ProtocolMessageEnum> method)

To get the proto enum of type T from Struct.

Parameters
Name Description
columnIndex int
method Function<Integer,ProtocolMessageEnum>
Returns
Type Description
T

<T>getProtoEnum(String columnName, Function<Integer,ProtocolMessageEnum> method)

public T <T>getProtoEnum(String columnName, Function<Integer,ProtocolMessageEnum> method)

To get the proto enum of type T from Struct.

Parameters
Name Description
columnName String
method Function<Integer,ProtocolMessageEnum>
Returns
Type Description
T

<T>getProtoEnumInternal(int columnIndex, Function<Integer,ProtocolMessageEnum> method)

protected T <T>getProtoEnumInternal(int columnIndex, Function<Integer,ProtocolMessageEnum> method)
Parameters
Name Description
columnIndex int
method Function<Integer,ProtocolMessageEnum>
Returns
Type Description
T

<T>getProtoEnumList(int columnIndex, Function<Integer,ProtocolMessageEnum> method)

public List<T> <T>getProtoEnumList(int columnIndex, Function<Integer,ProtocolMessageEnum> method)

To get the proto enum of type T from Struct.

Parameters
Name Description
columnIndex int
method Function<Integer,ProtocolMessageEnum>
Returns
Type Description
List<T>

<T>getProtoEnumList(String columnName, Function<Integer,ProtocolMessageEnum> method)

public List<T> <T>getProtoEnumList(String columnName, Function<Integer,ProtocolMessageEnum> method)

To get the proto enum list of type T from Struct.

Parameters
Name Description
columnName String
method Function<Integer,ProtocolMessageEnum>
Returns
Type Description
List<T>

<T>getProtoEnumListInternal(int columnIndex, Function<Integer,ProtocolMessageEnum> method)

protected List<T> <T>getProtoEnumListInternal(int columnIndex, Function<Integer,ProtocolMessageEnum> method)
Parameters
Name Description
columnIndex int
method Function<Integer,ProtocolMessageEnum>
Returns
Type Description
List<T>

<T>getProtoMessage(int columnIndex, T message)

public T <T>getProtoMessage(int columnIndex, T message)

To get the proto message of generic type T from Struct.

Parameters
Name Description
columnIndex int
message T
Returns
Type Description
T

<T>getProtoMessage(String columnName, T message)

public T <T>getProtoMessage(String columnName, T message)

To get the proto message of type T from Struct.

Parameters
Name Description
columnName String
message T
Returns
Type Description
T

<T>getProtoMessageInternal(int columnIndex, T message)

protected T <T>getProtoMessageInternal(int columnIndex, T message)
Parameters
Name Description
columnIndex int
message T
Returns
Type Description
T

<T>getProtoMessageList(int columnIndex, T message)

public List<T> <T>getProtoMessageList(int columnIndex, T message)

To get the proto message of generic type T from Struct.

Parameters
Name Description
columnIndex int
message T
Returns
Type Description
List<T>

<T>getProtoMessageList(String columnName, T message)

public List<T> <T>getProtoMessageList(String columnName, T message)

To get the proto message of type T from Struct.

Parameters
Name Description
columnName String
message T
Returns
Type Description
List<T>

<T>getProtoMessageListInternal(int columnIndex, T message)

protected List<T> <T>getProtoMessageListInternal(int columnIndex, T message)
Parameters
Name Description
columnIndex int
message T
Returns
Type Description
List<T>

checkNonNull(int columnIndex, Object columnNameForError)

protected void checkNonNull(int columnIndex, Object columnNameForError)
Parameters
Name Description
columnIndex int
columnNameForError Object

getBigDecimal(int columnIndex)

public BigDecimal getBigDecimal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
BigDecimal

getBigDecimal(String columnName)

public BigDecimal getBigDecimal(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
BigDecimal

getBigDecimalInternal(int columnIndex)

protected abstract BigDecimal getBigDecimalInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
BigDecimal

getBigDecimalList(int columnIndex)

public List<BigDecimal> getBigDecimalList(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<BigDecimal>

getBigDecimalList(String columnName)

public List<BigDecimal> getBigDecimalList(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
List<BigDecimal>

getBigDecimalListInternal(int columnIndex)

protected abstract List<BigDecimal> getBigDecimalListInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<BigDecimal>

getBoolean(int columnIndex)

public boolean getBoolean(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
boolean

getBoolean(String columnName)

public boolean getBoolean(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
boolean

getBooleanArray(int columnIndex)

public boolean[] getBooleanArray(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
boolean[]

getBooleanArray(String columnName)

public boolean[] getBooleanArray(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
boolean[]

getBooleanArrayInternal(int columnIndex)

protected abstract boolean[] getBooleanArrayInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
boolean[]

getBooleanInternal(int columnIndex)

protected abstract boolean getBooleanInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
boolean

getBooleanList(int columnIndex)

public List<Boolean> getBooleanList(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<Boolean>

getBooleanList(String columnName)

public List<Boolean> getBooleanList(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
List<Boolean>

getBooleanListInternal(int columnIndex)

protected abstract List<Boolean> getBooleanListInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<Boolean>

getBytes(int columnIndex)

public ByteArray getBytes(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
com.google.cloud.ByteArray

getBytes(String columnName)

public ByteArray getBytes(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
com.google.cloud.ByteArray

getBytesInternal(int columnIndex)

protected abstract ByteArray getBytesInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
com.google.cloud.ByteArray

getBytesList(int columnIndex)

public List<ByteArray> getBytesList(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<com.google.cloud.ByteArray>

getBytesList(String columnName)

public List<ByteArray> getBytesList(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
List<com.google.cloud.ByteArray>

getBytesListInternal(int columnIndex)

protected abstract List<ByteArray> getBytesListInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<com.google.cloud.ByteArray>

getColumnCount()

public int getColumnCount()
Returns
Type Description
int

getColumnIndex(String columnName)

public int getColumnIndex(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
int

getColumnType(int columnIndex)

public Type getColumnType(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
Type

getColumnType(String columnName)

public Type getColumnType(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
Type

getDate(int columnIndex)

public Date getDate(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
com.google.cloud.Date

getDate(String columnName)

public Date getDate(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
com.google.cloud.Date

getDateInternal(int columnIndex)

protected abstract Date getDateInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
com.google.cloud.Date

getDateList(int columnIndex)

public List<Date> getDateList(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<com.google.cloud.Date>

getDateList(String columnName)

public List<Date> getDateList(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
List<com.google.cloud.Date>

getDateListInternal(int columnIndex)

protected abstract List<Date> getDateListInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<com.google.cloud.Date>

getDouble(int columnIndex)

public double getDouble(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
double

getDouble(String columnName)

public double getDouble(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
double

getDoubleArray(int columnIndex)

public double[] getDoubleArray(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
double[]

getDoubleArray(String columnName)

public double[] getDoubleArray(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
double[]

getDoubleArrayInternal(int columnIndex)

protected abstract double[] getDoubleArrayInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
double[]

getDoubleInternal(int columnIndex)

protected abstract double getDoubleInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
double

getDoubleList(int columnIndex)

public List<Double> getDoubleList(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<Double>

getDoubleList(String columnName)

public List<Double> getDoubleList(String columnName)
Parameter
Name Description
columnName String
Returns
Type Description
List<Double>

getDoubleListInternal(int columnIndex)

protected abstract List<Double> getDoubleListInternal(int columnIndex)
Parameter
Name Description
columnIndex int
Returns
Type Description
List<Double>

getFloat(int columnIndex)

public float getFloat(int columnIndex)
Parameter
Name Description
columnIndex in