org.eclipse.stardust.engine.api.query
Class AbstractQueryResult<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.eclipse.stardust.engine.api.query.AbstractQueryResult<T>
- All Implemented Interfaces:
- Serializable, Iterable<T>, Collection<T>, List<T>, QueryResult<T>
- Direct Known Subclasses:
- ActivityInstances, BusinessObjects, Documents, LogEntries, Models, ProcessDefinitions, ProcessInstances, UserGroups, Users
public abstract class AbstractQueryResult<T>
- extends AbstractList<T>
- implements QueryResult<T>, Serializable
- Version:
- $Revision$
- Author:
- rsauer
- See Also:
- Serialized Form
|
Method Summary |
T |
get(int index)
|
long |
getSize()
|
SubsetPolicy |
getSubsetPolicy()
Retrieves the subset policy this result set is based on. |
long |
getTotalCount()
Gets the optionally evaluated count of all items satisfying the query this result is
based on. |
long |
getTotalCountThreshold()
This returns the configured threshold up to which total count is counted exactly. |
boolean |
hasMore()
Indicates if there are more items available for this result set than allowed by its
SubsetPolicy. |
int |
size()
|
| Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList |
| Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
get
public T get(int index)
- Specified by:
get in interface List<T>- Specified by:
get in class AbstractList<T>
size
public int size()
- Specified by:
size in interface Collection<T>- Specified by:
size in interface List<T>- Specified by:
size in class AbstractCollection<T>
getSize
public long getSize()
getTotalCount
public long getTotalCount()
throws UnsupportedOperationException
- Description copied from interface:
QueryResult
- Gets the optionally evaluated count of all items satisfying the query this result is
based on.
As evaluating the total count is probably an expensive operation, it will only be
done on request. Requesting the total count has to be done by attaching an
appropriate
SubsetPolicy.
If no subset policy is used, the total count of items is equal the size of the query
result.
- Specified by:
getTotalCount in interface QueryResult<T>
- Returns:
- The total count of items satisfying the query, if requested by the subset
policy used.
- Throws:
UnsupportedOperationException - if the evaluation of the total count was not
requested- See Also:
SubsetPolicy.isEvaluatingTotalCount()
getSubsetPolicy
public SubsetPolicy getSubsetPolicy()
- Description copied from interface:
QueryResult
- Retrieves the subset policy this result set is based on.
- Specified by:
getSubsetPolicy in interface QueryResult<T>
- Returns:
- The
SubsetPolicy the result set is based on.
hasMore
public boolean hasMore()
- Description copied from interface:
QueryResult
- Indicates if there are more items available for this result set than allowed by its
SubsetPolicy.
- Specified by:
hasMore in interface QueryResult<T>
- Returns:
true if there are more items available, false if
not.- See Also:
QueryResult.getSubsetPolicy()
getTotalCountThreshold
public long getTotalCountThreshold()
- Description copied from interface:
QueryResult
- This returns the configured threshold up to which total count is counted exactly. If this value is
exceeded then #getTotalCount() will return {Long.MAX_VALUE)
- Specified by:
getTotalCountThreshold in interface QueryResult<T>
- Returns:
- {Long.MAX_VALUE} if no threshold value is configured. Otherwise configured value.
Copyright © 2017 Eclipse Stardust. All Rights Reserved.