[jOOQ/jOOQ#12875] Annotate all blocking execution methods with org.jetbrains.annotations.Blocking
This commit is contained in:
parent
b9b9b2c801
commit
efcf5676d4
@ -44,6 +44,7 @@ import java.util.concurrent.Executor;
|
||||
|
||||
import org.jooq.exception.DataAccessException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -75,6 +76,7 @@ public interface Batch extends Serializable, Publisher<Integer> {
|
||||
* @see Statement#executeBatch()
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Blocking
|
||||
int @NotNull [] execute() throws DataAccessException;
|
||||
|
||||
/**
|
||||
|
||||
@ -52,6 +52,7 @@ import org.jooq.exception.DataAccessException;
|
||||
import org.jooq.exception.MappingException;
|
||||
import org.jooq.impl.DefaultRecordMapper;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -78,6 +79,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @param <R> The cursor's record type
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@Blocking
|
||||
public interface Cursor<R extends Record> extends Fields, Iterable<R>, Formattable, AutoCloseable {
|
||||
|
||||
/**
|
||||
|
||||
@ -63,6 +63,7 @@ import java.util.Optional;
|
||||
import org.jooq.conf.Settings;
|
||||
import org.jooq.exception.DataAccessException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -79,6 +80,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* <code><T></code> type for single-column keys, or a
|
||||
* {@link Record} subtype for composite keys.
|
||||
*/
|
||||
@Blocking
|
||||
public interface DAO<R extends TableRecord<R>, P, T> {
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,7 @@ import java.util.List;
|
||||
|
||||
import org.jooq.exception.DataAccessException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -98,6 +99,7 @@ public interface ForeignKey<R extends Record, O extends Record> extends Key<R> {
|
||||
* @see TableRecord#fetchParent(ForeignKey)
|
||||
*/
|
||||
@Nullable
|
||||
@Blocking
|
||||
O fetchParent(R record) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -111,6 +113,7 @@ public interface ForeignKey<R extends Record, O extends Record> extends Key<R> {
|
||||
* @see TableRecord#fetchParent(ForeignKey)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
Result<O> fetchParents(R... records) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -124,6 +127,7 @@ public interface ForeignKey<R extends Record, O extends Record> extends Key<R> {
|
||||
* @see TableRecord#fetchParent(ForeignKey)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
Result<O> fetchParents(Collection<? extends R> records) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -137,6 +141,7 @@ public interface ForeignKey<R extends Record, O extends Record> extends Key<R> {
|
||||
* @see UpdatableRecord#fetchChildren(ForeignKey)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
Result<R> fetchChildren(O record) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -151,6 +156,7 @@ public interface ForeignKey<R extends Record, O extends Record> extends Key<R> {
|
||||
* @see UpdatableRecord#fetchChildren(ForeignKey)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
Result<R> fetchChildren(O... records) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -165,6 +171,7 @@ public interface ForeignKey<R extends Record, O extends Record> extends Key<R> {
|
||||
* @see UpdatableRecord#fetchChildren(ForeignKey)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
Result<R> fetchChildren(Collection<? extends O> records) throws DataAccessException;
|
||||
|
||||
/**
|
||||
|
||||
@ -77,5 +77,6 @@ public interface LoaderLoadStep<R extends Record> {
|
||||
*/
|
||||
@NotNull @CheckReturnValue
|
||||
@Support
|
||||
@Blocking
|
||||
Loader<R> execute() throws IOException;
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ package org.jooq;
|
||||
import org.jooq.exception.DataMigrationException;
|
||||
import org.jooq.exception.DataMigrationValidationException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -83,5 +84,6 @@ public interface Migration extends Scope {
|
||||
* @throws DataMigrationException When something went wrong during the
|
||||
* application of the migration.
|
||||
*/
|
||||
@Blocking
|
||||
void execute() throws DataMigrationException;
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ import org.jooq.exception.DetachedException;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.QOM.UnmodifiableList;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -113,6 +114,7 @@ public interface Queries extends AttachableQueryPart, Iterable<Query> {
|
||||
* {@link #queries()} is also unattached.
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
Results fetchMany();
|
||||
|
||||
/**
|
||||
@ -126,6 +128,7 @@ public interface Queries extends AttachableQueryPart, Iterable<Query> {
|
||||
* unattached.
|
||||
* @see DSLContext#batch(Queries)
|
||||
*/
|
||||
@Blocking
|
||||
int @NotNull [] executeBatch();
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -47,6 +47,7 @@ import org.jooq.exception.DataAccessException;
|
||||
import org.jooq.exception.DataTypeException;
|
||||
import org.jooq.impl.DSL;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -74,6 +75,7 @@ public interface Query extends Statement, AttachableQueryPart, AutoCloseable {
|
||||
* </ul>
|
||||
* @throws DataAccessException If anything goes wrong in the database
|
||||
*/
|
||||
@Blocking
|
||||
int execute() throws DataAccessException;
|
||||
|
||||
/**
|
||||
|
||||
@ -53,6 +53,7 @@ import org.jooq.exception.InvalidResultException;
|
||||
import org.jooq.exception.MappingException;
|
||||
import org.jooq.impl.DefaultRecordMapper;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -3183,6 +3184,7 @@ public interface Result<R extends Record> extends Fields, List<R>, Attachable, F
|
||||
* @see ForeignKey#fetchParents(Record...)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
<O extends UpdatableRecord<O>> Result<O> fetchParents(ForeignKey<R, O> key) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -3195,6 +3197,7 @@ public interface Result<R extends Record> extends Fields, List<R>, Attachable, F
|
||||
* @see ForeignKey#fetchChildren(Record...)
|
||||
*/
|
||||
@NotNull
|
||||
@Blocking
|
||||
<O extends TableRecord<O>> Result<O> fetchChildren(ForeignKey<O, R> key) throws DataAccessException;
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -41,6 +41,7 @@ import java.util.List;
|
||||
|
||||
import org.jooq.exception.DataAccessException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -157,6 +158,7 @@ public interface Routine<T> extends Qualified, Attachable {
|
||||
*
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Blocking
|
||||
int execute(Configuration configuration) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -164,6 +166,7 @@ public interface Routine<T> extends Qualified, Attachable {
|
||||
*
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Blocking
|
||||
int execute() throws DataAccessException;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -42,6 +42,7 @@ import java.util.Collection;
|
||||
import org.jooq.conf.Settings;
|
||||
import org.jooq.exception.DataAccessException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -117,6 +118,7 @@ public interface TableRecord<R extends TableRecord<R>> extends QualifiedRecord<R
|
||||
*/
|
||||
@Nullable
|
||||
@Support
|
||||
@Blocking
|
||||
<O extends UpdatableRecord<O>> O fetchParent(ForeignKey<R, O> key) throws DataAccessException;
|
||||
|
||||
/**
|
||||
|
||||
@ -68,6 +68,7 @@ import org.jooq.exception.DataChangedException;
|
||||
import org.jooq.exception.NoDataFoundException;
|
||||
import org.jooq.exception.TooManyRowsException;
|
||||
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -604,6 +605,7 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
|
||||
*/
|
||||
@Nullable
|
||||
@Support
|
||||
@Blocking
|
||||
<O extends TableRecord<O>> O fetchChild(ForeignKey<O, R> key) throws TooManyRowsException, DataAccessException;
|
||||
|
||||
/**
|
||||
@ -619,6 +621,7 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
@Blocking
|
||||
<O extends TableRecord<O>> Result<O> fetchChildren(ForeignKey<O, R> key) throws DataAccessException;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user