Package io.confluent.ksql.api.client
Interface Row
- 
public interface RowA single record, returned as part of a query result. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KsqlObjectasObject()Returns the data in this row represented as aKsqlObjectwhere keys are column names and values are column values.List<String>columnNames()Returns column names for the data in this row.List<ColumnType>columnTypes()Returns column types for the data in this row.BooleangetBoolean(int columnIndex)Returns the value for a particular column of theRowas a boolean.BooleangetBoolean(String columnName)Returns the value for a particular column of theRowas a boolean.byte[]getBytes(int columnIndex)Returns the value for a particular column of theRowas a byte array.byte[]getBytes(String columnName)Returns the value for a particular column of theRowas byte array.BigDecimalgetDecimal(int columnIndex)Returns the value for a particular column of theRowas aBigDecimal.BigDecimalgetDecimal(String columnName)Returns the value for a particular column of theRowas aBigDecimal.DoublegetDouble(int columnIndex)Returns the value for a particular column of theRowas a double.DoublegetDouble(String columnName)Returns the value for a particular column of theRowas a double.IntegergetInteger(int columnIndex)Returns the value for a particular column of theRowas an integer.IntegergetInteger(String columnName)Returns the value for a particular column of theRowas an integer.KsqlArraygetKsqlArray(int columnIndex)Returns the value for a particular column of theRowas aKsqlArray.KsqlArraygetKsqlArray(String columnName)Returns the value for a particular column of theRowas aKsqlArray.KsqlObjectgetKsqlObject(int columnIndex)Returns the value for a particular column of theRowas aKsqlObject.KsqlObjectgetKsqlObject(String columnName)Returns the value for a particular column of theRowas aKsqlObject.LonggetLong(int columnIndex)Returns the value for a particular column of theRowas a long.LonggetLong(String columnName)Returns the value for a particular column of theRowas a long.StringgetString(int columnIndex)Returns the value for a particular column of theRowas a string.StringgetString(String columnName)Returns the value for a particular column of theRowas a string.ObjectgetValue(int columnIndex)Returns the value for a particular column of theRowas anObject.ObjectgetValue(String columnName)Returns the value for a particular column of theRowas anObject.booleanisNull(int columnIndex)Returns whether the value for a particular column of theRowis null.booleanisNull(String columnName)Returns whether the value for a particular column of theRowis null.KsqlArrayvalues()Returns the values (data) in this row, represented as aKsqlArray. 
 - 
 
- 
- 
Method Detail
- 
columnNames
List<String> columnNames()
Returns column names for the data in this row.- Returns:
 - the column names
 
 
- 
columnTypes
List<ColumnType> columnTypes()
Returns column types for the data in this row.- Returns:
 - the column types
 
 
- 
values
KsqlArray values()
Returns the values (data) in this row, represented as aKsqlArray.Returned values are JSON types which means numeric columns are not necessarily typed in accordance with
columnTypes(). For example, aBIGINTfield will be typed as an integer rather than a long, if the numeric value fits into an integer.- Returns:
 - the values
 
 
- 
asObject
KsqlObject asObject()
Returns the data in this row represented as aKsqlObjectwhere keys are column names and values are column values.- Returns:
 - the data
 
 
- 
isNull
boolean isNull(int columnIndex)
Returns whether the value for a particular column of theRowis null.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - whether the column value is null
 - Throws:
 IndexOutOfBoundsException- if the index is invalid
 
- 
isNull
boolean isNull(String columnName)
Returns whether the value for a particular column of theRowis null.- Parameters:
 columnName- name of column- Returns:
 - whether the column value is null
 - Throws:
 IllegalArgumentException- if the column name is invalid
 
- 
getValue
Object getValue(int columnIndex)
Returns the value for a particular column of theRowas anObject.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 IndexOutOfBoundsException- if the index is invalid
 
- 
getValue
Object getValue(String columnName)
Returns the value for a particular column of theRowas anObject.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 IllegalArgumentException- if the column name is invalid
 
- 
getString
String getString(int columnIndex)
Returns the value for a particular column of theRowas a string.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not a stringIndexOutOfBoundsException- if the index is invalid
 
- 
getString
String getString(String columnName)
Returns the value for a particular column of theRowas a string.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not a stringIllegalArgumentException- if the column name is invalid
 
- 
getInteger
Integer getInteger(int columnIndex)
Returns the value for a particular column of theRowas an integer.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIndexOutOfBoundsException- if the index is invalid
 
- 
getInteger
Integer getInteger(String columnName)
Returns the value for a particular column of theRowas an integer.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIllegalArgumentException- if the column name is invalid
 
- 
getLong
Long getLong(int columnIndex)
Returns the value for a particular column of theRowas a long.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIndexOutOfBoundsException- if the index is invalid
 
- 
getLong
Long getLong(String columnName)
Returns the value for a particular column of theRowas a long.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIllegalArgumentException- if the column name is invalid
 
- 
getDouble
Double getDouble(int columnIndex)
Returns the value for a particular column of theRowas a double.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIndexOutOfBoundsException- if the index is invalid
 
- 
getDouble
Double getDouble(String columnName)
Returns the value for a particular column of theRowas a double.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIllegalArgumentException- if the column name is invalid
 
- 
getBoolean
Boolean getBoolean(int columnIndex)
Returns the value for a particular column of theRowas a boolean.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not a booleanIndexOutOfBoundsException- if the index is invalid
 
- 
getBoolean
Boolean getBoolean(String columnName)
Returns the value for a particular column of theRowas a boolean.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not a booleanIllegalArgumentException- if the column name is invalid
 
- 
getDecimal
BigDecimal getDecimal(int columnIndex)
Returns the value for a particular column of theRowas aBigDecimal.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIndexOutOfBoundsException- if the index is invalid
 
- 
getDecimal
BigDecimal getDecimal(String columnName)
Returns the value for a particular column of theRowas aBigDecimal.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aNumberIllegalArgumentException- if the column name is invalid
 
- 
getBytes
byte[] getBytes(int columnIndex)
Returns the value for a particular column of theRowas a byte array.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aStringIllegalArgumentException- if the column value is not a base64 encoded stringIndexOutOfBoundsException- if the index is invalid
 
- 
getBytes
byte[] getBytes(String columnName)
Returns the value for a particular column of theRowas byte array.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value is not aStringIllegalArgumentException- if the column name is invalid or the column value is not a base64 encoded string
 
- 
getKsqlObject
KsqlObject getKsqlObject(int columnIndex)
Returns the value for a particular column of theRowas aKsqlObject. Useful forMAPandSTRUCTcolumn types.- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value cannot be converted to a mapIndexOutOfBoundsException- if the index is invalid
 
- 
getKsqlObject
KsqlObject getKsqlObject(String columnName)
Returns the value for a particular column of theRowas aKsqlObject. Useful forMAPandSTRUCTcolumn types.- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value cannot be converted to a mapIllegalArgumentException- if the column name is invalid
 
- 
getKsqlArray
KsqlArray getKsqlArray(int columnIndex)
- Parameters:
 columnIndex- index of column (1-indexed)- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value cannot be converted to a listIndexOutOfBoundsException- if the index is invalid
 
- 
getKsqlArray
KsqlArray getKsqlArray(String columnName)
- Parameters:
 columnName- name of column- Returns:
 - column value
 - Throws:
 ClassCastException- if the column value cannot be converted to a listIllegalArgumentException- if the column name is invalid
 
 - 
 
 -