Class SearchResultCollection

    • Field Summary

      Fields 
      Modifier and Type Field 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
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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()  
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clone, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • 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.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Field Detail

      • TOO_MANY_RESULTS_ERROR

        public static final int TOO_MANY_RESULTS_ERROR
        The search has to many results
        See Also:
        Constant Field Values
      • TOO_MANY_CLAUSES

        public static final int TOO_MANY_CLAUSES
        The search has to many clauses, e.g. a 'a*' search term would expand to too many single clauses
        See Also:
        Constant Field Values
    • Constructor Detail

      • SearchResultCollection

        public SearchResultCollection()
    • Method Detail

      • isError

        public boolean isError()
        Returns:
        true if there was an error with the search, false otherwise
      • setError

        public void setError​(int error)
        Set the error state
        Parameters:
        error - The value to set.
      • getError

        public int getError()
        Get the error code
        Returns:
        See above.
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<SearchResult>
        Specified by:
        contains in interface java.util.List<SearchResult>
        Overrides:
        contains in class java.util.ArrayList<SearchResult>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<SearchResult>
        Specified by:
        clear in interface java.util.List<SearchResult>
        Overrides:
        clear in class java.util.ArrayList<SearchResult>
      • getResults

        public java.util.List<SearchResult> getResults​(int scopeId,
                                                       java.lang.Class<? extends DataObject> type)
        Get all results of a certain scope and/or type
        Parameters:
        scopeId - The scope to filter for.
        type - The type to filter for, see DataObject
        Returns:
        See above.
      • getDataObjects

        public java.util.List<DataObject> getDataObjects​(int scopeId,
                                                         java.lang.Class<? extends DataObject> type)
        Get DataObjects filtered by scope and type
        Parameters:
        scopeId -
        type -
        Returns:
        See above.
      • getByGroup

        public java.util.Map<java.lang.Long,​java.util.List<SearchResult>> getByGroup()
        Get a perGroup map representation of the results
        Returns:
        See above.
      • getByGroup

        public 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
        Parameters:
        type -
        Returns:
        See above.
      • consolidate

        public void consolidate()
        Removes results which DataObjects are not set
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<SearchResult>