Package com.google.cloud.spanner
Class AbstractStructReader
java.lang.Object
com.google.cloud.spanner.AbstractStructReader
- All Implemented Interfaces:
StructReader
- Direct Known Subclasses:
Struct
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckNonNull(int columnIndex, Object columnNameForError) getBigDecimal(int columnIndex) getBigDecimal(String columnName) protected abstract BigDecimalgetBigDecimalInternal(int columnIndex) getBigDecimalList(int columnIndex) getBigDecimalList(String columnName) protected abstract List<BigDecimal>getBigDecimalListInternal(int columnIndex) booleangetBoolean(int columnIndex) booleangetBoolean(String columnName) boolean[]getBooleanArray(int columnIndex) boolean[]getBooleanArray(String columnName) protected abstract boolean[]getBooleanArrayInternal(int columnIndex) protected abstract booleangetBooleanInternal(int columnIndex) getBooleanList(int columnIndex) getBooleanList(String columnName) getBooleanListInternal(int columnIndex) com.google.cloud.ByteArraygetBytes(int columnIndex) com.google.cloud.ByteArrayprotected abstract com.google.cloud.ByteArraygetBytesInternal(int columnIndex) List<com.google.cloud.ByteArray>getBytesList(int columnIndex) List<com.google.cloud.ByteArray>getBytesList(String columnName) protected abstract List<com.google.cloud.ByteArray>getBytesListInternal(int columnIndex) intintgetColumnIndex(String columnName) getColumnType(int columnIndex) getColumnType(String columnName) com.google.cloud.DategetDate(int columnIndex) com.google.cloud.Dateprotected abstract com.google.cloud.DategetDateInternal(int columnIndex) List<com.google.cloud.Date>getDateList(int columnIndex) List<com.google.cloud.Date>getDateList(String columnName) protected abstract List<com.google.cloud.Date>getDateListInternal(int columnIndex) doublegetDouble(int columnIndex) doubledouble[]getDoubleArray(int columnIndex) double[]getDoubleArray(String columnName) protected abstract double[]getDoubleArrayInternal(int columnIndex) protected abstract doublegetDoubleInternal(int columnIndex) getDoubleList(int columnIndex) getDoubleList(String columnName) getDoubleListInternal(int columnIndex) floatgetFloat(int columnIndex) floatfloat[]getFloatArray(int columnIndex) float[]getFloatArray(String columnName) protected float[]getFloatArrayInternal(int columnIndex) protected floatgetFloatInternal(int columnIndex) getFloatList(int columnIndex) getFloatList(String columnName) getFloatListInternal(int columnIndex) getJson(int columnIndex) protected StringgetJsonInternal(int columnIndex) getJsonList(int columnIndex) getJsonList(String columnName) getJsonListInternal(int columnIndex) longgetLong(int columnIndex) longlong[]getLongArray(int columnIndex) long[]getLongArray(String columnName) protected abstract long[]getLongArrayInternal(int columnIndex) protected abstract longgetLongInternal(int columnIndex) getLongList(int columnIndex) getLongList(String columnName) getLongListInternal(int columnIndex) getPgJsonb(int columnIndex) getPgJsonb(String columnName) protected StringgetPgJsonbInternal(int columnIndex) getPgJsonbList(int columnIndex) getPgJsonbList(String columnName) getPgJsonbListInternal(int columnIndex) <T extends com.google.protobuf.ProtocolMessageEnum>
TgetProtoEnum(int columnIndex, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) To get the proto enum of typeTfrom Struct.<T extends com.google.protobuf.ProtocolMessageEnum>
TgetProtoEnum(String columnName, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) To get the proto enum of typeTfrom Struct.protected <T extends com.google.protobuf.ProtocolMessageEnum>
TgetProtoEnumInternal(int columnIndex, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) <T extends com.google.protobuf.ProtocolMessageEnum>
List<T>getProtoEnumList(int columnIndex, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) To get the proto enum of typeTfrom Struct.<T extends com.google.protobuf.ProtocolMessageEnum>
List<T>getProtoEnumList(String columnName, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) To get the proto enum list of typeTfrom Struct.protected <T extends com.google.protobuf.ProtocolMessageEnum>
List<T>getProtoEnumListInternal(int columnIndex, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) <T extends com.google.protobuf.AbstractMessage>
TgetProtoMessage(int columnIndex, T message) To get the proto message of generic typeTfrom Struct.<T extends com.google.protobuf.AbstractMessage>
TgetProtoMessage(String columnName, T message) To get the proto message of typeTfrom Struct.protected <T extends com.google.protobuf.AbstractMessage>
TgetProtoMessageInternal(int columnIndex, T message) <T extends com.google.protobuf.AbstractMessage>
List<T>getProtoMessageList(int columnIndex, T message) To get the proto message of generic typeTfrom Struct.<T extends com.google.protobuf.AbstractMessage>
List<T>getProtoMessageList(String columnName, T message) To get the proto message of typeTfrom Struct.protected <T extends com.google.protobuf.AbstractMessage>
List<T>getProtoMessageListInternal(int columnIndex, T message) getString(int columnIndex) protected abstract StringgetStringInternal(int columnIndex) getStringList(int columnIndex) getStringList(String columnName) getStringListInternal(int columnIndex) getStructList(int columnIndex) getStructList(String columnName) getStructListInternal(int columnIndex) com.google.cloud.TimestampgetTimestamp(int columnIndex) com.google.cloud.TimestampgetTimestamp(String columnName) protected abstract com.google.cloud.TimestampgetTimestampInternal(int columnIndex) List<com.google.cloud.Timestamp>getTimestampList(int columnIndex) List<com.google.cloud.Timestamp>getTimestampList(String columnName) protected abstract List<com.google.cloud.Timestamp>getTimestampListInternal(int columnIndex) getValue(int columnIndex) protected ValuegetValueInternal(int columnIndex) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.cloud.spanner.StructReader
getType, isNull
-
Constructor Details
-
AbstractStructReader
public AbstractStructReader()
-
-
Method Details
-
getBooleanInternal
protected abstract boolean getBooleanInternal(int columnIndex) -
getLongInternal
protected abstract long getLongInternal(int columnIndex) -
getFloatInternal
protected float getFloatInternal(int columnIndex) -
getDoubleInternal
protected abstract double getDoubleInternal(int columnIndex) -
getBigDecimalInternal
-
getStringInternal
-
getJsonInternal
-
getPgJsonbInternal
-
getBytesInternal
protected abstract com.google.cloud.ByteArray getBytesInternal(int columnIndex) -
getTimestampInternal
protected abstract com.google.cloud.Timestamp getTimestampInternal(int columnIndex) -
getDateInternal
protected abstract com.google.cloud.Date getDateInternal(int columnIndex) -
getProtoMessageInternal
protected <T extends com.google.protobuf.AbstractMessage> T getProtoMessageInternal(int columnIndex, T message) -
getProtoEnumInternal
-
getProtoMessageListInternal
protected <T extends com.google.protobuf.AbstractMessage> List<T> getProtoMessageListInternal(int columnIndex, T message) -
getProtoEnumListInternal
-
getValueInternal
-
getBooleanArrayInternal
protected abstract boolean[] getBooleanArrayInternal(int columnIndex) -
getBooleanListInternal
-
getLongArrayInternal
protected abstract long[] getLongArrayInternal(int columnIndex) -
getLongListInternal
-
getFloatArrayInternal
protected float[] getFloatArrayInternal(int columnIndex) -
getFloatListInternal
-
getDoubleArrayInternal
protected abstract double[] getDoubleArrayInternal(int columnIndex) -
getDoubleListInternal
-
getBigDecimalListInternal
-
getStringListInternal
-
getJsonListInternal
-
getPgJsonbListInternal
-
getBytesListInternal
-
getTimestampListInternal
-
getDateListInternal
-
getStructListInternal
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceStructReader- Returns:
- the number of columns in the underlying data. This includes any columns with
NULLvalues.
-
getColumnType
- Specified by:
getColumnTypein interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the type of a column.
-
getColumnType
- Specified by:
getColumnTypein interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the type of a column.
-
isNull
- Specified by:
isNullin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
trueif a column contains aNULLvalue.
-
getBoolean
public boolean getBoolean(int columnIndex) - Specified by:
getBooleanin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.bool().
-
getBoolean
- Specified by:
getBooleanin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.bool().
-
getLong
public long getLong(int columnIndex) - Specified by:
getLongin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.int64().
-
getLong
- Specified by:
getLongin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.int64().
-
getFloat
public float getFloat(int columnIndex) - Specified by:
getFloatin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.float32().
-
getFloat
- Specified by:
getFloatin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.float32().
-
getDouble
public double getDouble(int columnIndex) - Specified by:
getDoublein interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.float64().
-
getDouble
- Specified by:
getDoublein interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.float64().
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.numeric().
-
getBigDecimal
- Specified by:
getBigDecimalin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.numeric().
-
getString
- Specified by:
getStringin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.string().
-
getString
- Specified by:
getStringin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.string().
-
getJson
- Specified by:
getJsonin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.json().
-
getJson
- Specified by:
getJsonin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.json().
-
getPgJsonb
- Specified by:
getPgJsonbin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.pgJsonb().
-
getPgJsonb
- Specified by:
getPgJsonbin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.pgJsonb().
-
getBytes
public com.google.cloud.ByteArray getBytes(int columnIndex) - Specified by:
getBytesin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.bytes().
-
getBytes
- Specified by:
getBytesin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.bytes().
-
getTimestamp
public com.google.cloud.Timestamp getTimestamp(int columnIndex) - Specified by:
getTimestampin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.timestamp().
-
getTimestamp
- Specified by:
getTimestampin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.timestamp().
-
getDate
public com.google.cloud.Date getDate(int columnIndex) - Specified by:
getDatein interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.date().
-
getDate
- Specified by:
getDatein interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.date().
-
getProtoEnum
public <T extends com.google.protobuf.ProtocolMessageEnum> T getProtoEnum(int columnIndex, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) Description copied from interface:StructReaderTo get the proto enum of typeTfrom Struct.- Specified by:
getProtoEnumin interfaceStructReader- Parameters:
columnIndex- Index of the column.method- A function that takes enum integer constant as argument and returns the enum. Use method @code{forNumber} from generated enum class (eg: MyProtoEnum::forNumber). @see forNumber- Returns:
- The value of a non-
NULLcolumn with typeType.protoEnum(String)()}.
-
getProtoEnum
public <T extends com.google.protobuf.ProtocolMessageEnum> T getProtoEnum(String columnName, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) Description copied from interface:StructReaderTo get the proto enum of typeTfrom Struct.- Specified by:
getProtoEnumin interfaceStructReader- Parameters:
columnName- Name of the column.method- A function that takes enum integer constant as argument and returns the enum. Use method @code{forNumber} from generated enum class (eg: MyProtoEnum::forNumber). @see forNumber- Returns:
- The value of a non-
NULLcolumn with typeType.protoEnum(String)()}.
-
getProtoMessage
public <T extends com.google.protobuf.AbstractMessage> T getProtoMessage(int columnIndex, T message) Description copied from interface:StructReaderTo get the proto message of generic typeTfrom Struct.- Specified by:
getProtoMessagein interfaceStructReader- Parameters:
columnIndex- Index of the column.message- Proto message object. Message can't be null as it's internally used to find the type of proto. Use @code{MyProtoClass.getDefaultInstance()}. @see getDefaultInstance()- Returns:
- The value of a non-
NULLcolumn with typeType.proto(String)()}.
-
getProtoMessage
public <T extends com.google.protobuf.AbstractMessage> T getProtoMessage(String columnName, T message) Description copied from interface:StructReaderTo get the proto message of typeTfrom Struct.- Specified by:
getProtoMessagein interfaceStructReader- Parameters:
columnName- Name of the column.message- Proto message object. Message can't be null as it's internally used to find the type of proto. Use @code{MyProtoClass.getDefaultInstance()}. @see getDefaultInstance()- Returns:
- The value of a non-
NULLcolumn with typeType.proto(String)()}.
-
getValue
- Specified by:
getValuein interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a nullable column as a
Value.
-
getValue
- Specified by:
getValuein interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a nullable column as a
Value.
-
getBooleanArray
public boolean[] getBooleanArray(int columnIndex) - Specified by:
getBooleanArrayin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.bool()).
-
getBooleanArray
- Specified by:
getBooleanArrayin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.bool()).
-
getBooleanList
- Specified by:
getBooleanListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.bool()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getBooleanList
- Specified by:
getBooleanListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.bool()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getLongArray
public long[] getLongArray(int columnIndex) - Specified by:
getLongArrayin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.int64()).
-
getLongArray
- Specified by:
getLongArrayin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.int64()).
-
getLongList
- Specified by:
getLongListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.int64()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getLongList
- Specified by:
getLongListin interfaceStructReader- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.int64()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getFloatArray
public float[] getFloatArray(int columnIndex) - Specified by:
getFloatArrayin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float32()).
-
getFloatArray
- Specified by:
getFloatArrayin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float32()).
-
getFloatList
- Specified by:
getFloatListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float32())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getFloatList
- Specified by:
getFloatListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float32())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getDoubleArray
public double[] getDoubleArray(int columnIndex) - Specified by:
getDoubleArrayin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float64()).
-
getDoubleArray
- Specified by:
getDoubleArrayin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float64()).
-
getDoubleList
- Specified by:
getDoubleListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float64())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getDoubleList
- Specified by:
getDoubleListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.float64())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getBigDecimalList
- Specified by:
getBigDecimalListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.numeric())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getBigDecimalList
- Specified by:
getBigDecimalListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.numeric())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getStringList
- Specified by:
getStringListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.string()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getStringList
- Specified by:
getStringListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.string()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getJsonList
- Specified by:
getJsonListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.json()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getJsonList
- Specified by:
getJsonListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.json()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getPgJsonbList
- Specified by:
getPgJsonbListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.pgJsonb())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getPgJsonbList
- Specified by:
getPgJsonbListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.pgJsonb())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getBytesList
- Specified by:
getBytesListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.bytes()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getBytesList
- Specified by:
getBytesListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.bytes()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getProtoMessageList
public <T extends com.google.protobuf.AbstractMessage> List<T> getProtoMessageList(int columnIndex, T message) Description copied from interface:StructReaderTo get the proto message of generic typeTfrom Struct.- Specified by:
getProtoMessageListin interfaceStructReader- Parameters:
columnIndex- Index of the column.message- Proto message object. Message can't be null as it's internally used to find the type of proto. Use @code{MyProtoClass.getDefaultInstance()}. @see getDefaultInstance()- Returns:
- The value of a non-
NULLcolumn with typeType.array(Type.proto(String)).
-
getProtoMessageList
public <T extends com.google.protobuf.AbstractMessage> List<T> getProtoMessageList(String columnName, T message) Description copied from interface:StructReaderTo get the proto message of typeTfrom Struct.- Specified by:
getProtoMessageListin interfaceStructReader- Parameters:
columnName- Name of the column.message- Proto message object. Message can't be null as it's internally used to find the type of proto. Use @code{MyProtoClass.getDefaultInstance()}. @see getDefaultInstance()- Returns:
- The value of a non-
NULLcolumn with typeType.array(Type.proto(String)).
-
getProtoEnumList
public <T extends com.google.protobuf.ProtocolMessageEnum> List<T> getProtoEnumList(int columnIndex, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) Description copied from interface:StructReaderTo get the proto enum of typeTfrom Struct.- Specified by:
getProtoEnumListin interfaceStructReader- Parameters:
columnIndex- Index of the column.method- A function that takes enum integer constant as argument and returns the enum. Use method @code{forNumber} from generated enum class (eg: MyProtoEnum::forNumber). @see forNumber- Returns:
- The value of a non-
NULLcolumn with typeType.array(Type.protoEnum(String)).
-
getProtoEnumList
public <T extends com.google.protobuf.ProtocolMessageEnum> List<T> getProtoEnumList(String columnName, Function<Integer, com.google.protobuf.ProtocolMessageEnum> method) Description copied from interface:StructReaderTo get the proto enum list of typeTfrom Struct.- Specified by:
getProtoEnumListin interfaceStructReader- Parameters:
columnName- Name of the column.method- A function that takes enum integer constant as argument and returns the enum. Use method @code{forNumber} from generated enum class (eg: MyProtoEnum::forNumber). @see forNumber- Returns:
- The value of a non-
NULLcolumn with typeType.array(Type.protoEnum(String)).
-
getTimestampList
- Specified by:
getTimestampListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.timestamp())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getTimestampList
- Specified by:
getTimestampListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.timestamp())The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getDateList
- Specified by:
getDateListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.date()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getDateList
- Specified by:
getDateListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.date()). The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getStructList
- Specified by:
getStructListin interfaceStructReader- Parameters:
columnIndex- index of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.struct(...))The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getStructList
- Specified by:
getStructListin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the value of a non-
NULLcolumn with typeType.array(Type.struct(...))The list returned by this method is lazily constructed. Create a copy of it if you intend to access each element in the list multiple times.
-
getColumnIndex
- Specified by:
getColumnIndexin interfaceStructReader- Parameters:
columnName- name of the column- Returns:
- the index of the column named
columnName.
-
checkNonNull
-