Class TokenPaginatedResult<T>

  • Type Parameters:
    T - the type of data contained in the paginated result

    public class TokenPaginatedResult<T>
    extends java.lang.Object
    Represents a generic token-based paginated result that can contain any type of data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<T> getData()
      Gets the list of data items.
      java.lang.String getLastKey()
      Gets the token for retrieving the next page of results.
      boolean hasMorePages()
      Checks if there are more pages available.
      TokenPaginatedResult<T> setData​(java.util.List<T> data)
      Sets the list of data items.
      TokenPaginatedResult<T> setLastKey​(java.lang.String lastKey)
      Sets the token for retrieving the next page of results.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TokenPaginatedResult

        public TokenPaginatedResult()
    • Method Detail

      • getData

        public java.util.List<T> getData()
        Gets the list of data items.
        Returns:
        the data
      • setData

        public TokenPaginatedResult<T> setData​(java.util.List<T> data)
        Sets the list of data items.
        Parameters:
        data - the data
        Returns:
        this TokenPaginatedResult instance for method chaining
      • getLastKey

        public java.lang.String getLastKey()
        Gets the token for retrieving the next page of results.
        Returns:
        the last key
      • setLastKey

        public TokenPaginatedResult<T> setLastKey​(java.lang.String lastKey)
        Sets the token for retrieving the next page of results.
        Parameters:
        lastKey - the last key
        Returns:
        this TokenPaginatedResult instance for method chaining
      • hasMorePages

        public boolean hasMorePages()
        Checks if there are more pages available.
        Returns:
        true if there are more pages (lastKey is not null and not empty), false otherwise