Package io.quarkus.hibernate.panache
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 TypeMethodDescriptioncount()Counts the number of this type of entity in the database.Counts the number of this type of entity matching the given query, with optional indexed parameters.Counts the number of this type of entity matching the given query, with named parameters.Delete all entities of this type matching the given query, with optional indexed parameters.Delete all entities of this type matching the given query, with named parameters.Delete all entities of this type from the database.deleteById(Id id) Delete an entity of this type by ID.Find entities using a query and the given sort options, with optional indexed parameters.Find entities using a query and the given sort options, with named parameters.Find entities using a query, with optional indexed parameters.Find entities using a query, with named parameters.findAll()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.Find an entity of this type by ID and lock it.Find entities matching a query and the given sort options, with optional indexed parameters.Find entities matching a query and the given sort options, with named parameters.Find entities matching a query, with optional indexed parameters.Find entities matching a query, with named parameters.listAll()Find all entities of this type.listAll(io.quarkus.panache.common.Sort sort) Find all entities of this type, in the given order.Update all entities of this type matching the given query, with optional indexed parameters.Update all entities of this type matching the given query, with named parameters.
-
Method Details
-
findById
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.
-
findById
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
nullif not found.
-
find
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
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
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
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:
-
findAll
Query findAll()Find all entities of this type.- Returns:
- a new
PanacheQueryinstance to find all entities of this type. - See Also:
-
findAll
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:
-
list
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
containing all results, without paging
invalid reference
List - See Also:
-
list
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
containing all results, without paging
invalid reference
List - See Also:
-
list
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
containing all results, without paging
invalid reference
List - See Also:
-
list
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
containing all results, without paging
invalid reference
List - See Also:
-
listAll
EntityList listAll()Find all entities of this type. This method is a shortcut forfindAll().list().- Returns:
- a
containing all results, without paging
invalid reference
List - See Also:
-
listAll
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
containing all results, without paging
invalid reference
List - 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
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
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:
-
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
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
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- aquery stringparams- optional sequence of indexed parameters- Returns:
- the number of entities deleted.
- See Also:
-
delete
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- aquery stringparams-Mapof named parameters- Returns:
- the number of entities deleted.
- See Also:
-
update
Update 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 updated.
- See Also:
-
update
Update all entities of this type matching the given query, with named parameters.- Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- the number of entities updated.
- See Also:
-