org.rhq.core.domain.util
Class PageList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by org.rhq.core.domain.util.PageList<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class PageList<E>
extends ArrayList<E>
implements Serializable

Tracks the result set for a paginated data lookup. Includes the data and the total rows that are available.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PageList()
           
PageList(Collection<? extends E> collection, int totalSize, PageControl pageControl)
           
PageList(Collection<? extends E> collection, PageControl pageControl)
          Used to represent a result set when the cardinality of the data is not needed
PageList(int totalSize, PageControl pageControl)
          Used to represent the cardinality of a result set without when the data is not needed
PageList(PageControl pageControl)
           
 
Method Summary
 PageControl getPageControl()
           
 int getTotalSize()
          Returns the total size of the "master list" that this page is a subset of.
 ArrayList<E> getValues()
           
 boolean isUnbounded()
           
 void setPageControl(PageControl pageControl)
           
 void setTotalSize(int totalSize)
          Sets the total size of the "master list" that this page is a subset of.
 void setUnbounded(boolean isUnbounded)
           
 void setValues(ArrayList<E> values)
           
 String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode
 

Constructor Detail

PageList

public PageList()

PageList

public PageList(PageControl pageControl)

PageList

public PageList(int totalSize,
                PageControl pageControl)
Used to represent the cardinality of a result set without when the data is not needed

See Also:
Criteria.Restriction#COUNT_ONLY

PageList

public PageList(Collection<? extends E> collection,
                PageControl pageControl)
Used to represent a result set when the cardinality of the data is not needed

See Also:
Criteria.Restriction#COLLECTION_ONLY

PageList

public PageList(Collection<? extends E> collection,
                int totalSize,
                PageControl pageControl)
Method Detail

getPageControl

public PageControl getPageControl()

setPageControl

public void setPageControl(PageControl pageControl)

getValues

public ArrayList<E> getValues()

setValues

public void setValues(ArrayList<E> values)

getTotalSize

public int getTotalSize()
Returns the total size of the "master list" that this page is a subset of.

Returns:
Value of property listSize.

setTotalSize

public void setTotalSize(int totalSize)
Sets the total size of the "master list" that this page is a subset of.

Parameters:
totalSize - New value of property totalSize.

isUnbounded

public boolean isUnbounded()

setUnbounded

public void setUnbounded(boolean isUnbounded)

toString

public String toString()
Overrides:
toString in class AbstractCollection<E>


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.