public interface VertxDAO<R extends org.jooq.UpdatableRecord<R>,P extends VertxPojo,T>
extends org.jooq.DAO<R,P,T>
| Modifier and Type | Method and Description |
|---|---|
AsyncJooqSQLClient |
client() |
default CompletableFuture<Long> |
countAsync()
Count all records of the underlying table asynchronously.
|
default <Z> CompletableFuture<Integer> |
deleteExecAsync(org.jooq.Condition condition)
Performs an async
DELETE statement for a given condition and passes the number of affected rows
to the returned CompletableFuture. |
default <Z> CompletableFuture<Integer> |
deleteExecAsync(org.jooq.Field<Z> field,
Z value)
Performs an async
DELETE statement for a given field and value and passes the number of affected rows
to the returned CompletableFuture. |
default CompletableFuture<Integer> |
deleteExecAsync(T id)
Performs an async
DELETE statement for a given key and passes the number of affected rows
to the returned CompletableFuture. |
default CompletableFuture<Boolean> |
existsByIdAsync(T id)
Checks if a given ID exists asynchronously
|
default CompletableFuture<List<P>> |
fetchAsync(org.jooq.Condition condition)
Find records by a given condition asynchronously.
|
default <Z> CompletableFuture<List<P>> |
fetchAsync(org.jooq.Field<Z> field,
Collection<Z> values)
Find records by a given field and a set of values asynchronously.
|
default <Z> CompletableFuture<P> |
fetchOneAsync(org.jooq.Condition condition)
Find a unique record by a given condition asynchronously.
|
default <Z> CompletableFuture<P> |
fetchOneAsync(org.jooq.Field<Z> field,
Z value)
Find a unique record by a given field and a value asynchronously.
|
default <Z> CompletableFuture<Optional<P>> |
fetchOptionalAsync(org.jooq.Field<Z> field,
Z value)
Find a unique record by a given field and a value asynchronously.
|
default CompletableFuture<List<P>> |
findAllAsync()
Find all records of the underlying table asynchronously.
|
default CompletableFuture<P> |
findByIdAsync(T id)
Find a record of the underlying table by ID asynchronously.
|
default CompletableFuture<Integer> |
insertExecAsync(P object)
Performs an async
INSERT statement for a given POJO and passes the number of affected rows
to the resultHandler. |
default CompletableFuture<T> |
insertReturningPrimaryAsync(P object)
Performs an async
INSERT statement for a given POJO and passes the primary key
to the resultHandler. |
Function<io.vertx.core.json.JsonObject,P> |
jsonMapper() |
void |
setClient(AsyncJooqSQLClient client) |
default CompletableFuture<Integer> |
updateExecAsync(P object)
Performs an async
UPDATE statement for a given POJO and passes the number of affected rows
to the resultHandler. |
AsyncJooqSQLClient client()
void setClient(AsyncJooqSQLClient client)
Function<io.vertx.core.json.JsonObject,P> jsonMapper()
JsonObject to a Pojo. Usually just the constructor.default CompletableFuture<Boolean> existsByIdAsync(T id)
id - The ID whose existence is checkedDataAccessException if the blocking method of this type throws an exceptionDAO.existsById(Object)default CompletableFuture<Long> countAsync()
DataAccessException if the blocking method of this type throws an exceptionDAO.count()default CompletableFuture<List<P>> findAllAsync()
DataAccessException if the blocking method of this type throws an exceptionDAO.findAll()default CompletableFuture<P> findByIdAsync(T id)
id - The ID of a record in the underlying tableDataAccessException if the blocking method of this type throws an exceptionDAO.findById(Object)default <Z> CompletableFuture<P> fetchOneAsync(org.jooq.Field<Z> field, Z value)
field - The field to compare value againstvalue - The accepted valueDataAccessException if the blocking method of this type throws an exceptionDAO.fetchOne(Field, Object)default <Z> CompletableFuture<P> fetchOneAsync(org.jooq.Condition condition)
condition - The condition to look for this valueDataAccessException if the blocking method of this type throws an exception,
e.g. when more than one result is returned.default <Z> CompletableFuture<Optional<P>> fetchOptionalAsync(org.jooq.Field<Z> field, Z value)
field - The field to compare value againstvalue - The accepted valueDataAccessException if the blocking method of this type throws an exceptionDAO.fetchOptional(Field, Object)default <Z> CompletableFuture<List<P>> fetchAsync(org.jooq.Field<Z> field, Collection<Z> values)
field - The field to compare values againstvalues - The accepted valuesDataAccessException if the blocking method of this type throws an exceptiondefault CompletableFuture<List<P>> fetchAsync(org.jooq.Condition condition)
condition - the condition to fetch the valuesDataAccessException if the blocking method of this type throws an exceptiondefault CompletableFuture<Integer> deleteExecAsync(T id)
DELETE statement for a given key and passes the number of affected rows
to the returned CompletableFuture.id - The key to be deletedDataAccessException if the blocking method of this type throws an exceptiondefault <Z> CompletableFuture<Integer> deleteExecAsync(org.jooq.Condition condition)
DELETE statement for a given condition and passes the number of affected rows
to the returned CompletableFuture.condition - The condition for the delete queryDataAccessException if the blocking method of this type throws an exceptiondefault <Z> CompletableFuture<Integer> deleteExecAsync(org.jooq.Field<Z> field, Z value)
DELETE statement for a given field and value and passes the number of affected rows
to the returned CompletableFuture.Z - field - the fieldvalue - the valueDataAccessException if the blocking method of this type throws an exceptiondefault CompletableFuture<Integer> updateExecAsync(P object)
UPDATE statement for a given POJO and passes the number of affected rows
to the resultHandler.object - The POJO to be updatedDataAccessException if the blocking method of this type throws an exceptiondefault CompletableFuture<Integer> insertExecAsync(P object)
INSERT statement for a given POJO and passes the number of affected rows
to the resultHandler.object - The POJO to be insertedDataAccessException if the blocking method of this type throws an exceptiondefault CompletableFuture<T> insertReturningPrimaryAsync(P object)
INSERT statement for a given POJO and passes the primary key
to the resultHandler. When the value could not be inserted, the resultHandler
will fail.object - The POJO to be insertedCopyright © 2017. All rights reserved.