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 Constructor Description SearchResultDisplayObject()satisfy javaBean contractSearchResultDisplayObject(Object entity)SearchResultDisplayObject(SessionBoundGeneSetValueObject geneSet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(SearchResultDisplayObject o)static <T extends Identifiable>
List<SearchResultDisplayObject>convertSearchResults2SearchResultDisplayObjects(List<SearchResult<T>> results)Creates a collection of SearchResultDisplayObjects from a collection of objects.booleanequals(Object obj)StringgetDescription()BooleangetIsGroup()Collection<Long>getMemberIds()StringgetName()StringgetOriginalQuery()Class<?>getResultClass()ObjectgetResultValueObject()intgetSize()LonggetTaxonId()StringgetTaxonName()inthashCode()booleanisUserOwned()voidsetOriginalQuery(String originalQuery)voidsetTaxonId(Long id)voidsetTaxonName(String name)voidsetUserOwned(boolean userOwned)
-
-
-
Constructor Detail
-
SearchResultDisplayObject
public SearchResultDisplayObject()
satisfy javaBean contract
-
SearchResultDisplayObject
public SearchResultDisplayObject(Object entity)
-
SearchResultDisplayObject
public SearchResultDisplayObject(SessionBoundGeneSetValueObject geneSet)
-
-
Method Detail
-
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
public int compareTo(SearchResultDisplayObject o)
- Specified by:
compareToin interfaceComparable<SearchResultDisplayObject>
-
getDescription
public String getDescription()
-
getIsGroup
public Boolean getIsGroup()
-
getMemberIds
public Collection<Long> getMemberIds()
-
getName
public String getName()
-
getOriginalQuery
public String getOriginalQuery()
-
setOriginalQuery
public void setOriginalQuery(String originalQuery)
-
getResultClass
public Class<?> getResultClass()
-
getResultValueObject
public Object 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
public Long getTaxonId()
-
setTaxonId
public void setTaxonId(Long id)
-
getTaxonName
public String getTaxonName()
-
setTaxonName
public void setTaxonName(String name)
-
isUserOwned
public boolean isUserOwned()
- Returns:
- the userOwned
-
setUserOwned
public void setUserOwned(boolean userOwned)
- Parameters:
userOwned- the userOwned to set
-
-