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) 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) 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.static <T> Specification<T>Specification.unrestricted()Simple static factory method to create a specification which does not participate in matching.static <T> Specification<T>Specification.where(Specification<T> spec) Deprecated, for removal: This API element is subject to removal in a future version.since 3.5, to be removed with 4.0 as we no longer want to support null specifications.Methods in org.springframework.data.jpa.domain with parameters of type SpecificationModifier and TypeMethodDescriptionstatic <T> Specification<T>Specification.allOf(Specification<T>... specifications) default Specification<T>Specification.and(Specification<T> other) ANDs the givenSpecificationto the current one.static <T> Specification<T>Specification.anyOf(Specification<T>... specifications) 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.static <T> Specification<T>Specification.where(Specification<T> spec) Deprecated, for removal: This API element is subject to removal in a future version.since 3.5, to be removed with 4.0 as we no longer want to support null specifications.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.longJpaSpecificationExecutor.delete(Specification<T> spec) Deletes by theSpecificationand returns the number of rows deleted.booleanJpaSpecificationExecutor.exists(Specification<T> spec) Checks whether the data store contains elements that match 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.JpaSpecificationExecutor.findAll(Specification<T> spec, Specification<T> countSpec, Pageable pageable) Returns aPageof entities matching the givenSpecification.<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) longSimpleJpaRepository.delete(Specification<T> spec) booleanSimpleJpaRepository.exists(Specification<T> spec) SimpleJpaRepository.findAll(Specification<T> spec) SimpleJpaRepository.findAll(Specification<T> spec, Pageable pageable) SimpleJpaRepository.findAll(Specification<T> spec, Sort sort) SimpleJpaRepository.findAll(Specification<T> spec, Specification<T> countSpec, Pageable pageable) <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.overrideSimpleJpaRepository.getCountQuery(Specification, Class)insteadprotected <S extends T>
jakarta.persistence.TypedQuery<S>SimpleJpaRepository.getQuery(Specification<S> spec, Class<S> domainClass, Pageable pageable) Creates a newTypedQueryfrom the givenSpecification.protected <S extends T>
jakarta.persistence.TypedQuery<S>SimpleJpaRepository.getQuery(Specification<S> spec, Class<S> domainClass, Sort sort) protected jakarta.persistence.TypedQuery<T>SimpleJpaRepository.getQuery(Specification<T> spec, 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, Specification<S> spec) SimpleJpaRepository.readPage(jakarta.persistence.TypedQuery<T> query, Pageable pageable, Specification<T> spec) Deprecated.