Record Class ExpressionExperimentIdAndShortName

java.lang.Object
java.lang.Record
ubic.gemma.model.expression.experiment.ExpressionExperimentIdAndShortName
All Implemented Interfaces:
Identifiable

public record ExpressionExperimentIdAndShortName(Long id, String shortName) extends Record implements Identifiable
A minimalistic projection of an ExpressionExperiment.

Implemented as a Java record (formerly a Lombok @Value class). getId() is provided explicitly to satisfy the Identifiable contract, alongside the record's canonical id() accessor. getShortName() is provided as a get-prefixed alias to preserve the JavaBean accessor convention used by existing callers.

Author:
poirigui
  • Constructor Details

    • ExpressionExperimentIdAndShortName

      public ExpressionExperimentIdAndShortName(Long id, String shortName)
      Creates an instance of a ExpressionExperimentIdAndShortName record class.
      Parameters:
      id - the value for the id record component
      shortName - the value for the shortName record component
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: Identifiable
      Obtain the identifier of the object.
      Specified by:
      getId in interface Identifiable
    • getShortName

      public String getShortName()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • shortName

      public String shortName()
      Returns the value of the shortName record component.
      Returns:
      the value of the shortName record component