Package: org.apache.groovy.ginq.provider.collection.runtime

## [Groovy] Class NamedRecord<E, T>

- org.apache.groovy.ginq.provider.collection.runtime.NamedRecord

-     @CompileStatic
      @AutoFinal
      @POJO
      class NamedRecord<E, T>
      extends NamedTuple<E>

  Represents named record, which is constructed by clauses excluding `from` and joins

  Since:
    4.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `NamedRecord(List<E> elementList, List<String> nameList, List<String> aliasList)` Creates a named record from projected values and aliases.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `Object` | `get(String name)` Returns the value for the supplied name.
    `` | `List<String>` | `getAliasList()` Returns the source aliases available to this record.
    `` | `Object` | `getAt(String name)` Returns the value for the supplied name, falling back to the source record.
    `` | `NamedRecord<E, T>` | `sourceRecord(T sr)` Attaches the original source record for alias-based lookups.
    `` | `String` | `toString()` Returns the tuple-style string form of this record.

- - ### Constructor Detail

    - #### NamedRecord(List<E> elementList, List<String> nameList, List<String> aliasList)

      Creates a named record from projected values and aliases.

      Parameters:
        `elementList` - the projected values
        `nameList` - the projected names
        `aliasList` - the source aliases available for lookup

  - ### Method Detail

    - #### @Override
      Object get(String name)

      Returns the value for the supplied name.

      Parameters:
        `name` - the projected name or source alias
      Returns:
        the matching value

    - #### List<String> getAliasList()

      Returns the source aliases available to this record.

      Returns:
        the source aliases

    - #### @Override
      Object getAt(String name)

      Returns the value for the supplied name, falling back to the source record.

      Parameters:
        `name` - the projected name or source alias
      Returns:
        the matching value

    - #### @GroovyABI(since="4.0.0")
      NamedRecord<E, T> sourceRecord(T sr)

      Attaches the original source record for alias-based lookups.

      Parameters:
        `sr` - the source record
      Returns:
        this record

    - #### @Override
      String toString()

      Returns the tuple-style string form of this record.

      Returns:
        the string form of this record