Class SearchResult


  • public class SearchResult
    extends java.lang.Object
    Encapsulates a single object found by a search together with the search scope (name, description, etc.) it was found with. Multiple search results are supposed to be held in an SearchResultCollection
    Since:
    5.0
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResult()
      Create a new instance
      SearchResult​(int scopeId, java.lang.Class<? extends DataObject> type, long objectId, long groupId)
      Create a new instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getGroupId()
      Get the group id of the object
      DataObject getObject()
      Get the found object
      long getObjectId()
      Get the Id of the found object
      int getScopeId()
      The Id of the search scope, e.g.
      java.lang.Class<? extends DataObject> getType()
      Get the type (class) of objects to search for see DataObject
      boolean isIdMatch()
      Indicates if this result is an ID match
      void setGroupId​(long groupId)
      Set the group id of the object
      void setIdMatch​(boolean idMatch)
      Set to true if this result is an ID match.
      void setObject​(DataObject object)
      Set the found object
      void setObjectId​(long objectId)
      Set the Id of the found object
      void setScopeId​(int scopeId)
      Set the id of the search scope, e.g.
      void setType​(java.lang.Class<? extends DataObject> type)
      Set the type (class) of objects to search for see DataObject
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SearchResult

        public SearchResult()
        Create a new instance
      • SearchResult

        public SearchResult​(int scopeId,
                            java.lang.Class<? extends DataObject> type,
                            long objectId,
                            long groupId)
        Create a new instance
        Parameters:
        scopeId - Id of the search scope.
        type - Type of the object to search
        objectId - Id of the found object
        groupId - Id of the group.
    • Method Detail

      • getScopeId

        public int getScopeId()
        The Id of the search scope, e.g. name, description, ...
        Returns:
        See above.
      • setScopeId

        public void setScopeId​(int scopeId)
        Set the id of the search scope, e.g. name, description, ...
        Parameters:
        scopeId - The id of the search scope.
      • getType

        public java.lang.Class<? extends DataObject> getType()
        Get the type (class) of objects to search for see DataObject
        Returns:
        See above.
      • setType

        public void setType​(java.lang.Class<? extends DataObject> type)
        Set the type (class) of objects to search for see DataObject
        Parameters:
        type - The type of object to search for.
      • getObjectId

        public long getObjectId()
        Get the Id of the found object
        Returns:
        See above.
      • setObjectId

        public void setObjectId​(long objectId)
        Set the Id of the found object
        Parameters:
        objectId - The id of the found object.
      • getObject

        public DataObject getObject()
        Get the found object
        Returns:
        See above.
      • getGroupId

        public long getGroupId()
        Get the group id of the object
        Returns:
        See above.
      • setGroupId

        public void setGroupId​(long groupId)
        Set the group id of the object
        Parameters:
        groupId - The value to set.
      • isIdMatch

        public boolean isIdMatch()
        Indicates if this result is an ID match
      • setIdMatch

        public void setIdMatch​(boolean idMatch)
        Set to true if this result is an ID match.
        Parameters:
        idMatch - The value to set.
      • setObject

        public void setObject​(DataObject object)
        Set the found object
        Parameters:
        object - The value to set.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object