org.ikasan.framework.management.search
Class ArrayListPagedSearchResult<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
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
| 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 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 |
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 setfirstResult - - index of the first result shown here into the larger super set of resultsresultSize - - size of the larger super set of results
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.