Interface PanacheRepositoryQueries<Entity,EntityList,Query extends PanacheQuery<?,?,?,?>,Count,Confirmation,Id>

All Known Subinterfaces:
PanacheManagedBlockingRepository<Entity>, PanacheManagedBlockingRepositoryBase<Entity,Id>, PanacheManagedBlockingRepositoryQueries<Entity,Id>, PanacheManagedReactiveRepository<Entity>, PanacheManagedReactiveRepositoryBase<Entity,Id>, PanacheManagedReactiveRepositoryQueries<Entity,Id>, PanacheRepository<Entity>, PanacheRepository.Managed<Entity,Id>, PanacheRepository.Reactive<Entity,Id>, PanacheRepository.Reactive.Stateless<Entity,Id>, PanacheRepository.Stateless<Entity,Id>, PanacheRepositoryBlockingQueries<Entity,Id>, PanacheRepositoryReactiveQueries<Entity,Id>, PanacheStatelessBlockingRepository<Entity>, PanacheStatelessBlockingRepositoryBase<Entity,Id>, PanacheStatelessBlockingRepositoryQueries<Entity,Id>, PanacheStatelessReactiveRepository<Entity>, PanacheStatelessReactiveRepositoryBase<Entity,Id>, PanacheStatelessReactiveRepositoryQueries<Entity,Id>

public interface PanacheRepositoryQueries<Entity,EntityList,Query extends PanacheQuery<?,?,?,?>,Count,Confirmation,Id>
  • Method Summary

    Modifier and Type
    Method
    Description
    Counts the number of this type of entity in the database.
    count(String query, Object... params)
    Counts the number of this type of entity matching the given query, with optional indexed parameters.
    count(String query, Map<String,Object> params)
    Counts the number of this type of entity matching the given query, with named parameters.
    delete(String query, Object... params)
    Delete all entities of this type matching the given query, with optional indexed parameters.
    delete(String query, Map<String,Object> params)
    Delete all entities of this type matching the given query, with named parameters.
    Delete all entities of this type from the database.
    Delete an entity of this type by ID.
    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 all entities of this type.
    findAll(io.quarkus.panache.common.Sort sort)
    Find all entities of this type, in the given order.
    Find an entity of this type by ID.
    findById(Id id, jakarta.persistence.LockModeType lockModeType)
    Find an entity of this type by ID and lock it.
    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.
    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.
    list(String query, Object... params)
    Find entities matching a query, with optional indexed parameters.
    list(String query, Map<String,Object> params)
    Find entities matching a query, with named parameters.
    Find all entities of this type.
    listAll(io.quarkus.panache.common.Sort sort)
    Find all entities of this type, in the given order.
    update(String query, Object... params)
    Update all entities of this type matching the given query, with optional indexed parameters.
    update(String query, Map<String,Object> params)
    Update all entities of this type matching the given query, with named parameters.
  • Method Details

    • findById

      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 null if not found.
    • findById

      Entity findById(Id id, jakarta.persistence.LockModeType lockModeType)
      Find an entity of this type by ID and lock it.
      Parameters:
      id - the ID of the entity to find.
      lockModeType - the locking strategy to be used when retrieving the entity.
      Returns:
      the entity found, or null if not found.
    • find

      Query find(String query, Object... params)
      Find entities using a query, with optional indexed parameters.
      Parameters:
      query - a query string
      params - optional sequence of indexed parameters
      Returns:
      a new PanacheQuery instance for the given query
      See Also:
    • find

      Query 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.
      Parameters:
      query - a query string
      sort - the sort strategy to use
      params - optional sequence of indexed parameters
      Returns:
      a new PanacheQuery instance for the given query
      See Also:
    • find

      Query find(String query, Map<String,Object> params)
      Find entities using a query, with named parameters.
      Parameters:
      query - a query string
      params - Map of named parameters
      Returns:
      a new PanacheQuery instance for the given query
      See Also:
    • find

      Query 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.
      Parameters:
      query - a query string
      sort - the sort strategy to use
      params - Map of indexed parameters
      Returns:
      a new PanacheQuery instance for the given query
      See Also:
    • findAll

      Query findAll()
      Find all entities of this type.
      Returns:
      a new PanacheQuery instance to find all entities of this type.
      See Also:
    • findAll

      Query findAll(io.quarkus.panache.common.Sort sort)
      Find all entities of this type, in the given order.
      Parameters:
      sort - the sort order to use
      Returns:
      a new PanacheQuery instance to find all entities of this type.
      See Also:
    • list

      EntityList 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 string
      params - optional sequence of indexed parameters
      Returns:
      a
      invalid reference
      List
      containing all results, without paging
      See Also:
    • list

      EntityList 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. This method is a shortcut for find(query, sort, params).list().
      Parameters:
      query - a query string
      sort - the sort strategy to use
      params - optional sequence of indexed parameters
      Returns:
      a
      invalid reference
      List
      containing all results, without paging
      See Also:
    • list

      EntityList 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 string
      params - Map of named parameters
      Returns:
      a
      invalid reference
      List
      containing all results, without paging
      See Also:
    • list

      EntityList 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. This method is a shortcut for find(query, sort, params).list().
      Parameters:
      query - a query string
      sort - the sort strategy to use
      params - Map of indexed parameters
      Returns:
      a
      invalid reference
      List
      containing all results, without paging
      See Also:
    • listAll

      EntityList listAll()
      Find all entities of this type. This method is a shortcut for findAll().list().
      Returns:
      a
      invalid reference
      List
      containing all results, without paging
      See Also:
    • listAll

      EntityList listAll(io.quarkus.panache.common.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
      Returns:
      a
      invalid reference
      List
      containing all results, without paging
      See Also:
    • count

      Count 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

      Count 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 string
      params - optional sequence of indexed parameters
      Returns:
      the number of entities counted.
      See Also:
    • count

      Count 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 string
      params - Map of named parameters
      Returns:
      the number of entities counted.
      See Also:
    • deleteAll

      Count deleteAll()
      Delete all entities of this type from the database. WARNING: the default implementation of this method uses a bulk delete query and ignores cascading rules from the JPA model.
      Returns:
      the number of entities deleted.
      See Also:
    • deleteById

      Confirmation 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

      Count delete(String query, Object... params)
      Delete all entities of this type matching the given query, with optional indexed parameters. WARNING: the default implementation of this method uses a bulk delete query and ignores cascading rules from the JPA model.
      Parameters:
      query - a query string
      params - optional sequence of indexed parameters
      Returns:
      the number of entities deleted.
      See Also:
    • delete

      Count delete(String query, Map<String,Object> params)
      Delete all entities of this type matching the given query, with named parameters. WARNING: the default implementation of this method uses a bulk delete query and ignores cascading rules from the JPA model.
      Parameters:
      query - a query string
      params - Map of named parameters
      Returns:
      the number of entities deleted.
      See Also:
    • update

      Count update(String query, Object... params)
      Update all entities of this type matching the given query, with optional indexed parameters.
      Parameters:
      query - a query string
      params - optional sequence of indexed parameters
      Returns:
      the number of entities updated.
      See Also:
    • update

      Count update(String query, Map<String,Object> params)
      Update all entities of this type matching the given query, with named parameters.
      Parameters:
      query - a query string
      params - Map of named parameters
      Returns:
      the number of entities updated.
      See Also: