public class SearchResultCollection extends java.util.ArrayList<SearchResult>
SearchResult
sModifier and Type | Field and Description |
---|---|
static int |
GENERAL_ERROR
Some other error
|
static int |
NO_ERROR
No error
|
static int |
TOO_MANY_CLAUSES
The search has to many clauses, e.g.
|
static int |
TOO_MANY_RESULTS_ERROR
The search has to many results
|
Constructor and Description |
---|
SearchResultCollection() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
consolidate()
Removes results which DataObjects are not set
|
boolean |
contains(java.lang.Object o) |
java.util.Map<java.lang.Long,java.util.List<SearchResult>> |
getByGroup()
Get a perGroup map representation of the results
|
java.util.Map<java.lang.Long,java.util.List<SearchResult>> |
getByGroup(java.lang.Class<? extends DataObject> type)
Get a perGroup map representation of the results, filtered by type
|
java.util.List<DataObject> |
getDataObjects(int scopeId,
java.lang.Class<? extends DataObject> type)
Get DataObjects filtered by scope and type
|
int |
getError()
Get the error code
|
java.util.List<SearchResult> |
getResults(int scopeId,
java.lang.Class<? extends DataObject> type)
Get all results of a certain scope and/or type
|
boolean |
isError() |
void |
setError(int error)
Set the error state
|
java.lang.String |
toString() |
add, add, addAll, addAll, clone, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public static final int NO_ERROR
public static final int GENERAL_ERROR
public static final int TOO_MANY_RESULTS_ERROR
public static final int TOO_MANY_CLAUSES
public boolean isError()
true
if there was an error with the search,
false
otherwisepublic void setError(int error)
error
- The value to set.public int getError()
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<SearchResult>
contains
in interface java.util.List<SearchResult>
contains
in class java.util.ArrayList<SearchResult>
public void clear()
clear
in interface java.util.Collection<SearchResult>
clear
in interface java.util.List<SearchResult>
clear
in class java.util.ArrayList<SearchResult>
public java.util.List<SearchResult> getResults(int scopeId, java.lang.Class<? extends DataObject> type)
scopeId
- The scope to filter for.type
- The type to filter for, see DataObject
public java.util.List<DataObject> getDataObjects(int scopeId, java.lang.Class<? extends DataObject> type)
scopeId
- type
- public java.util.Map<java.lang.Long,java.util.List<SearchResult>> getByGroup()
public java.util.Map<java.lang.Long,java.util.List<SearchResult>> getByGroup(java.lang.Class<? extends DataObject> type)
type
- public void consolidate()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<SearchResult>