Package omero.gateway.model
Class SearchResult
- java.lang.Object
-
- omero.gateway.model.SearchResult
-
public class SearchResult extends java.lang.ObjectEncapsulates 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 anSearchResultCollection- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description SearchResult()Create a new instanceSearchResult(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 longgetGroupId()Get the group id of the objectDataObjectgetObject()Get the found objectlonggetObjectId()Get the Id of the found objectintgetScopeId()The Id of the search scope, e.g.java.lang.Class<? extends DataObject>getType()Get the type (class) of objects to search for seeDataObjectbooleanisIdMatch()Indicates if this result is an ID matchvoidsetGroupId(long groupId)Set the group id of the objectvoidsetIdMatch(boolean idMatch)Set totrueif this result is an ID match.voidsetObject(DataObject object)Set the found objectvoidsetObjectId(long objectId)Set the Id of the found objectvoidsetScopeId(int scopeId)Set the id of the search scope, e.g.voidsetType(java.lang.Class<? extends DataObject> type)Set the type (class) of objects to search for seeDataObjectjava.lang.StringtoString()
-
-
-
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 searchobjectId- Id of the found objectgroupId- 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 seeDataObject- Returns:
- See above.
-
setType
public void setType(java.lang.Class<? extends DataObject> type)
Set the type (class) of objects to search for seeDataObject- 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 totrueif 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:
toStringin classjava.lang.Object
-
-