Module org.jooq
Package org.jooq

Interface UDT<R extends UDTRecord<R>>

  • Type Parameters:
    R - The record type
    All Superinterfaces:
    Named, Qualified, QueryPart, Serializable
    All Known Implementing Classes:
    UDTImpl

    public interface UDT<R extends UDTRecord<R>>
    extends Qualified
    UDT definition.

    Instances of this type cannot be created directly. They are available from generated code.

    Author:
    Lukas Eder
    • Method Detail

      • fieldsRow

        @NotNull
        @NotNull Row fieldsRow()
        Get this UDT's fields as a Row.
      • fieldStream

        @NotNull
        @NotNull Stream<Field<?>> fieldStream()
        Get this table's fields as a Stream.
      • field

        @Nullable
        <T> @Nullable Field<T> field​(Field<T> field)
        Get a specific field from this UDT.

        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.
        See Also:
        Row.field(Field)
      • field

        @Nullable
        @Nullable Field<?> field​(Name name)
        Get a specific field from this UDT.
        See Also:
        Row.field(Name)
      • field

        @Nullable
        @Nullable Field<?> field​(int index)
        Get a specific field from this UDT.
        See Also:
        Row.field(int)
      • fields

        @Nullable
        @Nullable Field<?>[] fields()
        Get all fields from this UDT.
        See Also:
        Row.fields()
      • fields

        @Nullable
        @Nullable Field<?>[] fields​(Field<?>... fields)
        Get all fields from this UDT, providing some fields.
        Returns:
        All available fields
        See Also:
        Row.fields(Field...)
      • fields

        @Nullable
        @Nullable Field<?>[] fields​(String... fieldNames)
        Get all fields from this UDT, providing some field names.
        Returns:
        All available fields
        See Also:
        Row.fields(String...)
      • fields

        @Nullable
        @Nullable Field<?>[] fields​(Name... fieldNames)
        Get all fields from this UDT, providing some field names.
        Returns:
        All available fields
        See Also:
        Row.fields(Name...)
      • fields

        @Nullable
        @Nullable Field<?>[] fields​(int... fieldIndexes)
        Get all fields from this UDT, providing some field indexes.
        Returns:
        All available fields
        See Also:
        Row.fields(int...)
      • indexOf

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

        int indexOf​(String fieldName)
        Get a field's index from this udt.
        Parameters:
        fieldName - The field name to look for
        Returns:
        The field's index or -1 if the field is not contained in this udt.
      • indexOf

        int indexOf​(Name fieldName)
        Get a field's index from this udt.
        Parameters:
        fieldName - The field name to look for
        Returns:
        The field's index or -1 if the field is not contained in this udt
      • getPackage

        @Nullable
        @Nullable Package getPackage()
        Get the UDT package.
      • getRecordType

        @NotNull
        @NotNull Class<R> getRecordType()
        Returns:
        The record type produced by this table.
      • getDataType

        @NotNull
        @NotNull DataType<R> getDataType()
        The UDT's data type as known to the database.
      • isSQLUsable

        boolean isSQLUsable()
        Whether this data type can be used from SQL statements.
      • isSynthetic

        boolean isSynthetic()
        Whether this data type is a synthetic, structural UDT type.

        This is true for example:

        • For Oracle TAB%ROWTYPE references, which are synthetic PL/SQL RECORD types in PL/SQL.