Class APIList<T extends APIEntity>

java.lang.Object
com.testdroid.api.APIEntity
com.testdroid.api.APIList<T>

public class APIList<T extends APIEntity> extends APIEntity
Author:
Ɓukasz Kajda <[email protected]>
  • Constructor Details

  • Method Details

    • getNext

      public String getNext()
      Get full URL of the next page of the collection. Simple call it to fetch next items.
    • setNext

      public void setNext(String next)
    • getNextItems

      public APIList<T> getNextItems() throws APIException
      Throws:
      APIException
    • getPreviousItems

      public APIList<T> getPreviousItems() throws APIException
      Throws:
      APIException
    • getPrevious

      public String getPrevious()
      Get full URL of the previous page of the collection. Simple call it to fetch previous items.
    • setPrevious

      public void setPrevious(String previous)
    • getData

      public List<T> getData()
      Get found data of the list. List contains only set of items contrained with offset, limit and search.
    • setData

      public void setData(List<T> data)
    • get

      public T get(int index)
    • isEmpty

      public boolean isEmpty()
    • getOffset

      public Integer getOffset()
      Get offset of data page returned in getData() method.
    • setOffset

      public void setOffset(Integer offset)
    • getLimit

      public Integer getLimit()
      Get limit of data page returned in getData() method.
    • setLimit

      public void setLimit(Integer limit)
    • getTotal

      public Integer getTotal()
      Get total number of items to be returned - independent from paging.
    • setTotal

      public void setTotal(Integer total)
    • getSearch

      public String getSearch()
      Get search phrase used during retrieving data returned in getData() method.
    • setSearch

      public void setSearch(String search)
    • getSort

      public String getSort()
      Get serialized sort value used during retrieving data returned in getData() method.
    • setSort

      public void setSort(String sort)
    • setContext

      public void setContext(Context<T> context)
    • getContext

      public Context<T> getContext()
    • refresh

      public void refresh() throws APIException
      Overrides:
      refresh in class APIEntity
      Throws:
      APIException
    • filterParam

      public static String filterParam(List<FilterEntry> filters)
    • clone

      protected <S extends APIEntity> void clone(S from)
      Specified by:
      clone in class APIEntity