Package io.quarkus.mongodb.panache
Interface PanacheMongoRepositoryBase<Entity,Id>
-
- Type Parameters:
Entity- The type of entity to operate onId- The ID type of the entity
- All Known Subinterfaces:
PanacheMongoRepository<Entity>
public interface PanacheMongoRepositoryBase<Entity,Id>Represents a Repository for a specific type of entityEntity, with an ID type ofId. Implementing this repository will gain you the exact same useful methods that are onPanacheMongoEntityBase. Unless you have a custom ID strategy, you should not implement this interface directly but implementPanacheMongoRepositoryinstead.- See Also:
PanacheMongoRepository
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default longcount()Counts the number of this type of entity in the database.default longcount(String query, Parameters params)Counts the number of this type of entity matching the given query, with named parameters.default longcount(String query, Object... params)Counts the number of this type of entity matching the given query, with optional indexed parameters.default longcount(String query, Map<String,Object> params)Counts the number of this type of entity matching the given query, with named parameters.default longcount(org.bson.Document query)Counts the number of this type of entity matching the given querydefault voiddelete(Entity entity)Delete the given entity from the database, if it is already persisted.default longdelete(String query, Parameters params)Delete all entities of this type matching the given query, with named parameters.default longdelete(String query, Object... params)Delete all entities of this type matching the given query, with optional indexed parameters.default longdelete(String query, Map<String,Object> params)Delete all entities of this type matching the given query, with named parameters.default longdelete(org.bson.Document query)Delete all entities of this type matching the given querydefault longdeleteAll()Delete all entities of this type from the database.default booleandeleteById(Id id)Delete an entity of this type by ID.default PanacheQuery<Entity>find(String query, Parameters params)Find entities using a query, with named parameters.default PanacheQuery<Entity>find(String query, Sort sort, Parameters params)Find entities using a query and the given sort options, with named parameters.default PanacheQuery<Entity>find(String query, Sort sort, Object... params)Find entities using a query and the given sort options, with optional indexed parameters.default PanacheQuery<Entity>find(String query, Sort sort, Map<String,Object> params)Find entities using a query and the given sort options, with named parameters.default PanacheQuery<Entity>find(String query, Object... params)Find entities using a query, with optional indexed parameters.default PanacheQuery<Entity>find(String query, Map<String,Object> params)Find entities using a query, with named parameters.default PanacheQuery<Entity>find(org.bson.Document query)Find entities using a BSON query.default PanacheQuery<Entity>find(org.bson.Document query, org.bson.Document sort)Find entities using a BSON query and a BSON sort.default PanacheQuery<Entity>findAll()Find all entities of this type.default PanacheQuery<Entity>findAll(Sort sort)Find all entities of this type, in the given order.default EntityfindById(Id id)Find an entity of this type by ID.default Optional<Entity>findByIdOptional(Id id)Find an entity of this type by ID.default List<Entity>list(String query, Parameters params)Find entities matching a query, with named parameters.default List<Entity>list(String query, Sort sort, Parameters params)Find entities matching a query and the given sort options, with named parameters.default List<Entity>list(String query, Sort sort, Object... params)Find entities matching a query and the given sort options, with optional indexed parameters.default List<Entity>list(String query, Sort sort, Map<String,Object> params)Find entities matching a query and the given sort options, with named parameters.default List<Entity>list(String query, Object... params)Find entities matching a query, with optional indexed parameters.default List<Entity>list(String query, Map<String,Object> params)Find entities matching a query, with named parameters.default List<Entity>list(org.bson.Document query)Find entities using a BSON query.default List<Entity>list(org.bson.Document query, org.bson.Document sort)Find entities using a BSON query and a BSON sort.default List<Entity>listAll()Find all entities of this type.default List<Entity>listAll(Sort sort)Find all entities of this type, in the given order.default com.mongodb.client.MongoCollection<Entity>mongoCollection()Allow to access the underlying Mongo Collectiondefault com.mongodb.client.MongoDatabasemongoDatabase()Allow to access the underlying Mongo Database.default voidpersist(Entity entity)Persist the given entity in the database.default voidpersist(Entity firstEntity, Entity... entities)Persist all given entities.default voidpersist(Iterable<Entity> entities)Persist all given entities.default voidpersist(Stream<Entity> entities)Persist all given entities.default voidpersistOrUpdate(Entity entity)Persist the given entity in the database or update it if it already exists.default voidpersistOrUpdate(Entity firstEntity, Entity... entities)Persist all given entities or update them if they already exist.default voidpersistOrUpdate(Iterable<Entity> entities)Persist all given entities or update them if they already exist.default voidpersistOrUpdate(Stream<Entity> entities)Persist all given entities or update them if they already exist.default Stream<Entity>stream(String query, Parameters params)Find entities matching a query, with named parameters.default Stream<Entity>stream(String query, Sort sort, Parameters params)Find entities matching a query and the given sort options, with named parameters.default Stream<Entity>stream(String query, Sort sort, Object... params)Find entities matching a query and the given sort options, with optional indexed parameters.default Stream<Entity>stream(String query, Sort sort, Map<String,Object> params)Find entities matching a query and the given sort options, with named parameters.default Stream<Entity>stream(String query, Object... params)Find entities matching a query, with optional indexed parameters.default Stream<Entity>stream(String query, Map<String,Object> params)Find entities matching a query, with named parameters.default Stream<Entity>stream(org.bson.Document query)Find entities using a BSON query.default Stream<Entity>stream(org.bson.Document query, org.bson.Document sort)Find entities using a BSON query and a BSON sort.default Stream<Entity>streamAll()Find all entities of this type, in the given order.default Stream<Entity>streamAll(Sort sort)Find all entities of this type.default voidupdate(Entity entity)Update the given entity in the database.default voidupdate(Entity firstEntity, Entity... entities)Update all given entities.default voidupdate(Iterable<Entity> entities)Update all given entities.default PanacheUpdateupdate(String update, Parameters params)Update all entities of this type by the given update document, with named parameters.default PanacheUpdateupdate(String update, Object... params)Update all entities of this type by the given update document, with optional indexed parameters.default PanacheUpdateupdate(String update, Map<String,Object> params)Update all entities of this type by the given update document, with named parameters.default voidupdate(Stream<Entity> entities)Update all given entities.default PanacheUpdateupdate(org.bson.Document update)Update all entities of this type by the given update BSON document.
-
-
-
Method Detail
-
persist
default void persist(Entity entity)
Persist the given entity in the database. This will set its ID field if not already set.- Parameters:
entity- the entity to insert.- See Also:
persist(Iterable),persist(Stream),persist(Object, Object...)
-
update
default void update(Entity entity)
Update the given entity in the database.- Parameters:
entity- the entity to update.- See Also:
update(Iterable),update(Stream),update(Object, Object...)
-
persistOrUpdate
default void persistOrUpdate(Entity entity)
Persist the given entity in the database or update it if it already exists.- Parameters:
entity- the entity to update.- See Also:
persistOrUpdate(Iterable),persistOrUpdate(Stream),persistOrUpdate(Object, Object...)
-
delete
default void delete(Entity entity)
Delete the given entity from the database, if it is already persisted.- Parameters:
entity- the entity to delete.- See Also:
delete(String, Object...),delete(String, Map),delete(String, Parameters),deleteAll()
-
findById
@GenerateBridge(targetReturnTypeErased=true) default Entity findById(Id id)
Find an entity of this type by ID.- Parameters:
id- the ID of the entity to find.- Returns:
- the entity found, or
nullif not found.
-
findByIdOptional
@GenerateBridge default Optional<Entity> findByIdOptional(Id id)
Find an entity of this type by ID.- Parameters:
id- the ID of the entity to find.- Returns:
- if found, an optional containing the entity, else
Optional.empty().
-
find
@GenerateBridge default PanacheQuery<Entity> find(String query, Object... params)
Find entities using a query, with optional indexed parameters.- Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(String, Sort, Object...),find(String, Map),find(String, Parameters),list(String, Object...),stream(String, Object...)
-
find
@GenerateBridge default PanacheQuery<Entity> find(String query, Sort sort, Object... params)
Find entities using a query and the given sort options, with optional indexed parameters.- Parameters:
query- aquery stringsort- the sort strategy to useparams- optional sequence of indexed parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(String, Object...),find(String, Sort, Map),find(String, Sort, Parameters),list(String, Sort, Object...),stream(String, Sort, Object...)
-
find
@GenerateBridge default PanacheQuery<Entity> find(String query, Map<String,Object> params)
Find entities using a query, with named parameters.- Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(String, Sort, Map),find(String, Object...),find(String, Parameters),list(String, Map),stream(String, Map)
-
find
@GenerateBridge default PanacheQuery<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- aquery stringsort- the sort strategy to useparams-Mapof indexed parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(String, Map),find(String, Sort, Object...),find(String, Sort, Parameters),list(String, Sort, Map),stream(String, Sort, Map)
-
find
@GenerateBridge default PanacheQuery<Entity> find(String query, Parameters params)
Find entities using a query, with named parameters.- Parameters:
query- aquery stringparams-Parametersof named parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(String, Sort, Parameters),find(String, Map),find(String, Parameters),list(String, Parameters),stream(String, Parameters)
-
find
@GenerateBridge default PanacheQuery<Entity> find(String query, Sort sort, Parameters params)
Find entities using a query and the given sort options, with named parameters.- Parameters:
query- aquery stringsort- the sort strategy to useparams-Parametersof indexed parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(String, Parameters),find(String, Sort, Map),find(String, Sort, Parameters),list(String, Sort, Parameters),stream(String, Sort, Parameters)
-
find
@GenerateBridge default PanacheQuery<Entity> find(org.bson.Document query)
Find entities using a BSON query.- Parameters:
query- aDocumentquery- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(Document, Document),list(Document),list(Document, Document),stream(Document),stream(Document, Document)
-
find
@GenerateBridge default PanacheQuery<Entity> find(org.bson.Document query, org.bson.Document sort)
Find entities using a BSON query and a BSON sort.- Parameters:
query- aDocumentquerysort- theDocumentsort- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
find(Document),list(Document),list(Document, Document),stream(Document),stream(Document, Document)
-
findAll
@GenerateBridge default PanacheQuery<Entity> findAll()
Find all entities of this type.- Returns:
- a new
PanacheQueryinstance to find all entities of this type. - See Also:
findAll(Sort),listAll(),streamAll()
-
findAll
@GenerateBridge default PanacheQuery<Entity> findAll(Sort sort)
Find all entities of this type, in the given order.- Parameters:
sort- the sort order to use- Returns:
- a new
PanacheQueryinstance to find all entities of this type. - See Also:
findAll(),listAll(Sort),streamAll(Sort)
-
list
@GenerateBridge default List<Entity> list(String query, Object... params)
Find entities matching a query, with optional indexed parameters. This method is a shortcut forfind(query, params).list().- Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- a
Listcontaining all results, without paging - See Also:
list(String, Sort, Object...),list(String, Map),list(String, Parameters),find(String, Object...),stream(String, Object...)
-
list
@GenerateBridge default 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 forfind(query, sort, params).list().- Parameters:
query- aquery stringsort- the sort strategy to useparams- optional sequence of indexed parameters- Returns:
- a
Listcontaining all results, without paging - See Also:
list(String, Object...),list(String, Sort, Map),list(String, Sort, Parameters),find(String, Sort, Object...),stream(String, Sort, Object...)
-
list
@GenerateBridge default List<Entity> list(String query, Map<String,Object> params)
Find entities matching a query, with named parameters. This method is a shortcut forfind(query, params).list().- Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- a
Listcontaining all results, without paging - See Also:
list(String, Sort, Map),list(String, Object...),list(String, Parameters),find(String, Map),stream(String, Map)
-
list
@GenerateBridge default 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 forfind(query, sort, params).list().- Parameters:
query- aquery stringsort- the sort strategy to useparams-Mapof indexed parameters- Returns:
- a
Listcontaining all results, without paging - See Also:
list(String, Map),list(String, Sort, Object...),list(String, Sort, Parameters),find(String, Sort, Map),stream(String, Sort, Map)
-
list
@GenerateBridge default List<Entity> list(String query, Parameters params)
Find entities matching a query, with named parameters. This method is a shortcut forfind(query, params).list().- Parameters:
query- aquery stringparams-Parametersof named parameters- Returns:
- a
Listcontaining all results, without paging - See Also:
list(String, Sort, Parameters),list(String, Object...),list(String, Map),find(String, Parameters),stream(String, Parameters)
-
list
@GenerateBridge default 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 forfind(query, sort, params).list().- Parameters:
query- aquery stringsort- the sort strategy to useparams-Parametersof indexed parameters- Returns:
- a
Listcontaining all results, without paging - See Also:
list(String, Parameters),list(String, Sort, Object...),list(String, Sort, Map),find(String, Sort, Parameters),stream(String, Sort, Parameters)
-
list
@GenerateBridge default List<Entity> list(org.bson.Document query)
Find entities using a BSON query. This method is a shortcut forfind(query).list().- Parameters:
query- aDocumentquery- Returns:
- a
Listcontaining all results, without paging - See Also:
find(Document),find(Document, Document),list(Document, Document),stream(Document),stream(Document, Document)
-
list
@GenerateBridge default List<Entity> list(org.bson.Document query, org.bson.Document sort)
Find entities using a BSON query and a BSON sort. This method is a shortcut forfind(query, sort).list().- Parameters:
query- aDocumentquerysort- theDocumentsort- Returns:
- a
Listcontaining all results, without paging - See Also:
find(Document),find(Document, Document),list(Document),stream(Document),stream(Document, Document)
-
listAll
@GenerateBridge default List<Entity> listAll()
Find all entities of this type. This method is a shortcut forfindAll().list().- Returns:
- a
Listcontaining all results, without paging - See Also:
listAll(Sort),findAll(),streamAll()
-
listAll
@GenerateBridge default List<Entity> listAll(Sort sort)
Find all entities of this type, in the given order. This method is a shortcut forfindAll(sort).list().- Parameters:
sort- the sort order to use- Returns:
- a
Listcontaining all results, without paging - See Also:
listAll(),findAll(Sort),streamAll(Sort)
-
stream
@GenerateBridge default Stream<Entity> stream(String query, Object... params)
Find entities matching a query, with optional indexed parameters. This method is a shortcut forfind(query, params).stream().- Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
stream(String, Sort, Object...),stream(String, Map),stream(String, Parameters),find(String, Object...),list(String, Object...)
-
stream
@GenerateBridge default Stream<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 forfind(query, sort, params).stream().- Parameters:
query- aquery stringsort- the sort strategy to useparams- optional sequence of indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
stream(String, Object...),stream(String, Sort, Map),stream(String, Sort, Parameters),find(String, Sort, Object...),list(String, Sort, Object...)
-
stream
@GenerateBridge default Stream<Entity> stream(String query, Map<String,Object> params)
Find entities matching a query, with named parameters. This method is a shortcut forfind(query, params).stream().- Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
stream(String, Sort, Map),stream(String, Object...),stream(String, Parameters),find(String, Map),list(String, Map)
-
stream
@GenerateBridge default Stream<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 forfind(query, sort, params).stream().- Parameters:
query- aquery stringsort- the sort strategy to useparams-Mapof indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
stream(String, Map),stream(String, Sort, Object...),stream(String, Sort, Parameters),find(String, Sort, Map),list(String, Sort, Map)
-
stream
@GenerateBridge default Stream<Entity> stream(String query, Parameters params)
Find entities matching a query, with named parameters. This method is a shortcut forfind(query, params).stream().- Parameters:
query- aquery stringparams-Parametersof named parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
stream(String, Sort, Parameters),stream(String, Object...),stream(String, Map),find(String, Parameters),list(String, Parameters)
-
stream
@GenerateBridge default Stream<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 forfind(query, sort, params).stream().- Parameters:
query- aquery stringsort- the sort strategy to useparams-Parametersof indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
stream(String, Parameters),stream(String, Sort, Object...),stream(String, Sort, Map),find(String, Sort, Parameters),list(String, Sort, Parameters)
-
stream
@GenerateBridge default Stream<Entity> stream(org.bson.Document query)
Find entities using a BSON query. This method is a shortcut forfind(query).stream().- Parameters:
query- aDocumentquery- Returns:
- a
Streamcontaining all results, without paging - See Also:
find(Document),find(Document, Document),list(Document),list(Document, Document),stream(Document, Document)
-
stream
@GenerateBridge default Stream<Entity> stream(org.bson.Document query, org.bson.Document sort)
Find entities using a BSON query and a BSON sort. This method is a shortcut forfind(query, sort).stream().- Parameters:
query- aDocumentquerysort- theDocumentsort- Returns:
- a
Streamcontaining all results, without paging - See Also:
find(Document),find(Document, Document),list(Document),list(Document, Document),stream(Document)
-
streamAll
@GenerateBridge default Stream<Entity> streamAll(Sort sort)
Find all entities of this type. This method is a shortcut forfindAll().stream().- Returns:
- a
Streamcontaining all results, without paging - See Also:
streamAll(Sort),findAll(),listAll()
-
streamAll
@GenerateBridge default Stream<Entity> streamAll()
Find all entities of this type, in the given order. This method is a shortcut forfindAll(sort).stream().- Returns:
- a
Streamcontaining all results, without paging - See Also:
streamAll(),findAll(Sort),listAll(Sort)
-
count
@GenerateBridge default long count()
Counts the number of this type of entity in the database.- Returns:
- the number of this type of entity in the database.
- See Also:
count(String, Object...),count(String, Map),count(String, Parameters)
-
count
@GenerateBridge default long count(String query, Object... params)
Counts the number of this type of entity matching the given query, with optional indexed parameters.- Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- the number of entities counted.
- See Also:
count(),count(String, Map),count(String, Parameters)
-
count
@GenerateBridge default 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- aquery stringparams-Mapof named parameters- Returns:
- the number of entities counted.
- See Also:
count(),count(String, Object...),count(String, Parameters)
-
count
@GenerateBridge default long count(String query, Parameters params)
Counts the number of this type of entity matching the given query, with named parameters.- Parameters:
query- aquery stringparams-Parametersof named parameters- Returns:
- the number of entities counted.
- See Also:
count(),count(String, Object...),count(String, Map)
-
count
@GenerateBridge default long count(org.bson.Document query)
Counts the number of this type of entity matching the given query- Parameters:
query- aDocumentquery- Returns:
- he number of entities counted.
- See Also:
count(),count(String, Object...),count(String, Map)
-
deleteAll
@GenerateBridge default long deleteAll()
Delete all entities of this type from the database.- Returns:
- the number of entities deleted.
- See Also:
delete(String, Object...),delete(String, Map),delete(String, Parameters)
-
deleteById
@GenerateBridge default boolean deleteById(Id id)
Delete an entity of this type by ID.- Parameters:
id- the ID of the entity to delete.- Returns:
- false if the entity was not deleted (not found).
-
delete
@GenerateBridge default long delete(String query, Object... params)
Delete all entities of this type matching the given query, with optional indexed parameters.- Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- the number of entities deleted.
- See Also:
deleteAll(),delete(String, Map),delete(String, Parameters)
-
delete
@GenerateBridge default long delete(String query, Map<String,Object> params)
Delete all entities of this type matching the given query, with named parameters.- Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- the number of entities deleted.
- See Also:
deleteAll(),delete(String, Object...),delete(String, Parameters)
-
delete
@GenerateBridge default long delete(String query, Parameters params)
Delete all entities of this type matching the given query, with named parameters.- Parameters:
query- aquery stringparams-Parametersof named parameters- Returns:
- the number of entities deleted.
- See Also:
deleteAll(),delete(String, Object...),delete(String, Map)
-
delete
@GenerateBridge default long delete(org.bson.Document query)
Delete all entities of this type matching the given query- Parameters:
query- aDocumentquery- Returns:
- he number of entities counted.
- See Also:
count(),count(String, Object...),count(String, Map)
-
persist
default void persist(Iterable<Entity> entities)
Persist all given entities.- Parameters:
entities- the entities to insert- See Also:
persist(Object),persist(Stream),persist(Object,Object...)
-
persist
default void persist(Stream<Entity> entities)
Persist all given entities.- Parameters:
entities- the entities to insert- See Also:
persist(Object),persist(Iterable),persist(Object,Object...)
-
persist
default void persist(Entity firstEntity, Entity... entities)
Persist all given entities.- Parameters:
entities- the entities to insert- See Also:
persist(Object),persist(Stream),persist(Iterable)
-
update
default void update(Iterable<Entity> entities)
Update all given entities.- Parameters:
entities- the entities to update- See Also:
update(Object),update(Stream),update(Object,Object...)
-
update
default void update(Stream<Entity> entities)
Update all given entities.- Parameters:
entities- the entities to update- See Also:
update(Object),update(Iterable),update(Object,Object...)
-
update
default void update(Entity firstEntity, Entity... entities)
Update all given entities.- Parameters:
entities- the entities to update- See Also:
update(Object),update(Stream),update(Iterable)
-
persistOrUpdate
default void persistOrUpdate(Iterable<Entity> entities)
Persist all given entities or update them if they already exist.- Parameters:
entities- the entities to update- See Also:
persistOrUpdate(Object),persistOrUpdate(Stream),persistOrUpdate(Object,Object...)
-
persistOrUpdate
default void persistOrUpdate(Stream<Entity> entities)
Persist all given entities or update them if they already exist.- Parameters:
entities- the entities to update- See Also:
persistOrUpdate(Object),persistOrUpdate(Iterable),persistOrUpdate(Object,Object...)
-
persistOrUpdate
default void persistOrUpdate(Entity firstEntity, Entity... entities)
Persist all given entities or update them if they already exist.- Parameters:
entities- the entities to update- See Also:
update(Object),update(Stream),update(Iterable)
-
update
@GenerateBridge default PanacheUpdate update(String update, Object... params)
Update all entities of this type by the given update document, with optional indexed parameters. The returnedPanacheUpdateobject will allow to restrict on which documents the update should be applied.- Parameters:
update- the update document, if it didn't contain any update operator, we add$set. It can also be expressed as aquery string.params- optional sequence of indexed parameters- Returns:
- a new
PanacheUpdateinstance for the given update document - See Also:
update(String, Map),update(String, Parameters),update(Document)
-
update
@GenerateBridge default PanacheUpdate update(String update, Map<String,Object> params)
Update all entities of this type by the given update document, with named parameters. The returnedPanacheUpdateobject will allow to restrict on which documents the update should be applied.- Parameters:
update- the update document, if it didn't contain any update operator, we add$set. It can also be expressed as aquery string.params-Mapof named parameters- Returns:
- a new
PanacheUpdateinstance for the given update document - See Also:
update(String, Object...),update(String, Parameters),update(Document)
-
update
@GenerateBridge default PanacheUpdate update(String update, Parameters params)
Update all entities of this type by the given update document, with named parameters. The returnedPanacheUpdateobject 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. It can also be expressed as aquery string.params-Parametersof named parameters- Returns:
- a new
PanacheUpdateinstance for the given update document - See Also:
update(String, Object...),update(String, Map),update(Document)
-
update
@GenerateBridge default PanacheUpdate update(org.bson.Document update)
Update all entities of this type by the given update BSON document. The returnedPanacheUpdateobject will allow to restrict on which document the update should be applied.- Parameters:
update- the update document, as aDocument.- Returns:
- a new
PanacheUpdateinstance for the given update document - See Also:
update(String, Object...),update(String, Map),update(String, Parameters)
-
mongoCollection
@GenerateBridge default com.mongodb.client.MongoCollection<Entity> mongoCollection()
Allow to access the underlying Mongo Collection
-
mongoDatabase
@GenerateBridge default com.mongodb.client.MongoDatabase mongoDatabase()
Allow to access the underlying Mongo Database.
-
-