-
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable Field<?>
field(int index)
Get a specific field from this UDT.@Nullable Field<?>
field(String name)
Get a specific field from this UDT.<T> @Nullable Field<T>
field(Field<T> field)
Get a specific field from this UDT.@Nullable Field<?>
field(Name name)
Get a specific field from this UDT.@Nullable Field<?>[]
fields()
Get all fields from this UDT.@Nullable Field<?>[]
fields(int... fieldIndexes)
Get all fields from this UDT, providing some field indexes.@Nullable Field<?>[]
fields(String... fieldNames)
Get all fields from this UDT, providing some field names.@Nullable Field<?>[]
fields(Field<?>... fields)
Get all fields from this UDT, providing some fields.@Nullable Field<?>[]
fields(Name... fieldNames)
Get all fields from this UDT, providing some field names.@NotNull Row
fieldsRow()
Get this UDT's fields as aRow
.@NotNull Stream<Field<?>>
fieldStream()
Get this table's fields as aStream
.@NotNull DataType<R>
getDataType()
The UDT's data type as known to the database.@Nullable Package
getPackage()
Get the UDT package.@NotNull Class<R>
getRecordType()
int
indexOf(String fieldName)
Get a field's index from this udt.int
indexOf(Field<?> field)
Get a field's index from this udt.int
indexOf(Name fieldName)
Get a field's index from this udt.boolean
isSQLUsable()
Whether this data type can be used from SQL statements.boolean
isSynthetic()
Whether this data type is a synthetic, structural UDT type.R
newRecord()
Create a newRecord
of this UDT's type.-
Methods inherited from interface org.jooq.Named
getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
Methods inherited from interface org.jooq.Qualified
getCatalog, getSchema
-
-
-
-
Method Detail
-
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.
- See Also:
Row.field(Field)
-
field
@Nullable @Nullable Field<?> field(String name)
Get a specific field from this UDT.- See Also:
Row.field(String)
-
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.
-
newRecord
@NotNull R newRecord()
Create a newRecord
of this UDT's type.- See Also:
DSLContext.newRecord(UDT)
-
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.
- For Oracle
-
-