Class FetchableFluentQueryBySpecification<S,R>

java.lang.Object
com.blazebit.persistence.spring.data.base.repository.FluentQuerySupport<S,R>
com.blazebit.persistence.spring.data.base.repository.FetchableFluentQueryBySpecification<S,R>
Type Parameters:
S - Domain type
R - Result type
All Implemented Interfaces:
org.springframework.data.repository.query.FluentQuery<R>, org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R>

public class FetchableFluentQueryBySpecification<S,R> extends FluentQuerySupport<S,R> implements org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R>
Immutable implementation of FluentQuery.FetchableFluentQuery based on a Specification. All methods that return a FluentQuery.FetchableFluentQuery will return a new instance, not the original.
Since:
3.0
Author:
Greg Turnquist
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.repository.query.FluentQuery

    org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<T extends Object>, org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery<T extends Object>
  • Field Summary

    Fields inherited from class com.blazebit.persistence.spring.data.base.repository.FluentQuerySupport

    entityType, limit, properties, resultType, sort
  • Constructor Summary

    Constructors
    Constructor
    Description
    FetchableFluentQueryBySpecification(org.springframework.data.jpa.domain.Specification<S> spec, Class<S> entityType, Function<org.springframework.data.domain.Sort,jakarta.persistence.TypedQuery<S>> finder, com.blazebit.persistence.spring.data.base.repository.FetchableFluentQueryBySpecification.SpecificationScrollDelegate<S> scrollDelegate, Function<org.springframework.data.jpa.domain.Specification<S>,Long> countOperation, Function<org.springframework.data.jpa.domain.Specification<S>,Boolean> existsOperation, jakarta.persistence.EntityManager entityManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
     
    <NR> org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<NR>
    as(Class<NR> resultType)
     
    long
     
    boolean
     
     
    org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R>
    limit(int limit)
     
     
    org.springframework.data.domain.Page<R>
    page(org.springframework.data.domain.Pageable pageable)
     
    org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R>
    project(Collection<String> properties)
     
    org.springframework.data.domain.Window<R>
    scroll(org.springframework.data.domain.ScrollPosition scrollPosition)
     
    org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R>
    sortBy(org.springframework.data.domain.Sort sort)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery

    first, one, project
  • Constructor Details

    • FetchableFluentQueryBySpecification

      public FetchableFluentQueryBySpecification(org.springframework.data.jpa.domain.Specification<S> spec, Class<S> entityType, Function<org.springframework.data.domain.Sort,jakarta.persistence.TypedQuery<S>> finder, com.blazebit.persistence.spring.data.base.repository.FetchableFluentQueryBySpecification.SpecificationScrollDelegate<S> scrollDelegate, Function<org.springframework.data.jpa.domain.Specification<S>,Long> countOperation, Function<org.springframework.data.jpa.domain.Specification<S>,Boolean> existsOperation, jakarta.persistence.EntityManager entityManager)
  • Method Details

    • sortBy

      public org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R> sortBy(org.springframework.data.domain.Sort sort)
      Specified by:
      sortBy in interface org.springframework.data.repository.query.FluentQuery<S>
      Specified by:
      sortBy in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • limit

      public org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R> limit(int limit)
      Specified by:
      limit in interface org.springframework.data.repository.query.FluentQuery<S>
      Specified by:
      limit in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • as

      public <NR> org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<NR> as(Class<NR> resultType)
      Specified by:
      as in interface org.springframework.data.repository.query.FluentQuery<S>
      Specified by:
      as in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • project

      public org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<R> project(Collection<String> properties)
      Specified by:
      project in interface org.springframework.data.repository.query.FluentQuery<S>
      Specified by:
      project in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • oneValue

      public R oneValue()
      Specified by:
      oneValue in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • firstValue

      public R firstValue()
      Specified by:
      firstValue in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • all

      public List<R> all()
      Specified by:
      all in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • scroll

      public org.springframework.data.domain.Window<R> scroll(org.springframework.data.domain.ScrollPosition scrollPosition)
      Specified by:
      scroll in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • page

      public org.springframework.data.domain.Page<R> page(org.springframework.data.domain.Pageable pageable)
      Specified by:
      page in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • stream

      public Stream<R> stream()
      Specified by:
      stream in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • count

      public long count()
      Specified by:
      count in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>
    • exists

      public boolean exists()
      Specified by:
      exists in interface org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>