ReactivePanacheMongoCompanionBase

Define persistence and query methods for an Entity with a type of Id

Parameters

Entity

the entity type

Id

the ID type

Inheritors

Functions

Link copied to clipboard
@GenerateBridge
open fun count(): Uni<Long>

Counts the number of this type of entity in the database.

@GenerateBridge
open fun count(query: Document): Uni<Long>

Counts the number of this type of entity matching the given query

@GenerateBridge
open fun count(query: String, params: Parameters): Uni<Long>
@GenerateBridge
open fun count(query: String, params: Map<String, Any?>): Uni<Long>

Counts the number of this type of entity matching the given query, with named parameters.

@GenerateBridge
open fun count(query: String, vararg params: Any?): Uni<Long>

Counts the number of this type of entity matching the given query, with optional indexed parameters.

Link copied to clipboard
@GenerateBridge
open fun delete(query: Document): Uni<Long>

Delete all entities of this type matching the given query

@GenerateBridge
open fun delete(query: String, params: Parameters): Uni<Long>
@GenerateBridge
open fun delete(query: String, params: Map<String, Any?>): Uni<Long>

Delete all entities of this type matching the given query, with named parameters.

@GenerateBridge
open fun delete(query: String, vararg params: Any?): Uni<Long>

Delete all entities of this type matching the given query, with optional indexed parameters.

Link copied to clipboard
@GenerateBridge
open fun deleteAll(): Uni<Long>

Delete all entities of this type from the database.

Link copied to clipboard
@GenerateBridge
open fun deleteById(id: Id): Uni<Boolean>

Delete an entity of this type by ID.

Link copied to clipboard
@GenerateBridge
open fun find(query: Document): ReactivePanacheQuery<Entity>

Find entities using a BSON query.

@GenerateBridge
open fun find(query: String, params: Parameters): ReactivePanacheQuery<Entity>
@GenerateBridge
open fun find(query: String, params: Map<String, Any?>): ReactivePanacheQuery<Entity>

Find entities using a query, with named parameters.

@GenerateBridge
open fun find(query: String, vararg params: Any?): ReactivePanacheQuery<Entity>

Find entities using a query, with optional indexed parameters.

@GenerateBridge
open fun find(query: Document, sort: Document): ReactivePanacheQuery<Entity>

Find entities using a BSON query and a BSON sort.

@GenerateBridge
open fun find(query: String, sort: Sort, params: Parameters): ReactivePanacheQuery<Entity>
@GenerateBridge
open fun find(query: String, sort: Sort, params: Map<String, Any?>): ReactivePanacheQuery<Entity>

Find entities using a query and the given sort options, with named parameters.

@GenerateBridge
open fun find(query: String, sort: Sort, vararg params: Any?): ReactivePanacheQuery<Entity>

Find entities using a query and the given sort options, with optional indexed parameters.

Link copied to clipboard
@GenerateBridge
open fun findAll(): ReactivePanacheQuery<Entity>

Find all entities of this type.

@GenerateBridge
open fun findAll(sort: Sort): ReactivePanacheQuery<Entity>

Find all entities of this type, in the given order.

Link copied to clipboard
@GenerateBridge
open fun findById(id: Id): Uni<Entity?>

Find an entity of this type by ID.

Link copied to clipboard
@GenerateBridge
open fun list(query: Document): Uni<List<Entity>>

Find entities using a BSON query. This method is a shortcut for find(query).list().

@GenerateBridge
open fun list(query: String, params: Parameters): Uni<List<Entity>>
@GenerateBridge
open fun list(query: String, params: Map<String, Any?>): Uni<List<Entity>>

Find entities matching a query, with named parameters. This method is a shortcut for find(query, params).list().

@GenerateBridge
open fun list(query: String, vararg params: Any?): Uni<List<Entity>>

Find entities matching a query, with optional indexed parameters. This method is a shortcut for find(query, params).list().

@GenerateBridge
open fun list(query: Document, sort: Document): Uni<List<Entity>>

Find entities using a BSON query and a BSON sort. This method is a shortcut for find(query, sort).list().

@GenerateBridge
open fun list(query: String, sort: Sort, params: Parameters): Uni<List<Entity>>
@GenerateBridge
open fun list(query: String, sort: Sort, params: Map<String, Any?>): Uni<List<Entity>>

Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for find(query, sort, params).list().

