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 Details

    • SearchResultDisplayObject

      public SearchResultDisplayObject()
      satisfy javaBean contract
    • SearchResultDisplayObject

      public SearchResultDisplayObject(Object entity)
    • SearchResultDisplayObject

      public SearchResultDisplayObject(SessionBoundGeneSetValueObject geneSet)
  • 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

      public int compareTo(SearchResultDisplayObject o)
      Specified by:
      compareTo in interface Comparable<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)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isUserOwned

      public boolean isUserOwned()
      Returns:
      the userOwned
    • setUserOwned

      public void setUserOwned(boolean userOwned)
      Parameters:
      userOwned - the userOwned to set