io.micronaut.data.operations.reactive.ReactorReactiveRepositoryOperations Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micronaut-data-model Show documentation
Show all versions of micronaut-data-model Show documentation
Data Repository Support for Micronaut
The newest version!
/*
* Copyright 2017-2021 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micronaut.data.operations.reactive;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.core.async.annotation.SingleResult;
import io.micronaut.data.model.Page;
import io.micronaut.data.model.runtime.DeleteBatchOperation;
import io.micronaut.data.model.runtime.DeleteOperation;
import io.micronaut.data.model.runtime.InsertBatchOperation;
import io.micronaut.data.model.runtime.InsertOperation;
import io.micronaut.data.model.runtime.PagedQuery;
import io.micronaut.data.model.runtime.PreparedQuery;
import io.micronaut.data.model.runtime.UpdateBatchOperation;
import io.micronaut.data.model.runtime.UpdateOperation;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* The version of {@link ReactiveRepositoryOperations} which exposes reactor publisher types.
*
* @author Denis Stepanov
* @since 3.3.0
*/
public interface ReactorReactiveRepositoryOperations extends ReactiveRepositoryOperations {
@Override
@NonNull
@SingleResult
Mono findOne(@NonNull Class type, @NonNull Object id);
@Override
@NonNull
@SingleResult
Mono exists(@NonNull PreparedQuery preparedQuery);
@Override
@NonNull
@SingleResult
Mono findOne(@NonNull PreparedQuery preparedQuery);
@Override
@NonNull
@SingleResult
Mono findOptional(@NonNull Class type, @NonNull Object id);
@Override
@NonNull
@SingleResult
Mono findOptional(@NonNull PreparedQuery preparedQuery);
@Override
@NonNull
Flux findAll(PagedQuery pagedQuery);
@Override
@NonNull
@SingleResult
Mono count(PagedQuery pagedQuery);
@Override
@NonNull
Flux findAll(@NonNull PreparedQuery preparedQuery);
@Override
@NonNull
@SingleResult
Mono persist(@NonNull InsertOperation operation);
@Override
@NonNull
@SingleResult
Mono update(@NonNull UpdateOperation operation);
@Override
@NonNull
Flux updateAll(@NonNull UpdateBatchOperation operation);
@Override
@NonNull
Flux persistAll(@NonNull InsertBatchOperation operation);
@Override
@NonNull
@SingleResult
Mono executeUpdate(@NonNull PreparedQuery, Number> preparedQuery);
@Override
@NonNull
@SingleResult
Mono executeDelete(@NonNull PreparedQuery, Number> preparedQuery);
@NonNull
@Override
default Flux execute(@NonNull PreparedQuery, R> preparedQuery) {
return Flux.from(ReactiveRepositoryOperations.super.execute(preparedQuery));
}
@Override
@NonNull
@SingleResult
Mono delete(@NonNull DeleteOperation operation);
@Override
@NonNull
@SingleResult
Mono deleteAll(@NonNull DeleteBatchOperation operation);
@Override
@NonNull
@SingleResult
Mono> findPage(@NonNull PagedQuery pagedQuery);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy