Top Description Methods
org.jooq

public Interface Attachable

extends Serializable
Known Direct Subinterfaces
org.jooq.AttachableQueryPart, org.jooq.Routine, org.jooq.Record, org.jooq.Result, org.jooq.Results
Known Direct Implementers
org.jooq.impl.AbstractFormattable
Imports
java.io.Serializable, java.sql.Connection, javax.sql.DataSource, org.jetbrains.annotations.Nullable

An object in jOOQ that can have an underlying Configuration attached or detached.

Detaching an Attachable from its configuration means, that the underlying Connection or DataSource is removed. Attaching an Attachable to a new Configuration means, that its underlying Connection or DataSource will be restored.

Detaching an Attachable will NOT close the underlying Connection or DataSource!

Attachables are also Serializable. The underlying Connection or DataSource is transient. Serialising an Attachable will always detach it first.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public void
attach(Configuration
A configuration or null, if you wish to detach this Attachable from its previous configuration.
configuration
)

Attach this object to a new Configuration.

public @Nullable Configuration
configuration()

Get the currently attached Configuration, or null if no Configuration is attached.

public void
detach()

Detach this object from its current Configuration.

Method Detail

attachback to summary
public void attach(Configuration configuration)

Attach this object to a new Configuration.

Parameters
configuration:Configuration

A configuration or null, if you wish to detach this Attachable from its previous configuration.

configurationback to summary
public @Nullable Configuration configuration()

Get the currently attached Configuration, or null if no Configuration is attached.

Annotations
@Nullable
detachback to summary
public void detach()

Detach this object from its current Configuration.

This is the same as calling attach(null).