Package io.micronaut.data.jpa.repository
Interface JpaSpecificationExecutor<T>
- Type Parameters:
T
- The entity type
Deprecated, for removal: This API element is subject to removal in a future version.
Interface to allow execution of
Specification
s based on the JPA criteria API.
Note: Forked from 'org.springframework.data.jpa.repository.JpaSpecificationExecutor'.- Since:
- 3.1
- Author:
- Oliver Gierke, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionlong
count
(@Nullable Specification<T> spec) Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of instances that the givenSpecification
will return.findAll
(@Nullable Specification<T> spec) Deprecated, for removal: This API element is subject to removal in a future version.Returns all entities matching the givenSpecification
.findAll
(@Nullable Specification<T> spec, Pageable pageable) Deprecated, for removal: This API element is subject to removal in a future version.Returns aPage
of entities matching the givenSpecification
.findAll
(@Nullable Specification<T> spec, Sort sort) Deprecated, for removal: This API element is subject to removal in a future version.Returns all entities matching the givenSpecification
andSort
.findOne
(@Nullable Specification<T> spec) Deprecated, for removal: This API element is subject to removal in a future version.Returns a single entity matching the givenSpecification
orOptional.empty()
if none found.
-
Method Details
-
findOne
Deprecated, for removal: This API element is subject to removal in a future version.Returns a single entity matching the givenSpecification
orOptional.empty()
if none found.- Parameters:
spec
- can be null.- Returns:
- never null.
-
findAll
Deprecated, for removal: This API element is subject to removal in a future version.Returns all entities matching the givenSpecification
.- Parameters:
spec
- can be null.- Returns:
- never null.
-
findAll
Deprecated, for removal: This API element is subject to removal in a future version.Returns aPage
of entities matching the givenSpecification
.- Parameters:
spec
- can be null.pageable
- must not be null.- Returns:
- never null.
-
findAll
Deprecated, for removal: This API element is subject to removal in a future version.Returns all entities matching the givenSpecification
andSort
.- Parameters:
spec
- can be null.sort
- must not be null.- Returns:
- never null.
-
count
Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of instances that the givenSpecification
will return.- Parameters:
spec
- theSpecification
to count instances for. Can be null.- Returns:
- the number of instances.
-
JpaSpecificationExecutor