Top Description Methods
org.jooq

public Interface Generator<R extends org.jooq.Record, X extends org.jooq.Table<R>, T>

extends Function<GeneratorContext<R extends Record, X extends Table<R>, T>, Field<T>>, Serializable
Known Direct Implementers
org.jooq.impl.DefaultGenerator
Annotations
@FunctionalInterface
Imports
java.io.Serializable, java.util.function.Function, org.jooq.impl.QOM.GenerationLocation, .QOM.GenerationOption

A generator can be used with DataType#generatedAlwaysAs(Generator) to implement dynamic, client side computed columns, i.e. computed columns with GenerationLocation#CLIENT.

There are two types of client side computed columns:

Depending on the type of client side computed column, the exact time when the computation is performed may differ, practically. It is not specified, when it happens, but users may assume that it happens only once per query rendering and Field expression which references a Generator, independently of how many times the resulting expression is repeated in the resulting SQL query.

This API is part of a commercial only feature. To use this feature, please use the jOOQ Professional Edition or the jOOQ Enterprise Edition.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public default boolean
supports(GeneratorStatementType
The statement type.
statementType
)

Whether this generator supports a given statement type.

Inherited from java.util.function.Function:
andThenapplycomposeidentity

Method Detail

supportsback to summary
public default boolean supports(GeneratorStatementType statementType)

Whether this generator supports a given statement type.

Implementations may choose to deactivate themselves for some statement types, e.g. if they want to be invoked only for GeneratorStatementType#INSERT.

Parameters
statementType:GeneratorStatementType

The statement type.