com.atlassian.plugins.rest.common.expand.entity
Class AbstractPagedListWrapper<T>

java.lang.Object
  extended by com.atlassian.plugins.rest.common.expand.entity.AbstractPagedListWrapper<T>
Type Parameters:
T - the type of element in the list to wrap.
All Implemented Interfaces:
ListWrapper<T>

public abstract class AbstractPagedListWrapper<T>
extends java.lang.Object
implements ListWrapper<T>

An abstract list wrapper that provides support for paging information:


Constructor Summary
protected AbstractPagedListWrapper(int size, int maxResults)
           
 
Method Summary
 ListWrapperCallback<T> getCallback()
           
 int getMaxResults()
           
abstract  ListWrapperCallback<T> getPagingCallback()
          Gets the call back that will actually "retrieve" the necessary element to populate the List.
 int getSize()
           
 java.lang.Integer getStartIndex()
           
 void setStartIndex(int startIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPagedListWrapper

protected AbstractPagedListWrapper(int size,
                                   int maxResults)
Method Detail

getStartIndex

public java.lang.Integer getStartIndex()

getSize

public int getSize()

getMaxResults

public int getMaxResults()

setStartIndex

public void setStartIndex(int startIndex)

getCallback

public final ListWrapperCallback<T> getCallback()
Specified by:
getCallback in interface ListWrapper<T>

getPagingCallback

public abstract ListWrapperCallback<T> getPagingCallback()
Gets the call back that will actually "retrieve" the necessary element to populate the List. Size, index and max result attributes are already set by this abstract class, no need to worry about them.

Returns:
the call back that does all the work.


Copyright © 2014 Atlassian. All Rights Reserved.