Uses of Interface
org.springframework.data.jpa.domain.Specification
Packages that use Specification
Package
Description
JPA specific support classes to implement domain classes.
Interfaces and annotations for JPA specific repositories.
Query implementation to execute queries against JPA.
JPA repository implementations.
-
Uses of Specification in org.springframework.data.jpa.domain
Methods in org.springframework.data.jpa.domain that return SpecificationModifier and TypeMethodDescriptionstatic <T> Specification<T> Specification.allOf(Iterable<Specification<T>> specifications) Applies an AND operation to all the givenSpecifications.static <T> Specification<T> Specification.allOf(Specification<T>... specifications) Applies an AND operation to all the givenSpecifications.default Specification<T> Specification.and(PredicateSpecification<T> other) ANDs the givenSpecificationto the current one.default Specification<T> Specification.and(Specification<T> other) ANDs the givenSpecificationto the current one.static <T> Specification<T> Specification.anyOf(Iterable<Specification<T>> specifications) Applies an OR operation to all the givenSpecifications.static <T> Specification<T> Specification.anyOf(Specification<T>... specifications) Applies an OR operation to all the givenSpecifications.static <T> Specification<T> Specification.not(Specification<T> spec) Negates the givenSpecification.default Specification<T> Specification.or(PredicateSpecification<T> other) ORs the given specification to the current one.default Specification<T> Specification.or(Specification<T> other) ORs the given specification to the current one.static <T> Specification<T> Specification.unrestricted()Simple static factory method to create a specification matching all objects.static <T> Specification<T> Specification.where(PredicateSpecification<T> spec) Simple static factory method to add some syntactic sugar translatingPredicateSpecificationtoSpecification.Methods in org.springframework.data.jpa.domain with parameters of type SpecificationModifier and TypeMethodDescriptionstatic <T> Specification<T> Specification.allOf(Specification<T>... specifications) Applies an AND operation to all the givenSpecifications.default Specification<T> Specification.and(Specification<T> other) ANDs the givenSpecificationto the current one.static <T> Specification<T> Specification.anyOf(Specification<T>... specifications) Applies an OR operation to all the givenSpecifications.static <T> Specification<T> Specification.not(Specification<T> spec) Negates the givenSpecification.default Specification<T> Specification.or(Specification<T> other) ORs the given specification to the current one.Method parameters in org.springframework.data.jpa.domain with type arguments of type SpecificationModifier and TypeMethodDescriptionstatic <T> Specification<T> Specification.allOf(Iterable<Specification<T>> specifications) Applies an AND operation to all the givenSpecifications.static <T> Specification<T> Specification.anyOf(Iterable<Specification<T>> specifications) Applies an OR operation to all the givenSpecifications. -
Uses of Specification in org.springframework.data.jpa.repository
Methods in org.springframework.data.jpa.repository with parameters of type SpecificationModifier and TypeMethodDescriptionlongJpaSpecificationExecutor.count(Specification<T> spec) Returns the number of instances that the givenSpecificationwill return.booleanJpaSpecificationExecutor.exists(Specification<T> spec) Checks whether the data store contains elements that match the givenSpecification.JpaSpecificationExecutor.findAll(@Nullable Specification<T> spec, @Nullable Specification<T> countSpec, Pageable pageable) Returns aPageof entities matching the givenSpecification.JpaSpecificationExecutor.findAll(Specification<T> spec) Returns all entities matching the givenSpecification.JpaSpecificationExecutor.findAll(Specification<T> spec, Pageable pageable) Returns aPageof entities matching the givenSpecification.JpaSpecificationExecutor.findAll(Specification<T> spec, Sort sort) Returns all entities matching the givenSpecificationandSort.<S extends T, R>
RJpaSpecificationExecutor.findBy(Specification<T> spec, Function<? super JpaSpecificationExecutor.SpecificationFluentQuery<S>, R> queryFunction) Returns entities matching the givenSpecificationapplying thequeryFunctionthat defines the query and its result type.JpaSpecificationExecutor.findOne(Specification<T> spec) Returns a single entity matching the givenSpecificationorOptional.empty()if none found.JpaSpecificationExecutor.SpecificationFluentQuery.page(Pageable pageable, Specification<?> countSpec) Get a page of matching elements forPageableand provide a customcount specification. -
Uses of Specification in org.springframework.data.jpa.repository.query
Classes in org.springframework.data.jpa.repository.query that implement SpecificationModifier and TypeClassDescriptionfinal recordSpecificationto create scroll queries using keyset-scrolling. -
Uses of Specification in org.springframework.data.jpa.repository.support
Methods in org.springframework.data.jpa.repository.support with parameters of type SpecificationModifier and TypeMethodDescriptionlongSimpleJpaRepository.count(Specification<T> spec) booleanSimpleJpaRepository.exists(Specification<T> spec) SimpleJpaRepository.findAll(@Nullable Specification<T> spec, @Nullable Specification<T> countSpec, Pageable pageable) SimpleJpaRepository.findAll(Specification<T> spec) SimpleJpaRepository.findAll(Specification<T> spec, Pageable pageable) SimpleJpaRepository.findAll(Specification<T> spec, Sort sort) <S extends T, R>
RSimpleJpaRepository.findBy(Specification<T> spec, Function<? super JpaSpecificationExecutor.SpecificationFluentQuery<S>, R> queryFunction) SimpleJpaRepository.findOne(Specification<T> spec) SimpleJpaRepository.getCountQuery(Specification<S> spec, Class<S> domainClass) Creates a new count query for the givenSpecification.protected jakarta.persistence.TypedQuery<Long> SimpleJpaRepository.getCountQuery(Specification<T> spec) Deprecated.protected <S extends T>
jakarta.persistence.TypedQuery<S> SimpleJpaRepository.getQuery(@Nullable Specification<S> spec, Class<S> domainClass, Sort sort) protected jakarta.persistence.TypedQuery<T> SimpleJpaRepository.getQuery(@Nullable Specification<T> spec, Pageable pageable) Creates a newTypedQueryfrom the givenSpecification.protected <S extends T>
jakarta.persistence.TypedQuery<S> SimpleJpaRepository.getQuery(Specification<S> spec, Class<S> domainClass, Pageable pageable) Creates a newTypedQueryfrom the givenSpecification.protected jakarta.persistence.TypedQuery<T> SimpleJpaRepository.getQuery(Specification<T> spec, Sort sort) SimpleJpaRepository.readPage(jakarta.persistence.TypedQuery<S> query, Class<S> domainClass, Pageable pageable, @Nullable Specification<S> spec) SimpleJpaRepository.readPage(jakarta.persistence.TypedQuery<T> query, Pageable pageable, Specification<T> spec) Deprecated.
SimpleJpaRepository.getCountQuery(Specification, Class)instead