Module org.jooq
Package org.jooq

Interface Fields

All Known Subinterfaces:
CommonTableExpression<R>, Cursor<R>, DeleteResultStep<R>, EmbeddableRecord<R>, InsertResultStep<R>, JSONTableColumnPathStep, JSONTableColumnsStep, QualifiedRecord<R>, Record, Record1<T1>, Record10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>, Record11<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>, Record12<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>, Record13<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>, Record14<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>, Record15<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>, Record16<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>, Record17<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>, Record18<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>, Record19<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>, Record2<T1,​T2>, Record20<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>, Record21<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>, Record22<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>, Record3<T1,​T2,​T3>, Record4<T1,​T2,​T3,​T4>, Record5<T1,​T2,​T3,​T4,​T5>, Record6<T1,​T2,​T3,​T4,​T5,​T6>, Record7<T1,​T2,​T3,​T4,​T5,​T6,​T7>, Record8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>, Record9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>, RecordQualifier<R>, RecordType<R>, Result<R>, ResultQuery<R>, Row, Row1<T1>, Row10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>, Row11<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>, Row12<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>, Row13<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>, Row14<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>, Row15<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>, Row16<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>, Row17<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>, Row18<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>, Row19<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>, Row2<T1,​T2>, Row20<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>, Row21<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>, Row22<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>, Row3<T1,​T2,​T3>, Row4<T1,​T2,​T3,​T4>, Row5<T1,​T2,​T3,​T4,​T5>, Row6<T1,​T2,​T3,​T4,​T5,​T6>, Row7<T1,​T2,​T3,​T4,​T5,​T6,​T7>, Row8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>, Row9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>, RowN, Select<R>, SelectConditionStep<R>, SelectConnectByAfterStartWithConditionStep<R>, SelectConnectByConditionStep<R>, SelectConnectByStep<R>, SelectCorrelatedSubqueryStep<R>, SelectDistinctOnStep<R>, SelectFinalStep<R>, SelectForJSONCommonDirectivesStep<R>, SelectForStep<R>, SelectForUpdateOfStep<R>, SelectForUpdateStep<R>, SelectForUpdateWaitStep<R>, SelectForXMLCommonDirectivesStep<R>, SelectForXMLPathDirectivesStep<R>, SelectForXMLRawDirectivesStep<R>, SelectFromStep<R>, SelectGroupByStep<R>, SelectHavingConditionStep<R>, SelectHavingStep<R>, SelectIntoStep<R>, SelectJoinStep<R>, SelectLimitAfterOffsetStep<R>, SelectLimitPercentAfterOffsetStep<R>, SelectLimitPercentStep<R>, SelectLimitStep<R>, SelectOffsetStep<R>, SelectOnConditionStep<R>, SelectOptionalOnStep<R>, SelectOptionStep<R>, SelectOrderByStep<R>, SelectQualifyConditionStep<R>, SelectQualifyStep<R>, SelectQuery<R>, SelectSeekLimitStep<R>, SelectSeekStep1<R,​T1>, SelectSeekStep10<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>, SelectSeekStep11<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>, SelectSeekStep12<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>, SelectSeekStep13<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>, SelectSeekStep14<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>, SelectSeekStep15<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>, SelectSeekStep16<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>, SelectSeekStep17<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>, SelectSeekStep18<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>, SelectSeekStep19<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>, SelectSeekStep2<R,​T1,​T2>, SelectSeekStep20<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>, SelectSeekStep21<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>, SelectSeekStep22<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>, SelectSeekStep3<R,​T1,​T2,​T3>, SelectSeekStep4<R,​T1,​T2,​T3,​T4>, SelectSeekStep5<R,​T1,​T2,​T3,​T4,​T5>, SelectSeekStep6<R,​T1,​T2,​T3,​T4,​T5,​T6>, SelectSeekStep7<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7>, SelectSeekStep8<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>, SelectSeekStep9<R,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>, SelectSeekStepN<R>, SelectSelectStep<R>, SelectStartWithStep<R>, SelectUnionStep<R>, SelectWhereStep<R>, SelectWindowStep<R>, SelectWithTiesAfterOffsetStep<R>, SelectWithTiesStep<R>, Table<R>, TableLike<R>, TableOnConditionStep<R>, TableOptionalOnStep<R>, TableRecord<R>, UDT<R>, UDTRecord<R>, UpdatableRecord<R>, UpdateResultStep<R>, XMLTableColumnPathStep, XMLTableColumnsStep
All Known Implementing Classes:
CustomRecord, CustomTable, EmbeddableRecordImpl, TableImpl, TableRecordImpl, UDTImpl, UDTRecordImpl, UpdatableRecordImpl

public interface Fields
A common super type for various types that can provide a set of fields, similar to a Table or a Record.

