org.ikasan.framework.management.search
Class ArrayListPagedSearchResult<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.ikasan.framework.management.search.ArrayListPagedSearchResult<T>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, PagedSearchResult<T>

public class ArrayListPagedSearchResult<T>
extends ArrayList<T>
implements PagedSearchResult<T>

This class is intended to be used as a DTO for transporting a subset of search results for some domain object from a larger set of searched results. This is intended to support paging. For example we may be performing a search for some domain entities that would return 1000 results if not paged. For performance and usability reasons, a search result of 1000 entries may not be desired. This class allows for sub result set to be returned, including enough information to establish its position within the superset, as well as the size of the super set

Author:
Ikasan Development Team
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ArrayListPagedSearchResult(List<T> pagedResults, int firstResultIndex, long resultSize)
          Constructor
 
Method Summary
 int getFirstResultIndex()
          Accessor for first result
 long getResultSize()
          Accessor for resultSize
 boolean isLastPage()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

ArrayListPagedSearchResult

public ArrayListPagedSearchResult(List<T> pagedResults,
                                  int firstResultIndex,
                                  long resultSize)
Constructor

Parameters:
pagedResults - - search results comprising a single page of results from a larger super set
firstResult - - index of the first result shown here into the larger super set of results
resultSize - - size of the larger super set of results
Method Detail

getFirstResultIndex

public int getFirstResultIndex()
Accessor for first result

Specified by:
getFirstResultIndex in interface PagedSearchResult<T>
Returns:
index of the first result shown here into the larger super set of results

getResultSize

public long getResultSize()
Accessor for resultSize

Specified by:
getResultSize in interface PagedSearchResult<T>
Returns:
size of the larger super result set

isLastPage

public boolean isLastPage()
Specified by:
isLastPage in interface PagedSearchResult<T>
Returns:
true if this represents the last page in the super result set


Copyright © 2007-2012 Ikasan. All Rights Reserved.