Package omero.gateway.model
Class SearchResult
- java.lang.Object
-
- omero.gateway.model.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 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 long
getGroupId()
Get the group id of the objectDataObject
getObject()
Get the found objectlong
getObjectId()
Get the Id of the found objectint
getScopeId()
The Id of the search scope, e.g.java.lang.Class<? extends DataObject>
getType()
Get the type (class) of objects to search for seeDataObject
boolean
isIdMatch()
Indicates if this result is an ID matchvoid
setGroupId(long groupId)
Set the group id of the objectvoid
setIdMatch(boolean idMatch)
Set totrue
if this result is an ID match.void
setObject(DataObject object)
Set the found objectvoid
setObjectId(long objectId)
Set the Id of the found objectvoid
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 seeDataObject
java.lang.String
toString()
-
-
-
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 totrue
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 classjava.lang.Object
-
-