Interface PanacheMongoRepositoryBase<Entity,Id>

Type Parameters:
Entity - The type of entity to operate on
Id - The ID type of the entity
All Known Subinterfaces:
PanacheMongoRepository<Entity>

public interface PanacheMongoRepositoryBase<Entity,Id>
Represents a Repository for a specific type of entity Entity, with an ID type of Id. Implementing this repository will gain you the exact same useful methods that are on PanacheMongoEntityBase. Unless you have a custom ID strategy, you should not implement this interface directly but implement PanacheMongoRepository instead.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default long
    Counts the number of this type of entity in the database.
    default long
    count(String query, io.quarkus.panache.common.Parameters params)
    Counts the number of this type of entity matching the given query, with named parameters.
    default long
    count(String query, Object... params)
    Counts the number of this type of entity matching the given query, with optional indexed parameters.
    default long
    count(String query, Map<String,Object> params)
    Counts the number of this type of entity matching the given query, with named parameters.
    default long
    count(org.bson.conversions.Bson query)
    Counts the number of this type of entity matching the given query
    default void
    delete(Entity entity)
    Delete the given entity from the database, if it is already persisted.
    default long
    delete(String query, io.quarkus.panache.common.Parameters params)
    Delete all entities of this type matching the given query, with named parameters.
    default long
    delete(String query, Object... params)
    Delete all entities of this type matching the given query, with optional indexed parameters.
    default long
    delete(String query, Map<String,Object> params)
    Delete all entities of this type matching the given query, with named parameters.
    default long
    delete(org.bson.conversions.Bson query)
    Delete all entities of this type matching the given query
    default long
    Delete all entities of this type from the database.
    default boolean
    Delete an entity of this type by ID.
    find(String query, io.quarkus.panache.common.Parameters params)
    Find entities using a query, with named parameters.
    find(String query, io.quarkus.panache.common.Sort sort, io.quarkus.panache.common.Parameters params)
    Find entities using a query and the given sort options, with named parameters.
    find(String query, io.quarkus.panache.common.Sort sort, Object... params)
    Find entities using a query and the given sort options, with optional indexed parameters.
    find(String query, io.quarkus.panache.common.Sort sort, Map<String,Object> params)
    Find entities using a query and the given sort options, with named parameters.
    find(String query, Object... params)
    Find entities using a query, with optional indexed parameters.
    find(String query, Map<String,Object> params)
    Find entities using a query, with named parameters.
    find(org.bson.conversions.Bson query)
    Find entities using a BSON query.
    find(org.bson.conversions.Bson query, org.bson.conversions.Bson sort)
    Find entities using a BSON query and a BSON sort.
    Find all entities of this type.
    findAll(io.quarkus.panache.common.Sort sort)
    Find all entities of this type, in the given order.
    default Entity
    Find an entity of this type by ID.
    default Optional<Entity>
    Find an entity of this type by ID.
    default List<Entity>
    Find entities of this type by their IDs.
    default List<Entity>
    list(String query, io.quarkus.panache.common.Parameters params)
    Find entities matching a query, with named parameters.
    default List<Entity>
    list(String query, io.quarkus.panache.common.Sort sort, io.quarkus.panache.common.Parameters params)
    Find entities matching a query and the given sort options, with named parameters.
    default List<Entity>
    list(String query, io.quarkus.panache.common.Sort sort, Object... params)
    Find entities matching a query and the given sort options, with optional indexed parameters.
    default List<Entity>
    list(String query, io.quarkus.panache.common.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.conversions.Bson query)
    Find entities using a BSON query.
    default List<Entity>
    list(org.bson.conversions.Bson query, org.bson.conversions.Bson sort)
    Find entities using a BSON query and a BSON sort.
    default List<Entity>
    Find all entities of this type.
    default List<Entity>
    listAll(io.quarkus.panache.common.Sort sort)
    Find all entities of this type, in the given order.
    default com.mongodb.client.MongoCollection<Entity>
    Allow to access the underlying Mongo Collection
    default com.mongodb.client.MongoDatabase
    Allow to access the underlying Mongo Database.
    default void
    persist(Entity entity)
    Persist the given entity in the database.
    default void
    persist(Entity firstEntity, Entity... entities)
    Persist all given entities.
    default void
    persist(Iterable<Entity> entities)
    Persist all given entities.
    default void
    persist(Stream<Entity> entities)
    Persist all given entities.
    default void
    Persist the given entity in the database or update it if it already exists.
    default void
    persistOrUpdate(Entity firstEntity, Entity... entities)
    Persist all given entities or update them if they already exist.
    default void
    Persist all given entities or update them if they already exist.
    default void
    Persist all given entities or update them if they already exist.
    default Stream<Entity>
    stream(String query, io.quarkus.panache.common.Parameters params)
    Find entities matching a query, with named parameters.
    default Stream<Entity>
    stream(String query, io.quarkus.panache.common.Sort sort, io.quarkus.panache.common.Parameters params)
    Find entities matching a query and the given sort options, with named parameters.
    default Stream<Entity>
    stream(String query, io.quarkus.panache.common.Sort sort, Object... params)
    Find entities matching a query and the given sort options, with optional indexed parameters.
    default Stream<Entity>
    stream(String query, io.quarkus.panache.common.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.conversions.Bson query)
    Find entities using a BSON query.
    default Stream<Entity>
    stream(org.bson.conversions.Bson query, org.bson.conversions.Bson sort)
    Find entities using a BSON query and a BSON sort.
    default Stream<Entity>
    Find all entities of this type, in the given order.
    default Stream<Entity>
    streamAll(io.quarkus.panache.common.Sort sort)
    Find all entities of this type.
    default void
    update(Entity entity)
    Update the given entity in the database.
    default void
    update(Entity firstEntity, Entity... entities)
    Update all given entities.
    default void
    update(Iterable<Entity> entities)
    Update all given entities.
    default io.quarkus.mongodb.panache.common.PanacheUpdate
    update(String update, io.quarkus.panache.common.Parameters params)
    Update all entities of this type by the given update document, with named parameters.
    default io.quarkus.mongodb.panache.common.PanacheUpdate
    update(String update, Object... params)
    Update all entities of this type by the given update document, with optional indexed parameters.
    default io.quarkus.mongodb.panache.common.PanacheUpdate
    update(String update, Map<String,Object> params)
    Update all entities of this type by the given update document, with named parameters.
    default void
    update(Stream<Entity> entities)
    Update all given entities.
    default io.quarkus.mongodb.panache.common.PanacheUpdate
    update(org.bson.conversions.Bson update)
    Update all entities of this type by the given update BSON document.