-
public interface ReactivePanacheMongoCompanionBase<Entity extends ReactivePanacheMongoEntityBase, Id extends Object>Define persistence and query methods for an Entity with a type of Id
-
-
Method Summary
Modifier and Type Method Description Uni<Entity>findById(Id id)Find an entity of this type by ID. ReactivePanacheQuery<Entity>find(String query, Object params)Find entities using a query, with optional indexed parameters. ReactivePanacheQuery<Entity>find(String query, Sort sort, Object params)Find entities using a query and the given sort options, with optional indexed parameters. ReactivePanacheQuery<Entity>find(String query, Map<String, Object> params)Find entities using a query, with named parameters. ReactivePanacheQuery<Entity>find(String query, Sort sort, Map<String, Object> params)Find entities using a query and the given sort options, with named parameters. ReactivePanacheQuery<Entity>find(String query, Parameters params)Find entities using a query, with named parameters. ReactivePanacheQuery<Entity>find(String query, Sort sort, Parameters params)Find entities using a query and the given sort options, with named parameters. ReactivePanacheQuery<Entity>find(Document query)Find entities using a BSON query. ReactivePanacheQuery<Entity>find(Document query, Document sort)Find entities using a a BSON query and a BSON sort. ReactivePanacheQuery<Entity>findAll()Find all entities of this type. ReactivePanacheQuery<Entity>findAll(Sort sort)Find all entities of this type, in the given order. Uni<List<Entity>>list(String query, Object params)Find entities matching a query, with optional indexed parameters. Uni<List<Entity>>list(String query, Sort sort, Object params)Find entities matching a query and the given sort options, with optional indexed parameters. Uni<List<Entity>>list(String query, Map<String, Object> params)Find entities matching a query, with named parameters. Uni<List<Entity>>list(String query, Sort sort, Map<String, Object> params)Find entities matching a query and the given sort options, with named parameters. Uni<List<Entity>>list(String query, Parameters params)Find entities matching a query, with named parameters. Uni<List<Entity>>list(String query, Sort sort, Parameters params)Find entities matching a query and the given sort options, with named parameters. Uni<List<Entity>>list(Document query)Find entities using a BSON query. Uni<List<Entity>>list(Document query, Document sort)Find entities using a a BSON query and a BSON sort. Uni<List<Entity>>listAll()Find all entities of this type. Uni<List<Entity>>listAll(Sort sort)Find all entities of this type, in the given order. Multi<Entity>stream(String query, Object params)Find entities matching a query, with optional indexed parameters. Multi<Entity>stream(String query, Sort sort, Object params)Find entities matching a query and the given sort options, with optional indexed parameters. Multi<Entity>stream(String query, Map<String, Object> params)Find entities matching a query, with named parameters. Multi<Entity>stream(String query, Sort sort, Map<String, Object> params)Find entities matching a query and the given sort options, with named parameters. Multi<Entity>stream(String query, Parameters params)Find entities matching a query, with named parameters. Multi<Entity>stream(String query, Sort sort, Parameters params)Find entities matching a query and the given sort options, with named parameters. Multi<Entity>stream(Document query)Find entities using a BSON query. Multi<Entity>stream(Document query, Document sort)Find entities using a a BSON query and a BSON sort. Multi<Entity>streamAll()Find all entities of this type. Multi<Entity>streamAll(Sort sort)Find all entities of this type, in the given order. Uni<Long>count()Counts the number of this type of entity in the database. Uni<Long>count(String query, Object params)Counts the number of this type of entity matching the given query, with optional indexed parameters. Uni<Long>count(String query, Map<String, Object> params)Counts the number of this type of entity matching the given query, with named parameters. Uni<Long>count(String query, Parameters params)Counts the number of this type of entity matching the given query, with named parameters. Uni<Long>count(Document query)Counts the number of this type of entity matching the given query Uni<Long>deleteAll()Delete all entities of this type from the database. Uni<Boolean>deleteById(Id id)Delete an entity of this type by ID. Uni<Long>delete(String query, Object params)Delete all entities of this type matching the given query, with optional indexed parameters. Uni<Long>delete(String query, Map<String, Object> params)Delete all entities of this type matching the given query, with named parameters. Uni<Long>delete(String query, Parameters params)Delete all entities of this type matching the given query, with named parameters. Uni<Long>delete(Document query)Delete all entities of this type matching the given query Uni<Void>persist(Iterable<Entity> entities)Insert all given entities. Uni<Void>persist(Stream<Entity> entities)Insert all given entities. Uni<Void>persist(Entity firstEntity, Entity entities)Insert all given entities. Uni<Void>update(Iterable<Entity> entities)Update all given entities. Uni<Void>update(Stream<Entity> entities)Update all given entities. Uni<Void>update(Entity firstEntity, Entity entities)Update all given entities. ReactivePanacheUpdateupdate(String update, Object params)Update all entities of this type by the given update document, with optional indexed parameters. ReactivePanacheUpdateupdate(String update, Map<String, Object> params)Update all entities of this type by the given update document, with named parameters. ReactivePanacheUpdateupdate(String update, Parameters params)Update all entities of this type by the given update document, with named parameters. Uni<Void>persistOrUpdate(Iterable<Entity> entities)Persist all given entities or update them if they already exist. Uni<Void>persistOrUpdate(Stream<Entity> entities)Persist all given entities. Uni<Void>persistOrUpdate(Entity firstEntity, Entity entities)Persist all given entities. ReactiveMongoCollection<Entity>mongoCollection()Allow to access the underlying Mongo Collection. ReactiveMongoDatabasemongoDatabase()Allow to access the underlying Mongo Database. -
-
Method Detail
-
findById
@GenerateBridge() Uni<Entity> findById(Id id)
Find an entity of this type by ID.
- Parameters:
id- the ID of the entity to find.
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(String query, Object params)
Find entities using a query, with optional indexed parameters.
- Parameters:
query- a query stringparams- optional sequence of indexed parameters
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(String query, Sort sort, Object params)
Find entities using a query and the given sort options, with optional indexed parameters.
- Parameters:
query- a query stringsort- the sort strategy to useparams- optional sequence of indexed parameters
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(String query, Map<String, Object> params)
Find entities using a query, with named parameters.
- Parameters:
query- a query stringparams- Map of named parameters
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(String query, Sort sort, Map<String, Object> params)
Find entities using a query and the given sort options, with named parameters.
- Parameters:
query- a query stringsort- the sort strategy to useparams- Map of indexed parameters
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(String query, Parameters params)
Find entities using a query, with named parameters.
- Parameters:
query- a query stringparams- Parameters of named parameters
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(String query, Sort sort, Parameters params)
Find entities using a query and the given sort options, with named parameters.
- Parameters:
query- a query stringsort- the sort strategy to useparams- Parameters of indexed parameters
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(Document query)
Find entities using a BSON query.
- Parameters:
query- a Document query
-
find
@GenerateBridge() ReactivePanacheQuery<Entity> find(Document query, Document sort)
Find entities using a a BSON query and a BSON sort.
- Parameters:
query- a Document querysort- the Document sort
-
findAll
@GenerateBridge() ReactivePanacheQuery<Entity> findAll()
Find all entities of this type.
-
findAll
@GenerateBridge() ReactivePanacheQuery<Entity> findAll(Sort sort)
Find all entities of this type, in the given order.
- Parameters:
sort- the sort order to use
-
list
@GenerateBridge() Uni<List<Entity>> list(String query, Object params)
Find entities matching a query, with optional indexed parameters. This method is a shortcut for
find(query, params).list().- Parameters:
query- a query stringparams- optional sequence of indexed parameters
-
list
@GenerateBridge() Uni<List<Entity>> list(String query, Sort sort, Object params)
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().- Parameters:
query- a query stringsort- the sort strategy to useparams- optional sequence of indexed parameters
-
list
@GenerateBridge() Uni<List<Entity>> list(String query, Map<String, Object> params)
Find entities matching a query, with named parameters. This method is a shortcut for
find(query, params).list().- Parameters:
query- a query stringparams- Map of named parameters
-
list
@GenerateBridge() Uni<List<Entity>> list(String query, Sort sort, Map<String, Object> params)
Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for
find(query, sort, params).list().- Parameters:
query- a query stringsort- the sort strategy to useparams- Map of indexed parameters
-
list
@GenerateBridge() Uni<List<Entity>> list(String query, Parameters params)
Find entities matching a query, with named parameters. This method is a shortcut for
find(query, params).list().- Parameters:
query- a query stringparams- Parameters of named parameters
-
list
@GenerateBridge() Uni<List<Entity>> list(String query, Sort sort, Parameters params)
Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for
find(query, sort, params).list().- Parameters:
query- a query stringsort- the sort strategy to useparams- Parameters of indexed parameters
-
list
@GenerateBridge() Uni<List<Entity>> list(Document query)
Find entities using a BSON query. This method is a shortcut for
find(query).list().- Parameters:
query- a Document query
-
list
@GenerateBridge() Uni<List<Entity>> list(Document query, Document sort)
Find entities using a a BSON query and a BSON sort. This method is a shortcut for
find(query, sort).list().- Parameters:
query- a Document querysort- the Document sort
-
listAll
@GenerateBridge() Uni<List<Entity>> listAll()
Find all entities of this type. This method is a shortcut for
findAll().list().
-
listAll
@GenerateBridge() Uni<List<Entity>> listAll(Sort sort)
Find all entities of this type, in the given order. This method is a shortcut for
findAll(sort).list().- Parameters:
sort- the sort order to use
-
stream
@GenerateBridge() Multi<Entity> stream(String query, Object params)
Find entities matching a query, with optional indexed parameters. This method is a shortcut for
find(query, params).stream().- Parameters:
query- a query stringparams- optional sequence of indexed parameters
-
stream
@GenerateBridge() Multi<Entity> stream(String query, Sort sort, Object params)
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().- Parameters:
query- a query stringsort- the sort strategy to useparams- optional sequence of indexed parameters
-
stream
@GenerateBridge() Multi<Entity> stream(String query, Map<String, Object> params)
Find entities matching a query, with named parameters. This method is a shortcut for
find(query, params).stream().- Parameters:
query- a query stringparams- Map of named parameters
-
stream
@GenerateBridge() Multi<Entity> stream(String query, Sort sort, Map<String, Object> params)
Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for
find(query, sort, params).stream().- Parameters:
query- a query stringsort- the sort strategy to useparams- Map of indexed parameters
-
stream
@GenerateBridge() Multi<Entity> stream(String query, Parameters params)
Find entities matching a query, with named parameters. This method is a shortcut for
find(query, params).stream().- Parameters:
query- a query stringparams- Parameters of named parameters
-
stream
@GenerateBridge() Multi<Entity> stream(String query, Sort sort, Parameters params)
Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for
find(query, sort, params).stream().- Parameters:
query- a query stringsort- the sort strategy to useparams- Parameters of indexed parameters
-
stream
@GenerateBridge() Multi<Entity> stream(Document query)
Find entities using a BSON query. This method is a shortcut for
find(query).stream().- Parameters:
query- a Document query
-
stream
@GenerateBridge() Multi<Entity> stream(Document query, Document sort)
Find entities using a a BSON query and a BSON sort. This method is a shortcut for
find(query, sort).stream().- Parameters:
query- a Document querysort- the Document sort
-
streamAll
@GenerateBridge() Multi<Entity> streamAll()
Find all entities of this type. This method is a shortcut for
findAll().stream().
-
streamAll
@GenerateBridge() Multi<Entity> streamAll(Sort sort)
Find all entities of this type, in the given order. This method is a shortcut for
findAll(sort).stream().- Parameters:
sort- the sort order to use
-
count
@GenerateBridge() Uni<Long> count(String query, Object params)
Counts the number of this type of entity matching the given query, with optional indexed parameters.
- Parameters:
query- a query stringparams- optional sequence of indexed parameters
-
count
@GenerateBridge() Uni<Long> count(String query, Map<String, Object> params)
Counts the number of this type of entity matching the given query, with named parameters.
- Parameters:
query- a query stringparams- Map of named parameters
-
count
@GenerateBridge() Uni<Long> count(String query, Parameters params)
Counts the number of this type of entity matching the given query, with named parameters.
- Parameters:
query- a query stringparams- Parameters of named parameters
-
count
@GenerateBridge() Uni<Long> count(Document query)
Counts the number of this type of entity matching the given query
- Parameters:
query- a Document query
-
deleteAll
@GenerateBridge() Uni<Long> deleteAll()
Delete all entities of this type from the database.
-
deleteById
@GenerateBridge() Uni<Boolean> deleteById(Id id)
Delete an entity of this type by ID.
- Parameters:
id- the ID of the entity to delete.
-
delete
@GenerateBridge() Uni<Long> delete(String query, Object params)
Delete all entities of this type matching the given query, with optional indexed parameters.
- Parameters:
query- a query stringparams- optional sequence of indexed parameters
-
delete
@GenerateBridge() Uni<Long> delete(String query, Map<String, Object> params)
Delete all entities of this type matching the given query, with named parameters.
- Parameters:
query- a query stringparams- Map of named parameters
-
delete
@GenerateBridge() Uni<Long> delete(String query, Parameters params)
Delete all entities of this type matching the given query, with named parameters.
- Parameters:
query- a query stringparams- Parameters of named parameters
-
delete
@GenerateBridge() Uni<Long> delete(Document query)
Delete all entities of this type matching the given query
- Parameters:
query- a Document query
-
persist
Uni<Void> persist(Iterable<Entity> entities)
Insert all given entities.
- Parameters:
entities- the entities to insert
-
persist
Uni<Void> persist(Stream<Entity> entities)
Insert all given entities.
- Parameters:
entities- the entities to insert
-
persist
Uni<Void> persist(Entity firstEntity, Entity entities)
Insert all given entities.
- Parameters:
entities- the entities to update
-
update
Uni<Void> update(Iterable<Entity> entities)
Update all given entities.
- Parameters:
entities- the entities to update
-
update
Uni<Void> update(Stream<Entity> entities)
Update all given entities.
- Parameters:
entities- the entities to insert
-
update
Uni<Void> update(Entity firstEntity, Entity entities)
Update all given entities.
- Parameters:
entities- the entities to update
-
update
@GenerateBridge() ReactivePanacheUpdate update(String update, Object params)
Update all entities of this type by the given update document, with optional indexed parameters. The returned ReactivePanacheUpdate object will allow to restrict on which document the update should be applied.
- Parameters:
update- the update document, if it didn't contain any update operator, we add$set.params- optional sequence of indexed parameters
-
update
@GenerateBridge() ReactivePanacheUpdate update(String update, Map<String, Object> params)
Update all entities of this type by the given update document, with named parameters. The returned ReactivePanacheUpdate object will allow to restrict on which document the update should be applied.
- Parameters:
update- the update document, if it didn't contain any update operator, we add$set.params- Map of named parameters
-
update
@GenerateBridge() ReactivePanacheUpdate update(String update, Parameters params)
Update all entities of this type by the given update document, with named parameters. The returned ReactivePanacheUpdate object will allow to restrict on which document the update should be applied.
- Parameters:
update- the update document, if it didn't contain any update operator, we add$set.params- Parameters of named parameters
-
persistOrUpdate
Uni<Void> persistOrUpdate(Iterable<Entity> entities)
Persist all given entities or update them if they already exist.
- Parameters:
entities- the entities to update
-
persistOrUpdate
Uni<Void> persistOrUpdate(Stream<Entity> entities)
Persist all given entities.
- Parameters:
entities- the entities to insert
-
persistOrUpdate
Uni<Void> persistOrUpdate(Entity firstEntity, Entity entities)
Persist all given entities.
- Parameters:
entities- the entities to update
-
mongoCollection
@GenerateBridge() ReactiveMongoCollection<Entity> mongoCollection()
Allow to access the underlying Mongo Collection.
-
mongoDatabase
@GenerateBridge() ReactiveMongoDatabase mongoDatabase()
Allow to access the underlying Mongo Database.
-
-
-
-