Top Inners Fields Constructors Methods
org.jooq.impl

pack-priv final Class BatchCRUD

extends AbstractBatch
Class Inheritance
Static Imports
org.jooq.conf.SettingsTools.executeStaticStatements

Author
Lukas Eder

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum
BatchCRUD.Action

The action to be performed by this operation.

private static class
BatchCRUD.QueryCollector

Collect queries

The query collector intercepts query execution after rendering.

private static class
BatchCRUD.QueryCollectorSignal

A query execution interception signal.

Field Summary

Modifier and TypeField and Description
private final BatchCRUD.Action
private static final JooqLogger
private final TableRecord<?>[]
Inherited from org.jooq.impl.AbstractBatch:
configurationdsl

Constructor Summary

AccessConstructor and Description
pack-priv
BatchCRUD(Configuration configuration, BatchCRUD.Action action, TableRecord<?>[] records)

Method Summary

Modifier and TypeMethod and Description
private final Configuration
public final int[]
execute()

Implements org.jooq.Batch.execute.

Execute the batch operation.
private final void
private final int[]
private final int[]
public final int
size()

Implements org.jooq.Batch.size.

Get the number of executed queries in this batch operation
public void
subscribe(Subscriber<? super Integer>
the Subscriber that will consume signals from this Publisher
s
)

Implements org.reactivestreams.Publisher.subscribe.

Request Publisher to start streaming data.
private final void
Inherited from org.jooq.impl.AbstractBatch:
executeAsyncexecuteAsync

Field Detail

actionback to summary
private final BatchCRUD.Action action
logback to summary
private static final JooqLogger log
recordsback to summary
private final TableRecord<?>[] records

Constructor Detail

BatchCRUDback to summary
pack-priv BatchCRUD(Configuration configuration, BatchCRUD.Action action, TableRecord<?>[] records)

Method Detail

deriveConfigurationback to summary
private final Configuration deriveConfiguration(BatchCRUD.QueryCollector collector)
executeback to summary
public final int[] execute() throws DataAccessException

Implements org.jooq.Batch.execute.

Doc from org.jooq.Batch.execute.

Execute the batch operation.

Annotations
@Override
Exceptions
DataAccessException:
if something went wrong executing the query
executeActionback to summary
private final void executeAction(int i)
executePreparedback to summary
private final int[] executePrepared()
executeStaticback to summary
private final int[] executeStatic()
sizeback to summary
public final int size()

Implements org.jooq.Batch.size.

Doc from org.jooq.Batch.size.

Get the number of executed queries in this batch operation

Annotations
@Override
subscribeback to summary
public void subscribe(Subscriber<? super Integer> s)

Implements org.reactivestreams.Publisher.subscribe.

Doc from org.reactivestreams.Publisher.subscribe.

Request Publisher to start streaming data.

This is a "factory method" and can be called multiple times, each time starting a new Subscription.

Each Subscription will work for only a single Subscriber.

A Subscriber should only subscribe once to a single Publisher.

If the Publisher rejects the subscription attempt or otherwise fails it will signal the error via Subscriber#onError(Throwable).

Parameters
s:Subscriber<? super Integer>

the Subscriber that will consume signals from this Publisher

Annotations
@Override
updateChangedFlagback to summary
private final void updateChangedFlag()
org.jooq.impl back to summary

pack-priv final Enum BatchCRUD.Action

extends Enum<BatchCRUD.Action>
Class Inheritance

The action to be performed by this operation.

Field Summary

Modifier and TypeField and Description
public static final BatchCRUD.Action
public static final BatchCRUD.Action
public static final BatchCRUD.Action
public static final BatchCRUD.Action
public static final BatchCRUD.Action

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BatchCRUD.Action
public static BatchCRUD.Action[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DELETEback to summary
public static final BatchCRUD.Action DELETE

Corresponds to UpdatableRecord#delete().

INSERTback to summary
public static final BatchCRUD.Action INSERT

Corresponds to UpdatableRecord#insert().

MERGEback to summary
public static final BatchCRUD.Action MERGE

Corresponds to UpdatableRecord#merge().

STOREback to summary
public static final BatchCRUD.Action STORE

Corresponds to UpdatableRecord#store().

UPDATEback to summary
public static final BatchCRUD.Action UPDATE

Corresponds to UpdatableRecord#update().

Constructor Detail

Actionback to summary
private Action()

Method Detail

valueOfback to summary
public static BatchCRUD.Action valueOf(String name)
valuesback to summary
public static BatchCRUD.Action[] values()
org.jooq.impl back to summary

private Class BatchCRUD.QueryCollector

extends Object
implements ExecuteListener
Class Inheritance
All Implemented Interfaces
org.jooq.ExecuteListener, java.io.Serializable, java.util.EventListener

Collect queries

The query collector intercepts query execution after rendering. This allows for rendering SQL according to the specific logic contained in TableRecords without actually executing that SQL

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
renderEnd(ExecuteContext
The context containing information about the execution.
ctx
)

Overrides default org.jooq.ExecuteListener.renderEnd.

Called after rendering SQL from a QueryPart.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

QueryCollectorback to summary
private QueryCollector()

Method Detail

renderEndback to summary
public void renderEnd(ExecuteContext ctx)

Overrides default org.jooq.ExecuteListener.renderEnd.

Doc from org.jooq.ExecuteListener.renderEnd.

Called after rendering SQL from a QueryPart.

Available attributes from ExecuteContext:

Overridable attributes in ExecuteContext:

Parameters
ctx:ExecuteContext

The context containing information about the execution.

Annotations
@Override
org.jooq.impl back to summary

private Class BatchCRUD.QueryCollectorSignal

extends ControlFlowSignal
Class Inheritance

A query execution interception signal.

This exception is used as a signal for jOOQ's internals to abort query execution, and return generated SQL back to batch execution.

Field Summary

Modifier and TypeField and Description
private final Query
private final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Query
pack-priv String
Inherited from org.jooq.exception.ControlFlowSignal:
fillInStackTrace

Field Detail

queryback to summary
private final Query query
sqlback to summary
private final String sql

Constructor Detail

QueryCollectorSignalback to summary
pack-priv QueryCollectorSignal(String sql, Query query)

Method Detail

getQueryback to summary
pack-priv Query getQuery()
getSQLback to summary
pack-priv String getSQL()