E
- public class ResourceList<E> extends ArrayList<E>
Modifier and Type | Field and Description |
---|---|
protected Class<E> |
clazz |
protected String |
firstLink |
protected int |
index |
protected String |
nextLink |
protected int |
page |
protected String |
previousLink |
protected String |
resourceUri |
protected int |
size |
modCount
Constructor and Description |
---|
ResourceList(int page,
int size,
String resourceUri,
Class<E> clazz) |
ResourceList(String resourceUri,
Class<E> clazz) |
Modifier and Type | Method and Description |
---|---|
Client |
getClient() |
String |
getFirstLink() |
String |
getNextLink() |
protected void |
getNextPage()
This method updates the page value, creates the params for the API call and clears the current list
|
protected void |
getPage(org.json.simple.JSONObject params)
This method makes the API call to get the list value for the specified resource.
|
String |
getPreviousLink() |
RestResponse |
getResponse() |
void |
initialize()
initializes ArrayList with first page from BW API
|
Iterator<E> |
iterator()
Customer iterator calls out to BW API when there is more data to retrieve
|
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
void |
setClient(Client client) |
void |
setFirstLink(String firstLink) |
void |
setNextLink(String nextLink) |
void |
setPreviousLink(String previousLink) |
void |
setResponse(RestResponse response) |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
protected int page
protected int size
protected int index
protected String previousLink
protected String nextLink
protected String firstLink
protected String resourceUri
public void initialize()
public Iterator<E> iterator()
protected void getNextPage()
protected void getPage(org.json.simple.JSONObject params)
params
- public ListIterator<E> listIterator()
listIterator
in interface List<E>
listIterator
in class ArrayList<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
listIterator
in class ArrayList<E>
public String getPreviousLink()
public void setPreviousLink(String previousLink)
public String getNextLink()
public void setNextLink(String nextLink)
public String getFirstLink()
public void setFirstLink(String firstLink)
public RestResponse getResponse()
public void setResponse(RestResponse response)
public Client getClient()
public void setClient(Client client)
Copyright © 2014. All Rights Reserved.