Not all implementations actually know their fields. For example, when using plain SQL templates (DSL.field(String)) or tables constructed from identifiers (DSL.field(Name)), then the fields are unknown to jOOQ and empty lists or arrays are returned.

Author:
Lukas Eder
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable DataType<?>
    dataType​(int index)
    Get the field data type for a given field index, or null if no field is available at the index.
    @Nullable DataType<?>
    dataType​(String name)
    Get the field data type for a given qualified field name, or null if no field is known to this type by this name.
    @Nullable DataType<?>
    dataType​(Name name)
    Get the field data type for a given qualified field name, or null if no field is known to this type by this name.
    @NotNull DataType<?>[]
    Get an array of field data types for this type.
    @Nullable Field<?>
    field​(int index)
    Get a field known to this type by index, or null if no field is available at the index.
    <T> @Nullable Field<T>
    field​(int index, Class<T> type)
    Get a field known to this type by index coerced to type, or null if no field is available at the index.
    <T> @Nullable Field<T>
    field​(int index, DataType<T> dataType)
    Get a field known to this type by index coerced to dataType, or null if no field is available at the index.
    @Nullable Field<?>
    field​(String name)
    Get a field known to this type by unqualified name, or null if no field is known to this type by this name.
    <T> @Nullable Field<T>
    field​(String name, Class<T> type)
    Get a field known to this type by unqualified name coerced to type, or null if no field is known to this type by this name.
    <T> @Nullable Field<T>
    field​(String name, DataType<T> dataType)
    Get a field known to this type by unqualified name coerced to dataType, or null if no field is known to this type by this name.
    <T> @Nullable Field<T>
    field​(Field<T> field)
    Get a field known to this type by field reference.
    @Nullable Field<?>
    field​(Name name)
    Get a field known to this type by qualified name, or null if no field is known to this type by this name.
    <T> @Nullable Field<T>
    field​(Name name, Class<T> type)
    Get a field known to this type by qualified name coerced to type, or null if no field is known to this type by this name.
    <T> @Nullable Field<T>
    field​(Name name, DataType<T> dataType)
    Get a field known to this type by qualified name coerced to dataType, or null if no field is known to this type by this name.
    @NotNull Field<?>[]
    Get all fields known to this type.
    @NotNull Field<?>[]
    fields​(int... indexes)
    Get all fields known to this type, filtering by some field indexes.
    @NotNull Field<?>[]
    fields​(String... names)
    Get all fields known to this type, filtering by some unqualified field names.
    @NotNull Field<?>[]
    fields​(Field<?>... fields)
    Get all fields, filtering by some fields.
    @NotNull Field<?>[]
    fields​(Name... names)
    Get all fields known to this type, filtering by some qualified field names.
    @NotNull Row
    Get all fields known to this type as a Row.
    @NotNull Stream<Field<?>>
    Get all fields known to this type as a Stream.
    int
    indexOf​(String name)
    Get a field's index from this type.
    int
    indexOf​(Field<?> field)
    Get a field's index from this type.
    int
    indexOf​(Name name)
    Get a field's index from this type.
    @Nullable Class<?>
    type​(int index)
    Get the field type for a given field index, or null if no field is available at the index.
    @Nullable Class<?>
    type​(String name)
    Get the field type for a given unqualified field name, or null if no field is known to this type by this name.
    @Nullable Class<?>
    type​(Name name)
    Get the field type for a given qualified field name, or null if no field is known to this type by this name.
    @NotNull Class<?>[]
    Get an array of field types for fields known to this type.
  • Method Details

    • fields

      @NotNull @NotNull Field<?>[] fields()
      Get all fields known to this type.
    • fieldsRow

      @NotNull @NotNull Row fieldsRow()
      Get all fields known to this type as a Row.
    • fieldStream

      @NotNull @NotNull Stream<Field<?>> fieldStream()
      Get all fields known to this type as a Stream.
    • field

      @Nullable <T> @Nullable Field<T> field(Field<T> field)
      Get a field known to this type by field reference.

      This will return:

      • A field that is the same as the argument field (by identity comparison).
      • A field that is equal to the argument field (exact matching fully qualified name).
      • A field that is equal to the argument field (partially matching qualified name).
      • A field whose name is equal to the name of the argument field.
      • null otherwise.
      If several fields have the same name, the first one is returned and a warning is logged.
    • field

      @Nullable @Nullable Field<?> field(String name)
      Get a field known to this type by unqualified name, or null if no field is known to this type by this name.
      Parameters:
      name - The unqualified name of the field
    • field

      @Nullable <T> @Nullable Field<T> field(String name, Class<T> type)
      Get a field known to this type by unqualified name coerced to type, or null if no field is known to this type by this name.
      Parameters:
      name - The unqualified name of the field
      type - The type to coerce the resulting field to
    • field

      @Nullable <T> @Nullable Field<T> field(String name, DataType<T> dataType)
      Get a field known to this type by unqualified name coerced to dataType, or null if no field is known to this type by this name.
      Parameters:
      name - The unqualified name of the field
      dataType - The data type to coerce the resulting field to
    • field

      @Nullable @Nullable Field<?> field(Name name)
      Get a field known to this type by qualified name, or null if no field is known to this type by this name.
      Parameters:
      name - The qualified name of the field
    • field

      @Nullable <T> @Nullable Field<T> field(Name name, Class<T> type)
      Get a field known to this type by qualified name coerced to type, or null if no field is known to this type by this name.
      Parameters:
      name - The qualified name of the field
      type - The type to coerce the resulting field to
    • field

      @Nullable <T> @Nullable Field<T> field(Name name, DataType<T> dataType)
      Get a field known to this type by qualified name coerced to dataType, or null if no field is known to this type by this name.
      Parameters:
      name - The qualified name of the field
      dataType - The data type to coerce the resulting field to
    • field

      @Nullable @Nullable Field<?> field(int index)
      Get a field known to this type by index, or null if no field is available at the index.
      Parameters:
      index - The 0-based index of the field
    • field

      @Nullable <T> @Nullable Field<T> field(int index, Class<T> type)
      Get a field known to this type by index coerced to type, or null if no field is available at the index.
      Parameters:
      index - The 0-based index of the field
      type - The type to coerce the resulting field to
    • field

      @Nullable <T> @Nullable Field<T> field(int index, DataType<T> dataType)
      Get a field known to this type by index coerced to dataType, or null if no field is available at the index.
      Parameters:
      index - The 0-based index of the field
      dataType - The data type to coerce the resulting field to
    • fields

      @NotNull @NotNull Field<?>[] fields(Field<?>... fields)
      Get all fields, filtering by some fields.
      Parameters:
      fields - The fields to include after looking them up via field(Field).
      See Also:
      field(Field)
    • fields

      @NotNull @NotNull Field<?>[] fields(String... names)
      Get all fields known to this type, filtering by some unqualified field names.
      Parameters:
      names - The unqualified field names to include after looking them up via field(String).
      See Also:
      field(String)
    • fields

      @NotNull @NotNull Field<?>[] fields(Name... names)
      Get all fields known to this type, filtering by some qualified field names.
      Parameters:
      names - The qualified field names to include after looking them up via field(Name).
      See Also:
      field(Name)
    • fields

      @NotNull @NotNull Field<?>[] fields(int... indexes)
      Get all fields known to this type, filtering by some field indexes.
      Parameters:
      names - The 0-based field indexes to include after looking them up via field(int).
      See Also:
      field(int)
    • indexOf

      int indexOf(Field<?> field)
      Get a field's index from this type.
      Parameters:
      field - The field to look for
      Returns:
      The field's 0-based index or -1 if the field is not known to this type.
    • indexOf

      int indexOf(String name)
      Get a field's index from this type.
      Parameters:
      name - The unqualified field name to look for
      Returns:
      The field's 0-based index or -1 if the field is not known to this type.
    • indexOf

      int indexOf(Name name)
      Get a field's index from this type.
      Parameters:
      name - The qualified field name to look for
      Returns:
      The field's 0-based index or -1 if the field is not known to this type.
    • types

      @NotNull @NotNull Class<?>[] types()
      Get an array of field types for fields known to this type.

      Entries in the resulting array correspond to Typed.getType() for the corresponding Field in fields()

    • type

      @Nullable @Nullable Class<?> type(int index)
      Get the field type for a given field index, or null if no field is available at the index.
      Parameters:
      index - The field's 0-based index
    • type

      @Nullable @Nullable Class<?> type(String name)
      Get the field type for a given unqualified field name, or null if no field is known to this type by this name.
      Parameters:
      name - The unqualified field name
    • type

      @Nullable @Nullable Class<?> type(Name name)
      Get the field type for a given qualified field name, or null if no field is known to this type by this name.
      Parameters:
      name - The qualified field name
    • dataTypes

      @NotNull @NotNull DataType<?>[] dataTypes()
      Get an array of field data types for this type.

      Entries in the resulting array correspond to Typed.getDataType() for the corresponding Field in fields()

    • dataType

      @Nullable @Nullable DataType<?> dataType(int index)
      Get the field data type for a given field index, or null if no field is available at the index.
      Parameters:
      index - The field's 0-based index
    • dataType

      @Nullable @Nullable DataType<?> dataType(String name)
      Get the field data type for a given qualified field name, or null if no field is known to this type by this name.
      Parameters:
      name - The qualified field name
    • dataType

      @Nullable @Nullable DataType<?> dataType(Name name)
      Get the field data type for a given qualified field name, or null if no field is known to this type by this name.
      Parameters:
      name - The qualified field name