Interface AsyncCriteriaRepositoryOperations

All Superinterfaces:
AsyncCriteriaCapableRepository
All Known Implementing Classes:
ExecutorAsyncOperationsSupportingCriteria

public interface AsyncCriteriaRepositoryOperations extends AsyncCriteriaCapableRepository
The repository operations that support executing criteria queries.
Since:
4.5.0
Author:
Denis Stepanov
  • Method Details

    • async

      Specified by:
      async in interface AsyncCriteriaCapableRepository
      Returns:
      The async operations.
    • getCriteriaBuilder

      jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
      Returns:
      The criteria builder
    • findOne

      <R> CompletionStage<R> findOne(@NonNull @NonNull jakarta.persistence.criteria.CriteriaQuery<R> query)
      Find one by Query.
      Type Parameters:
      R - The result type
      Parameters:
      query - The query
      Returns:
      A result or null
    • findAll

      <T> CompletionStage<List<T>> findAll(@NonNull @NonNull jakarta.persistence.criteria.CriteriaQuery<T> query)
      Finds all results for the given query.
      Type Parameters:
      T - The generic type
      Parameters:
      query - The query
      Returns:
      An iterable result
    • findAll

      <T> CompletionStage<List<T>> findAll(@NonNull @NonNull jakarta.persistence.criteria.CriteriaQuery<T> query, int offset, int limit)
      Finds all results for the given query.
      Type Parameters:
      T - The generic type
      Parameters:
      query - The query
      offset - The offset
      limit - The limit
      Returns:
      An iterable result
    • updateAll

      CompletionStage<Number> updateAll(@NonNull @NonNull jakarta.persistence.criteria.CriteriaUpdate<Number> query)
      Executes an update for the given query and parameter values. If it is possible to return the number of objects updated, then do so.
      Parameters:
      query - The prepared query
      Returns:
      An optional number with the count of the number of records updated
    • deleteAll

      CompletionStage<Number> deleteAll(@NonNull @NonNull jakarta.persistence.criteria.CriteriaDelete<Number> query)
      Executes a delete for the given query and parameter values. If it is possible to return the number of objects deleted, then do so.
      Parameters:
      query - The query
      Returns:
      An optional number with the count of the number of records updated