Class GeneReferenceValueObject

java.lang.Object
ubic.gemma.model.genome.gene.GeneReferenceValueObject
All Implemented Interfaces:
Serializable

public class GeneReferenceValueObject extends Object implements Serializable
Compact gene identity — just enough to label a row and link to the gene page.

Used where a listing needs to say which gene a row maps to without paying for a full GeneValueObject per row: GET /platforms/{platform}/elements?withGenes=true attaches one of these per mapped gene on every element of the page. A platform page showing a 50-row element table needs the symbol to display and the id to link with; shipping the full gene VO there would carry taxon, aliases, multifunctionality and GO counts that nothing on the row renders.

Author:
paul
See Also:
  • Constructor Details

    • GeneReferenceValueObject

      public GeneReferenceValueObject()
    • GeneReferenceValueObject

      public GeneReferenceValueObject(Long id, @Nullable String officialSymbol, @Nullable Integer ncbiId)
      Creates a new GeneReferenceValueObject instance.
      Parameters:
      id - Gemma-internal gene id, suitable for GET /genes/{id}.
      officialSymbol - Official gene symbol, e.g. BRCA1. Null for the (rare) gene rows that carry none.
      ncbiId - NCBI gene id. Null for genes Gemma tracks without one.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getId

      public Long getId()
      Gemma-internal gene id, suitable for GET /genes/{id}.
    • getOfficialSymbol

      @Nullable public String getOfficialSymbol()
      Official gene symbol, e.g. BRCA1. Null for the (rare) gene rows that carry none.
    • getNcbiId

      @Nullable public Integer getNcbiId()
      NCBI gene id. Null for genes Gemma tracks without one.
    • setId

      public void setId(Long id)
      Gemma-internal gene id, suitable for GET /genes/{id}.
    • setOfficialSymbol

      public void setOfficialSymbol(@Nullable String officialSymbol)
      Official gene symbol, e.g. BRCA1. Null for the (rare) gene rows that carry none.
    • setNcbiId

      public void setNcbiId(@Nullable Integer ncbiId)
      NCBI gene id. Null for genes Gemma tracks without one.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object