@GenerateBridge
open fun list(query: String, sort: Sort, vararg params: Any?): Uni<List<Entity>>

Find entities matching a query and the given sort options, with optional indexed parameters. This method is a shortcut for find(query, sort, params).list().

Link copied to clipboard
@GenerateBridge
open fun listAll(): Uni<List<Entity>>

Find all entities of this type. This method is a shortcut for findAll().list().

@GenerateBridge
open fun listAll(sort: Sort): Uni<List<Entity>>

Find all entities of this type, in the given order. This method is a shortcut for findAll(sort).list().

Link copied to clipboard
@GenerateBridge
open fun mongoCollection(): ReactiveMongoCollection<Entity>

Allow to access the underlying Mongo Collection.

Link copied to clipboard
@GenerateBridge
open fun mongoDatabase(): ReactiveMongoDatabase

Allow to access the underlying Mongo Database.

Link copied to clipboard
open fun persist(entities: Stream<Entity>): Uni<Void>
open fun persist(entities: Iterable<Entity>): Uni<Void>
open fun persist(firstEntity: Entity, vararg entities: Entity): Uni<Void>

Insert all given entities.

Link copied to clipboard
open fun persistOrUpdate(entities: Stream<Entity>): Uni<Void>
open fun persistOrUpdate(firstEntity: Entity, vararg entities: Entity): Uni<Void>

Persist all given entities.

open fun persistOrUpdate(entities: Iterable<Entity>): Uni<Void>

Persist all given entities or update them if they already exist.

Link copied to clipboard
@GenerateBridge
open fun stream(query: Document): Multi<Entity>

Find entities using a BSON query. This method is a shortcut for find(query).stream().

@GenerateBridge
open fun stream(query: String, params: Parameters): Multi<Entity>
@GenerateBridge
open fun stream(query: String, params: Map<String, Any?>): Multi<Entity>

Find entities matching a query, with named parameters. This method is a shortcut for find(query, params).stream().

@GenerateBridge
open fun stream(query: String, vararg params: Any?): Multi<Entity>

Find entities matching a query, with optional indexed parameters. This method is a shortcut for find(query, params).stream().

@GenerateBridge
open fun stream(query: Document, sort: Document): Multi<Entity>

Find entities using a BSON query and a BSON sort. This method is a shortcut for find(query, sort).stream().

@GenerateBridge
open fun stream(query: String, sort: Sort, params: Parameters): Multi<Entity>
@GenerateBridge
open fun stream(query: String, sort: Sort, params: Map<String, Any?>): Multi<Entity>

Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for find(query, sort, params).stream().

@GenerateBridge
open fun stream(query: String, sort: Sort, vararg params: Any?): Multi<Entity>

Find entities matching a query and the given sort options, with optional indexed parameters. This method is a shortcut for find(query, sort, params).stream().

Link copied to clipboard
@GenerateBridge
open fun streamAll(): Multi<Entity>

Find all entities of this type. This method is a shortcut for findAll().stream().

@GenerateBridge
open fun streamAll(sort: Sort): Multi<Entity>

Find all entities of this type, in the given order. This method is a shortcut for findAll(sort).stream().

Link copied to clipboard
open fun update(entities: Stream<Entity>): Uni<Void>
open fun update(entities: Iterable<Entity>): Uni<Void>
open fun update(firstEntity: Entity, vararg entities: Entity): Uni<Void>

Update all given entities.

@GenerateBridge
open fun update(update: Document): ReactivePanacheUpdate

Update all entities of this type by the given BSON update document. The returned io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate object will allow to restrict on which document the update should be applied.

@GenerateBridge
open fun update(update: String, params: Parameters): ReactivePanacheUpdate
@GenerateBridge
open fun update(update: String, params: Map<String, Any?>): ReactivePanacheUpdate

Update all entities of this type by the given update document, with named parameters. The returned io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate object will allow to restrict on which document the update should be applied.

@GenerateBridge
open fun update(update: String, vararg params: Any?): ReactivePanacheUpdate

Update all entities of this type by the given update document, with optional indexed parameters. The returned io.quarkus.mongodb.panache.common.reactive.ReactivePanacheUpdate object will allow to restrict on which document the update should be applied.