com.atlassian.confluence.internal.pagination
Class LimitedRequestImpl

java.lang.Object
  extended by com.atlassian.confluence.internal.pagination.LimitedRequestImpl
All Implemented Interfaces:
LimitedRequest

public class LimitedRequestImpl
extends java.lang.Object
implements LimitedRequest


Constructor Summary
LimitedRequestImpl(int start, int limit, int maxLimit)
           
LimitedRequestImpl(int start, int limit, int needed, int maxLimit)
           
LimitedRequestImpl(PageRequest request, int maxLimit)
           
 
Method Summary
static LimitedRequestImpl create(int maxLimit)
           
static LimitedRequestImpl create(PageRequest request, int maxLimit)
           
 int getLimit()
           
 int getMaxLimit()
           
 int getNeeded()
           
 int getStart()
          start index for the page of results
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LimitedRequestImpl

public LimitedRequestImpl(PageRequest request,
                          int maxLimit)

LimitedRequestImpl

public LimitedRequestImpl(int start,
                          int limit,
                          int maxLimit)

LimitedRequestImpl

public LimitedRequestImpl(int start,
                          int limit,
                          int needed,
                          int maxLimit)
Method Detail

create

public static LimitedRequestImpl create(PageRequest request,
                                        int maxLimit)

create

public static LimitedRequestImpl create(int maxLimit)

getNeeded

public int getNeeded()
Specified by:
getNeeded in interface LimitedRequest
Returns:
the number of results needed to return to fulfill this request, may exceed getLimit

getStart

public int getStart()
Description copied from interface: LimitedRequest
start index for the page of results

Specified by:
getStart in interface LimitedRequest

getLimit

public int getLimit()
Specified by:
getLimit in interface LimitedRequest
Returns:
the maximum results to fetch to attempt to fulfil the request

getMaxLimit

public int getMaxLimit()
Specified by:
getMaxLimit in interface LimitedRequest
Returns:
the maximum limit for this request

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.