Package ubic.gemma.core.search
Class SearchResultDisplayObject
java.lang.Object
ubic.gemma.core.search.SearchResultDisplayObject
- All Implemented Interfaces:
Comparable<SearchResultDisplayObject>
public class SearchResultDisplayObject
extends Object
implements Comparable<SearchResultDisplayObject>
Object to store search results of different classes in a similar way for displaying to user (ex: enables genes and
gene sets to be entries in the same combo box) object types handled are: Gene, GeneSet, GeneSetValueObject,
ExpressionExperiment and ExpressionExperimentSet SearchObject is also handled if the object it holds is of any of
those types for a gene or experiment, the memberIds field is a collection just containing the object's id. memberIds
is just for convenience on the client.
In effect this wraps the resultValueObject.
- Author:
- thea
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic <T extends Identifiable>
List<SearchResultDisplayObject> Creates a collection of SearchResultDisplayObjects from a collection of objects.booleangetName()Class<?> intgetSize()inthashCode()booleanvoidsetOriginalQuery(String originalQuery) voidsetTaxonId(Long id) voidsetTaxonName(String name) voidsetUserOwned(boolean userOwned)
-
Constructor Details
-
SearchResultDisplayObject
public SearchResultDisplayObject()satisfy javaBean contract -
SearchResultDisplayObject
-
SearchResultDisplayObject
-
-
Method Details
-
convertSearchResults2SearchResultDisplayObjects
public static <T extends Identifiable> List<SearchResultDisplayObject> convertSearchResults2SearchResultDisplayObjects(@Nullable List<SearchResult<T>> results) Creates a collection of SearchResultDisplayObjects from a collection of objects. Object types handled are: GeneValueObject, GeneSetValueObject, ExpressionExperimentValueObject, ExpressionExperimentSetValueObject and SearchObjects containing an object of any of those types- Parameters:
results- a collection of SearchResult objects to create SearchResultDisplayObjects for- Returns:
- a collection of SearchResultDisplayObjects created from the objects passed in, sorted by name
-
compareTo
- Specified by:
compareToin interfaceComparable<SearchResultDisplayObject>
-
getDescription
-
getIsGroup
-
getMemberIds
-
getName
-
getOriginalQuery
-
setOriginalQuery
-
getResultClass
-
getResultValueObject
- Returns:
- the resultValueObject, which will be (for the example of genes) a GeneValueObject or a GeneSetValueObject, which also has several subclasses (SessionBound etc.)
-
getSize
public int getSize() -
getTaxonId
-
setTaxonId
-
getTaxonName
-
setTaxonName
-
hashCode
public int hashCode() -
equals
-
isUserOwned
public boolean isUserOwned()- Returns:
- the userOwned
-
setUserOwned
public void setUserOwned(boolean userOwned) - Parameters:
userOwned- the userOwned to set
-