Top Description Methods
org.jooq

public Interface EnumType

Imports
org.jetbrains.annotations.NotNull, .Nullable

A SQL enum type. This can be any of the following:

Client code should not assume that the actual enum reference is a Java Enum. In Scala, for instance, enums are not idiomatic, and jOOQ implements them differently. In any case, this EnumType API is implemented by generated database enums.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public default @Nullable Catalog
getCatalog()

The catalog of the enum type, if applicable.

public @NotNull String
getLiteral()

The literal as defined in the database

public @Nullable String
getName()

The type name as registered in the database, if applicable (Postgres schema-scope enum type only).

public default @Nullable Schema
getSchema()

The schema of the enum type, if applicable (Postgres schema-scope enum type only).

public static <E extends Enum<E> & EnumType> E
lookupLiteral(Class<E> enumType, String literal)

Look up an EnumType value by its EnumType#getLiteral().

Method Detail

getCatalogback to summary
public default @Nullable Catalog getCatalog()

The catalog of the enum type, if applicable. Otherwise, this returns null

Annotations
@Nullable
getLiteralback to summary
public @NotNull String getLiteral()

The literal as defined in the database

Annotations
@NotNull
getNameback to summary
public @Nullable String getName()

The type name as registered in the database, if applicable (Postgres schema-scope enum type only). Otherwise, this returns null

Annotations
@Nullable
getSchemaback to summary
public default @Nullable Schema getSchema()

The schema of the enum type, if applicable (Postgres schema-scope enum type only). Otherwise, this returns null

Annotations
@Nullable
lookupLiteralback to summary
public static <E extends Enum<E> & EnumType> E lookupLiteral(Class<E> enumType, String literal)

Look up an EnumType value by its EnumType#getLiteral().

This is similar to Enum#valueOf(Class, String), but uses EnumType#getLiteral() (the database enum value) as a lookup key instead of Enum#name() (the generated Java value), and returns null if the literal wasn't found.

Annotations
@Nullable