Interface ApiJpaQueryByExampleWithDynamicProjection<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default <P> com.totvs.tjf.core.api.jpa.repository.ApiJpaCollectionResult<P> findAllProjected​(org.springframework.data.domain.Example<T> example, Class<P> projection, com.totvs.tjf.core.api.context.request.ApiPageRequest page)
      Returns all entities for the ApiPageRequest.
      default <P> com.totvs.tjf.core.api.jpa.repository.ApiJpaCollectionResult<P> findAllProjected​(org.springframework.data.domain.Example<T> example, Class<P> projection, com.totvs.tjf.core.api.context.request.ApiPageRequest page, com.totvs.tjf.core.api.context.request.ApiSortRequest sort)
      Returns all entities for the ApiPageRequest.
      <P> com.totvs.tjf.core.api.jpa.repository.ApiJpaCollectionResult<P> findAllProjected​(org.springframework.data.domain.Example<T> example, Class<P> projection, com.totvs.tjf.core.api.context.request.ApiSortedPageRequest sortedPage)
      Returns all entities for the ApiPageRequest.
      <P> Optional<P> findOneProjected​(org.springframework.data.domain.Example<T> example, Class<P> projection)
      Returns a single entity matching the given Example or Optional.empty() if none found.
    • Method Detail

      • findOneProjected

        <P> Optional<P> findOneProjected​(org.springframework.data.domain.Example<T> example,
                                         Class<P> projection)
        Returns a single entity matching the given Example or Optional.empty() if none found.
        Parameters:
        example - can not be null.
        projection - the projection to be used, must not be null.
        Returns:
        an Optional instance with the projections of the requested entity if found any, otherwise Optional.empty().
      • findAllProjected

        default <P> com.totvs.tjf.core.api.jpa.repository.ApiJpaCollectionResult<P> findAllProjected​(org.springframework.data.domain.Example<T> example,
                                                                                                     Class<P> projection,
                                                                                                     @Nullable
                                                                                                     com.totvs.tjf.core.api.context.request.ApiPageRequest page)
        Returns all entities for the ApiPageRequest.
        Parameters:
        example - can not be null.
        projection - the projection to be used, must not be null.
        page - can not be null.
        Returns:
        a ApiJpaCollectionResult with the projections of entities found, otherwise an empty ApiJpaCollectionResult.
      • findAllProjected

        default <P> com.totvs.tjf.core.api.jpa.repository.ApiJpaCollectionResult<P> findAllProjected​(org.springframework.data.domain.Example<T> example,
                                                                                                     Class<P> projection,
                                                                                                     @Nullable
                                                                                                     com.totvs.tjf.core.api.context.request.ApiPageRequest page,
                                                                                                     @Nullable
                                                                                                     com.totvs.tjf.core.api.context.request.ApiSortRequest sort)
        Returns all entities for the ApiPageRequest.
        Parameters:
        example - can not be null.
        projection - the projection to be used, must not be null.
        page - can not be null.
        sort - can be null.
        Returns:
        a ApiJpaCollectionResult with the projections of entities found, otherwise an empty ApiJpaCollectionResult.
      • findAllProjected

        <P> com.totvs.tjf.core.api.jpa.repository.ApiJpaCollectionResult<P> findAllProjected​(org.springframework.data.domain.Example<T> example,
                                                                                             Class<P> projection,
                                                                                             @Nullable
                                                                                             com.totvs.tjf.core.api.context.request.ApiSortedPageRequest sortedPage)
        Returns all entities for the ApiPageRequest.
        Parameters:
        example - can not be null.
        projection - the projection to be used, must not be null.
        sortedPage - can be null.
        Returns:
        a ApiJpaCollectionResult with the projections of entities found, otherwise an empty ApiJpaCollectionResult.