Interface Row


public interface Row

A single row in a query result.

Since:
1.2
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int index)
    Returns the value at the specified index.
    <T> T
    get(int index, Class<T> type)
    Returns the value at the specified index in the specified type.
    get(String name)
    Returns the value of the column identified by the specified name.
    <T> T
    get(String name, Class<T> type)
    Returns the value of the column identified by the specified name in the specified type.
    getBigDecimal(int index)
    Returns the value at the specified index as a BigDecimal.
    Returns the value of the column identified by the specified name as a BigDecimal.
    getBoolean(int index)
    Returns the value at the specified index as a Boolean.
    Returns the value of the column identified by the specified name as a Boolean.
    getByte(int index)
    Returns the value at the specified index as a Byte.
    Returns the value of the column identified by the specified name as a Byte.
    getByteBuf(int index)
    Returns the value at the specified index as a ByteBuf.
    Returns the value of the column identified by the specified name as a ByteBuf.
    getDouble(int index)
    Returns the value at the specified index as a Double.
    Returns the value of the column identified by the specified name as a Double.
    getFloat(int index)
    Returns the value at the specified index as a Float.
    Returns the value of the column identified by the specified name as a Float.
    getInteger(int index)
    Returns the value at the specified index as an Integer.
    Returns the value of the column identified by the specified name as an Integer.
    getLocalDate(int index)
    Returns the value at the specified index as a LocalDate.
    Returns the value of the column identified by the specified name as a LocalDate.
    getLocalDateTime(int index)
    Returns the value at the specified index as a LocalDateTime.
    Returns the value of the column identified by the specified name as a LocalDateTime.
    getLocalTime(int index)
    Returns the value at the specified index as a LocalTime.
    Returns the value of the column identified by the specified name as a LocalTime.
    getLong(int index)
    Returns the value at the specified index as a Long.
    Returns the value of the column identified by the specified name as a Long.
    getOffsetDateTime(int index)
    Returns the value at the specified index as an OffsetDateTime.
    Returns the value of the column identified by the specified name as an OffsetDateTime.
    getOffsetTime(int index)
    Returns the value at the specified index as an OffsetTime.
    Returns the value of the column identified by the specified name as an OffsetTime.
    getShort(int index)
    Returns the value at the specified index as a Short.
    Returns the value of the column identified by the specified name as a Short.
    getString(int index)
    Returns the value at the specified index as a String.
    Returns the value of the column identified by the specified name as a String.
  • Method Details

    • get

      <T> T get(int index, Class<T> type)

      Returns the value at the specified index in the specified type.

      Type Parameters:
      T - the value type
      Parameters:
      index - the index of the value in the row
      type - the expected type of the value
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into the type
    • get

      <T> T get(String name, Class<T> type)

      Returns the value of the column identified by the specified name in the specified type.

      Type Parameters:
      T - the value type
      Parameters:
      name - the name of the column
      type - the expected type of the value
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into the type
      NoSuchElementException - if there is no column with the specified name
    • get

      Object get(int index)

      Returns the value at the specified index.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
    • get

      Object get(String name)

      Returns the value of the column identified by the specified name.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
    • getString

      String getString(int index)

      Returns the value at the specified index as a String.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a String
    • getString

      String getString(String name)

      Returns the value of the column identified by the specified name as a String.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a String
    • getBoolean

      Boolean getBoolean(int index)

      Returns the value at the specified index as a Boolean.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a Boolean
    • getBoolean

      Boolean getBoolean(String name)

      Returns the value of the column identified by the specified name as a Boolean.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a Boolean
    • getByte

      Byte getByte(int index)

      Returns the value at the specified index as a Byte.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a Byte
    • getByte

      Byte getByte(String name)

      Returns the value of the column identified by the specified name as a Byte.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a Byte
    • getShort

      Short getShort(int index)

      Returns the value at the specified index as a Short.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a Short
    • getShort

      Short getShort(String name)

      Returns the value of the column identified by the specified name as a Short.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a Short
    • getInteger

      Integer getInteger(int index)

      Returns the value at the specified index as an Integer.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into an Integer
    • getInteger

      Integer getInteger(String name)

      Returns the value of the column identified by the specified name as an Integer.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into an Integer
    • getLong

      Long getLong(int index)

      Returns the value at the specified index as a Long.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a Long
    • getLong

      Long getLong(String name)

      Returns the value of the column identified by the specified name as a Long.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a Long
    • getFloat

      Float getFloat(int index)

      Returns the value at the specified index as a Float.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a Float
    • getFloat

      Float getFloat(String name)

      Returns the value of the column identified by the specified name as a Float.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a Float
    • getDouble

      Double getDouble(int index)

      Returns the value at the specified index as a Double.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a Double
    • getDouble

      Double getDouble(String name)

      Returns the value of the column identified by the specified name as a Double.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a Double
    • getBigDecimal

      BigDecimal getBigDecimal(int index)

      Returns the value at the specified index as a BigDecimal.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a BigDecimal
    • getBigDecimal

      BigDecimal getBigDecimal(String name)

      Returns the value of the column identified by the specified name as a BigDecimal.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a BigDecimal
    • getLocalDate

      LocalDate getLocalDate(int index)

      Returns the value at the specified index as a LocalDate.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a LocalDate
    • getLocalDate

      LocalDate getLocalDate(String name)

      Returns the value of the column identified by the specified name as a LocalDate.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a LocalDate
    • getLocalTime

      LocalTime getLocalTime(int index)

      Returns the value at the specified index as a LocalTime.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a LocalTime
    • getLocalTime

      LocalTime getLocalTime(String name)

      Returns the value of the column identified by the specified name as a LocalTime.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a LocalTime
    • getLocalDateTime

      LocalDateTime getLocalDateTime(int index)

      Returns the value at the specified index as a LocalDateTime.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a LocalDateTime
    • getLocalDateTime

      LocalDateTime getLocalDateTime(String name)

      Returns the value of the column identified by the specified name as a LocalDateTime.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a LocalDateTime
    • getOffsetTime

      OffsetTime getOffsetTime(int index)

      Returns the value at the specified index as an OffsetTime.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into an OffsetTime
    • getOffsetTime

      OffsetTime getOffsetTime(String name)

      Returns the value of the column identified by the specified name as an OffsetTime.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into an OffsetTime
    • getOffsetDateTime

      OffsetDateTime getOffsetDateTime(int index)

      Returns the value at the specified index as an OffsetDateTime.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into an OffsetDateTime
    • getOffsetDateTime

      OffsetDateTime getOffsetDateTime(String name)

      Returns the value of the column identified by the specified name as an OffsetDateTime.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into an OffsetDateTime
    • getByteBuf

      ByteBuf getByteBuf(int index)

      Returns the value at the specified index as a ByteBuf.

      Parameters:
      index - the index of the value in the row
      Returns:
      the value or null
      Throws:
      ClassCastException - if the value can't be cast into a ByteBuf
    • getByteBuf

      ByteBuf getByteBuf(String name)

      Returns the value of the column identified by the specified name as a ByteBuf.

      Parameters:
      name - the name of the column
      Returns:
      the value or null
      Throws:
      NoSuchElementException - if there is no column with the specified name
      ClassCastException - if the value can't be cast into a ByteBuf