Class Pager


  • public class Pager
    extends Object
    Data transfer object (DTO) used primarily within the SDK to easily specify various criteria supporting paging operations. This class follows the builder pattern and contains an inner static Builder class used to build this object with the various attributes/properties.
    Since:
    0.0.1
    Author:
    David Kumar
    • Constructor Detail

      • Pager

        public Pager()
    • Method Detail

      • getResourceName

        public String getResourceName()
        Gets the resource name as assigned by the Builder.
        Returns:
        The name of the given resource.
      • setResourceName

        public void setResourceName​(String resourceName)
        Sets the resource name.
        Parameters:
        resourceName - The resource name to set.
      • getVersion

        public String getVersion()
        Gets the version (media-type) as assigned by the Builder.
        Returns:
        The version of the given resource.
      • setVersion

        public void setVersion​(String version)
        Sets the version (media-type) of the given resource
        Parameters:
        version - The resource version to set.
      • getCriteriaFilter

        public String getCriteriaFilter()
        Gets the request URL criteria filter as assigned by the Builder.
        Returns:
        The request URL criteria filter.
      • setCriteriaFilter

        public void setCriteriaFilter​(String criteriaFilter)
        Sets the request URL criteria filter.
        Parameters:
        criteriaFilter - The criteria filter contained in the request URL.
      • getNamedQueryFilter

        public String getNamedQueryFilter()
        Gets the named query request URL filter as assigned by the Builder.
        Returns:
        The request URL named query filter.
      • setNamedQueryFilter

        public void setNamedQueryFilter​(String namedQueryFilter)
        Sets the request URL named query filter.
        Parameters:
        namedQueryFilter - The named query filter contained in the request URL.
      • getFilterMap

        public String getFilterMap()
        Gets the filter map string as assigned by the Builder.
        Returns:
        The request URL filter map.
      • setFilterMap

        public void setFilterMap​(String filterMap)
        Sets the request URL filter map string.
        Parameters:
        filterMap - The request URL filter map value.
      • getQapiRequestBody

        public String getQapiRequestBody()
        Gets the QAPI request body as assigned by the builder.
        Returns:
        The QAPI request body.
      • setQapiRequestBody

        public void setQapiRequestBody​(String qapiRequestBody)
        Sets the QAPI request body.
        Parameters:
        qapiRequestBody - The QAPI request body content.
      • getHowToPage

        public Pager.PagingType getHowToPage()
        Gets the paging type to determine how to page.
        Returns:
        A PagingType enum.
      • setHowToPage

        public void setHowToPage​(Pager.PagingType howToPage)
        Sets the payingType enum for how paging should be done.
        Parameters:
        howToPage - The paging type enum to set.
      • getPageSize

        public int getPageSize()
        Gets the page size, or the number of rows in each page (response) as assigned by the Builder.
        Returns:
        The page size.
      • setPageSize

        public void setPageSize​(int pageSize)
        Sets the page size.
        Parameters:
        pageSize - The page size to set.
      • getNumPages

        public int getNumPages()
        Gets the number of pages to page for as assigned by the Builder.
        Returns:
        The number of pages to page for.
      • setNumPages

        public void setNumPages​(int numPages)
        Sets the number of pages to page for.
        Parameters:
        numPages - The number of pages to page for.
      • getNumRows

        public int getNumRows()
        Gets the number of rows to page for as assigned by the Builder. Data is returned in pages up to the number of rows (if specified).
        Returns:
        The number of rows to page for.
      • setNumRows

        public void setNumRows​(int numRows)
        Sets the number of rows to page for.
        Parameters:
        numRows - The number of rows to page for.
      • getTotalCount

        public int getTotalCount()
        Gets the total count (number of rows) for the given resource, as assigned by the Builder.
        Returns:
        The total count (number of rows) for the given resource.
      • setTotalCount

        public void setTotalCount​(int totalCount)
        Sets the total count (number of rows) for the given resource.
        Parameters:
        totalCount - The total count (number of rows) for the given resource.
      • getOffset

        public int getOffset()
        Gets the offset to begin paging from as assigned by the Builder.
        Returns:
        The offset (row num) to start paging from.
      • setOffset

        public void setOffset​(int offset)
        Sets the offset to begin paging from.
        Parameters:
        offset - The offset to start paging from.
      • isShouldDoPaging

        public boolean isShouldDoPaging()
        Gets the shouldDoPaging indicator as assigned by the Builder.
        Returns:
        The indicator showing whether paging should be done (true), or not (false).
      • setShouldDoPaging

        public void setShouldDoPaging​(boolean shouldDoPaging)
        Sets the shouldDoPaging indicator.
        Parameters:
        shouldDoPaging - The indicator to determine whether paging should be done (true), or not (false).
      • getEthosResponse

        public EthosResponse getEthosResponse()
        Gets the initial EthosResponse that was made to determine if paging was needed, as assigned by the Builder.
        Returns:
        The ethosResponse (containing the total count) used to determine if paging was needed.
      • setEthosResponse

        public void setEthosResponse​(EthosResponse ethosResponse)
        Sets the initial ethosResponse used to determine if paging is needed.
        Parameters:
        ethosResponse - The initial ethosResponse used to determine if paging is needed.