Struct (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache.query, interface: Struct

Package org.apache.geode.cache.query

# Interface Struct

public interface Struct
An immutable and thread-safe data type used by the result of some `SELECT` queries. It allows us to represent of "tuple" of values. It has a fixed number of "fields", each of which has a name and a value. The names and types of these fields are described by a `StructType`.

Since:
  GemFire 4.0
See Also:
  - `SelectResults`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `get(String fieldName)`
  Return the value associated with the given field name
  `Object[]`
  `getFieldValues()`
  Get the values in this struct
  `StructType`
  `getStructType()`
  Returns the `StructType` that describes the fields of this `Struct`.

- ## Method Details

  - ### get

    Object get(String fieldName)
    Return the value associated with the given field name
    Parameters:
      `fieldName` - the String name of the field
    Returns:
      the value associated with the specified field
    Throws:
      `IllegalArgumentException` - If this struct does not have a field named fieldName
    See Also:
      - `StructType.getFieldIndex(java.lang.String)`

  - ### getFieldValues

    Object[] getFieldValues()
    Get the values in this struct
    Returns:
      the array of values

  - ### getStructType

    StructType getStructType()
    Returns the `StructType` that describes the fields of this `Struct`.
    Returns:
      the `StructType` that describes the fields of this `Struct`