Class PagingState


  • public class PagingState
    extends Object
    The paging state of a query.

    This object represents the next page to be fetched if the query is multi page. It can be saved and reused later on the same statement.

    The PagingState can be serialized and deserialized either as a String or as a byte array.

    See Also:
    Statement.setPagingState(PagingState)
    • Method Detail

      • fromString

        public static PagingState fromString​(String string)
        Create a PagingState object from a string previously generated with toString().
        Parameters:
        string - the string value.
        Returns:
        the PagingState object created.
        Throws:
        PagingStateException - if the string does not have the correct format.
      • toBytes

        public byte[] toBytes()
        Return a representation of the paging state object as a byte array.
        Returns:
        the paging state as a byte array.
      • fromBytes

        public static PagingState fromBytes​(byte[] pagingState)
        Create a PagingState object from a byte array previously generated with toBytes().
        Parameters:
        pagingState - The byte array representation.
        Returns:
        the PagingState object created.
        Throws:
        PagingStateException - if the byte array does not have the correct format.