Module org.jooq
Package org.jooq

Interface UDT<R extends UDTRecord<R>>

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

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

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

    Author:
    Lukas Eder
    • Method Detail

      • fieldsRow

        Row fieldsRow()
        Get this UDT's fields as a Row.
      • field

        <T> 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

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

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

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

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

        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
      • getCatalog

        Catalog getCatalog()
        Get the UDT catalog.
      • getSchema

        Schema getSchema()
        Get the UDT schema.
      • getPackage

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

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

        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.