org.apache.ignite.internal.processors.query

## Interface GridQueryRowDescriptor

All Known Implementing Classes:
  GridQueryRowDescriptorImpl

    public interface GridQueryRowDescriptor

Row descriptor.

### Method Summary

All Methods Instance Methods Abstract Methods
`@Nullable GridCacheContext<?,?>` `context()` Gets cache context for this row descriptor.
`int` `fieldsCount()`
`int` `getAlternativeColumnId(int colId)` Gets alternative column id that may substitute the given column id.
`Object` `getFieldValue(Object key, Object val, int fieldIdx)` Gets field value by field index.
`Set<String>` `getRowKeyColumnNames()` Gets a copy of a set of table key column names.
`boolean` `isFieldKeyProperty(int fieldIdx)` Determine whether a field corresponds to a property of key or to one of value.
`boolean` `isKeyColumn(int colId)` Checks if provided column id matches key column or key alias.
`boolean` `isValueColumn(int colId)` Checks if provided column id matches value column or alias.
`void` `onMetadataUpdated()` Callback for table metadata update event.
`void` `setFieldValue(Object key, Object val, Object fieldVal, int fieldIdx)` Sets field value by field index.
`GridQueryTypeDescriptor` `type()` Gets type descriptor.

### Method Detail

#### onMetadataUpdated

    void onMetadataUpdated()

Callback for table metadata update event.

#### type

    GridQueryTypeDescriptor type()

Gets type descriptor.

Returns:
  Type descriptor.

#### context

    @Nullable
    @Nullable GridCacheContext<?,?> context()

Gets cache context for this row descriptor.

Returns:
  Cache context.

#### fieldsCount

    int fieldsCount()

Returns:
  Total fields count.

#### getFieldValue

    Object getFieldValue(Object key,
                         Object val,
                         int fieldIdx)

Gets field value by field index.

Parameters:
  `key` - Key.
  `val` - Value.
  `fieldIdx` - Field index.
Returns:
  Field value.

#### setFieldValue

    void setFieldValue(Object key,
                       Object val,
                       Object fieldVal,
                       int fieldIdx)

Sets field value by field index.

Parameters:
  `key` - Key.
  `val` - Value.
  `fieldVal` - Value to set to field.
  `fieldIdx` - Field index.

#### isFieldKeyProperty

    boolean isFieldKeyProperty(int fieldIdx)

Determine whether a field corresponds to a property of key or to one of value.

Parameters:
  `fieldIdx` - Field index.
Returns:
  `true` if given field corresponds to a key property, `false` otherwise.

#### isKeyColumn

    boolean isKeyColumn(int colId)

Checks if provided column id matches key column or key alias.

Parameters:
  `colId` - Column id.
Returns:
  Result.

#### isValueColumn

    boolean isValueColumn(int colId)

Checks if provided column id matches value column or alias.

Parameters:
  `colId` - Column id.
Returns:
  Result.

#### getAlternativeColumnId

    int getAlternativeColumnId(int colId)

Gets alternative column id that may substitute the given column id. For alias column returns original one. For original column returns its alias. Otherwise, returns the given column id.

Parameters:
  `colId` - Column id.
Returns:
  Result.

#### getRowKeyColumnNames

    Set<String> getRowKeyColumnNames()

Gets a copy of a set of table key column names.

Returns:
  Set of a table key column names.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023