Interface PanacheStatelessBlockingRepositoryQueries<Entity,Id>
- All Superinterfaces:
PanacheRepositoryBlockingQueries<Entity,,Id> PanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id>
- All Known Subinterfaces:
PanacheRepository.Stateless<Entity,,Id> PanacheStatelessBlockingRepository<Entity>,PanacheStatelessBlockingRepositoryBase<Entity,Id>
public interface PanacheStatelessBlockingRepositoryQueries<Entity,Id>
extends PanacheRepositoryBlockingQueries<Entity,Id>
-
Method Summary
Modifier and TypeMethodDescriptiondefault Longcount()Counts the number of this type of entity in the database.default LongCounts the number of this type of entity matching the given query, with optional indexed parameters.default LongCounts the number of this type of entity matching the given query, with named parameters.default LongDelete all entities of this type matching the given query, with optional indexed parameters.default LongDelete all entities of this type matching the given query, with named parameters.default LongDelete all entities of this type from the database.default BooleandeleteById(Id id) Delete an entity of this type by ID.default PanacheBlockingQuery<Entity> Find entities using a query and the given sort options, with optional indexed parameters.default PanacheBlockingQuery<Entity> Find entities using a query and the given sort options, with named parameters.default PanacheBlockingQuery<Entity> Find entities using a query, with optional indexed parameters.default PanacheBlockingQuery<Entity> Find entities using a query, with named parameters.default PanacheBlockingQuery<Entity> findAll()Find all entities of this type.default PanacheBlockingQuery<Entity> findAll(io.quarkus.panache.common.Sort sort) Find all entities of this type, in the given order.default EntityFind an entity of this type by ID.default EntityFind an entity of this type by ID and lock it.findByIdOptional(Id id) Find an entity of this type by ID.findByIdOptional(Id id, jakarta.persistence.LockModeType lockModeType) Find an entity of this type by ID.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.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.Find all entities of this type, in the given order.streamAll(io.quarkus.panache.common.Sort sort) Find all entities of this type.default LongUpdate all entities of this type matching the given query, with optional indexed parameters.default LongUpdate all entities of this type matching the given query, with named parameters.
-
Method Details
-
findById
Description copied from interface:PanacheRepositoryQueriesFind an entity of this type by ID.- Specified by:
findByIdin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
id- the ID of the entity to find.- Returns:
- the entity found, or
nullif not found.
-
findById
Description copied from interface:PanacheRepositoryQueriesFind an entity of this type by ID and lock it.- Specified by:
findByIdin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - 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.
-
findByIdOptional
Description copied from interface:PanacheRepositoryBlockingQueriesFind an entity of this type by ID.- Specified by:
findByIdOptionalin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Parameters:
id- the ID of the entity to find.- Returns:
- if found, an optional containing the entity, else
Optional.empty().
-
findByIdOptional
Description copied from interface:PanacheRepositoryBlockingQueriesFind an entity of this type by ID.- Specified by:
findByIdOptionalin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Parameters:
id- the ID of the entity to find.- Returns:
- if found, an optional containing the entity, else
Optional.empty().
-
find
Description copied from interface:PanacheRepositoryQueriesFind entities using a query, with optional indexed parameters.- Specified by:
findin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
-
find
default PanacheBlockingQuery<Entity> find(String query, io.quarkus.panache.common.Sort sort, Object... params) Description copied from interface:PanacheRepositoryQueriesFind entities using a query and the given sort options, with optional indexed parameters.- Specified by:
findin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - 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
Description copied from interface:PanacheRepositoryQueriesFind entities using a query, with named parameters.- Specified by:
findin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
-
find
default PanacheBlockingQuery<Entity> find(String query, io.quarkus.panache.common.Sort sort, Map<String, Object> params) Description copied from interface:PanacheRepositoryQueriesFind entities using a query and the given sort options, with named parameters.- Specified by:
findin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringsort- the sort strategy to useparams-Mapof indexed parameters- Returns:
- a new
PanacheQueryinstance for the given query - See Also:
-
findAll
Description copied from interface:PanacheRepositoryQueriesFind all entities of this type.- Specified by:
findAllin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Returns:
- a new
PanacheQueryinstance to find all entities of this type. - See Also:
-
findAll
Description copied from interface:PanacheRepositoryQueriesFind all entities of this type, in the given order.- Specified by:
findAllin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
sort- the sort order to use- Returns:
- a new
PanacheQueryinstance to find all entities of this type. - See Also:
-
list
Description copied from interface:PanacheRepositoryQueriesFind entities matching a query, with optional indexed parameters. This method is a shortcut forfind(query, params).list().- Specified by:
listin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- a
containing all results, without paging
invalid reference
List - See Also:
-
list
Description copied from interface:PanacheRepositoryQueriesFind entities matching a query and the given sort options, with optional indexed parameters. This method is a shortcut forfind(query, sort, params).list().- Specified by:
listin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - 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
Description copied from interface:PanacheRepositoryQueriesFind entities matching a query, with named parameters. This method is a shortcut forfind(query, params).list().- Specified by:
listin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- a
containing all results, without paging
invalid reference
List - See Also:
-
list
default List<Entity> list(String query, io.quarkus.panache.common.Sort sort, Map<String, Object> params) Description copied from interface:PanacheRepositoryQueriesFind entities matching a query and the given sort options, with named parameters. This method is a shortcut forfind(query, sort, params).list().- Specified by:
listin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - 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
Description copied from interface:PanacheRepositoryQueriesFind all entities of this type. This method is a shortcut forfindAll().list().- Specified by:
listAllin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Returns:
- a
containing all results, without paging
invalid reference
List - See Also:
-
listAll
Description copied from interface:PanacheRepositoryQueriesFind all entities of this type, in the given order. This method is a shortcut forfindAll(sort).list().- Specified by:
listAllin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
sort- the sort order to use- Returns:
- a
containing all results, without paging
invalid reference
List - See Also:
-
stream
Description copied from interface:PanacheRepositoryBlockingQueriesFind entities matching a query, with optional indexed parameters. This method is a shortcut forfind(query, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.- Specified by:
streamin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
-
stream
Description copied from interface:PanacheRepositoryBlockingQueriesFind entities matching a query and the given sort options, with optional indexed parameters. This method is a shortcut forfind(query, sort, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.- Specified by:
streamin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Parameters:
query- aquery stringsort- the sort strategy to useparams- optional sequence of indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
-
stream
Description copied from interface:PanacheRepositoryBlockingQueriesFind entities matching a query, with named parameters. This method is a shortcut forfind(query, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.- Specified by:
streamin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
-
stream
default Stream<Entity> stream(String query, io.quarkus.panache.common.Sort sort, Map<String, Object> params) Description copied from interface:PanacheRepositoryBlockingQueriesFind entities matching a query and the given sort options, with named parameters. This method is a shortcut forfind(query, sort, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.- Specified by:
streamin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Parameters:
query- aquery stringsort- the sort strategy to useparams-Mapof indexed parameters- Returns:
- a
Streamcontaining all results, without paging - See Also:
-
streamAll
Description copied from interface:PanacheRepositoryBlockingQueriesFind all entities of this type. This method is a shortcut forfindAll().stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.- Specified by:
streamAllin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Returns:
- a
Streamcontaining all results, without paging - See Also:
-
streamAll
Description copied from interface:PanacheRepositoryBlockingQueriesFind all entities of this type, in the given order. This method is a shortcut forfindAll().stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.- Specified by:
streamAllin interfacePanacheRepositoryBlockingQueries<Entity,Id> - Returns:
- a
Streamcontaining all results, without paging - See Also:
-
count
Description copied from interface:PanacheRepositoryQueriesCounts the number of this type of entity in the database.- Specified by:
countin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Returns:
- the number of this type of entity in the database.
- See Also:
-
count
Description copied from interface:PanacheRepositoryQueriesCounts the number of this type of entity matching the given query, with optional indexed parameters.- Specified by:
countin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- the number of entities counted.
- See Also:
-
count
Description copied from interface:PanacheRepositoryQueriesCounts the number of this type of entity matching the given query, with named parameters.- Specified by:
countin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- the number of entities counted.
- See Also:
-
deleteAll
Description copied from interface:PanacheRepositoryQueriesDelete 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.- Specified by:
deleteAllin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Returns:
- the number of entities deleted.
- See Also:
-
deleteById
Description copied from interface:PanacheRepositoryQueriesDelete an entity of this type by ID.- Specified by:
deleteByIdin interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
id- the ID of the entity to delete.- Returns:
- false if the entity was not deleted (not found).
-
delete
Description copied from interface:PanacheRepositoryQueriesDelete 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.- Specified by:
deletein interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- the number of entities deleted.
- See Also:
-
delete
Description copied from interface:PanacheRepositoryQueriesDelete 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.- Specified by:
deletein interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- the number of entities deleted.
- See Also:
-
update
Description copied from interface:PanacheRepositoryQueriesUpdate all entities of this type matching the given query, with optional indexed parameters.- Specified by:
updatein interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams- optional sequence of indexed parameters- Returns:
- the number of entities updated.
- See Also:
-
update
Description copied from interface:PanacheRepositoryQueriesUpdate all entities of this type matching the given query, with named parameters.- Specified by:
updatein interfacePanacheRepositoryQueries<Entity,List<Entity>, PanacheBlockingQuery<Entity>, Long, Boolean, Id> - Parameters:
query- aquery stringparams-Mapof named parameters- Returns:
- the number of entities updated.
- See Also:
-