Class 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 Detail

      • SearchResultDisplayObject

        public SearchResultDisplayObject()
        satisfy javaBean contract
      • SearchResultDisplayObject

        public SearchResultDisplayObject​(Object entity)
    • Method Detail

      • convertSearchResults2SearchResultDisplayObjects

        public static <T extends IdentifiableList<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
      • getDescription

        public String getDescription()
      • getIsGroup

        public Boolean getIsGroup()
      • 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
      • isUserOwned

        public boolean isUserOwned()
        Returns:
        the userOwned
      • setUserOwned

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