Class ApiJpaCollectionResultImpl<T>

java.lang.Object
com.totvs.tjf.api.jpa.repository.impl.ApiJpaCollectionResultImpl<T>
Type Parameters:
T - type of the data transfer object for the records found.
All Implemented Interfaces:
com.totvs.tjf.api.context.jpa.ApiJpaCollectionResult<T>

@Deprecated(since="3.0.0-RELEASE", forRemoval=true) public class ApiJpaCollectionResultImpl<T> extends Object implements com.totvs.tjf.api.context.jpa.ApiJpaCollectionResult<T>
Deprecated, for removal: This API element is subject to removal in a future version.
Standard implementation for the record JPA collection result.
Author:
Marcos Paulo dos Santos
  • Method Details

    • hasNext

      public boolean hasNext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if the query has more items.
      Specified by:
      hasNext in interface com.totvs.tjf.api.context.jpa.ApiJpaCollectionResult<T>
      Returns:
      true if the query has more items to handle, otherwise, false
    • getItems

      public Collection<T> getItems()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the collection of records found.
      Specified by:
      getItems in interface com.totvs.tjf.api.context.jpa.ApiJpaCollectionResult<T>
      Returns:
      collection of records
    • from

      public static <T> ApiJpaCollectionResultImpl<T> from(org.springframework.data.domain.Page<T> page)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create an instance of ApiJpaCollectionResultImpl with a collection of records and no more items to be handled.
      Parameters:
      page - a Spring JPA page with list of objects.
      Returns:
      an instance of ApiJpaCollectionResultImpl
    • from

      public static <T> ApiJpaCollectionResultImpl<T> from(Collection<T> result)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create an instance of ApiJpaCollectionResultImpl with a collection of records and no more items to be handled.
      Parameters:
      result - collection of records
      Returns:
      an instance of ApiJpaCollectionResultImpl
    • of

      public static <T> ApiJpaCollectionResultImpl<T> of(Collection<T> result, boolean hasNext)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create an instance of ApiJpaCollectionResultImpl with a collection of records and if it have more items.
      Parameters:
      result - collection of records
      hasNext - query has more items to handle
      Returns:
      an instance of ApiJpaCollectionResultImpl