Record Class ScenarioExecutionCampaign

java.lang.Object
java.lang.Record
fr.enedis.chutney.server.core.domain.scenario.campaign.ScenarioExecutionCampaign

public record ScenarioExecutionCampaign(String scenarioId, String scenarioName, ExecutionHistory.ExecutionSummary execution) extends Record
  • Constructor Details

    • ScenarioExecutionCampaign

      public ScenarioExecutionCampaign(String scenarioId, String scenarioName, ExecutionHistory.ExecutionSummary execution)
      Creates an instance of a ScenarioExecutionCampaign record class.
      Parameters:
      scenarioId - the value for the scenarioId record component
      scenarioName - the value for the scenarioName record component
      execution - the value for the execution record component
  • Method Details

    • isRunning

      public static Predicate<ScenarioExecutionCampaign> isRunning()
    • status

      public ServerReportStatus status()
    • executionIdComparator

      public static Comparator<ScenarioExecutionCampaign> executionIdComparator()
    • equals

      public 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.
    • hashCode

      public 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
    • 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
    • scenarioId

      public String scenarioId()
      Returns the value of the scenarioId record component.
      Returns:
      the value of the scenarioId record component
    • scenarioName

      public String scenarioName()
      Returns the value of the scenarioName record component.
      Returns:
      the value of the scenarioName record component
    • execution

      Returns the value of the execution record component.
      Returns:
      the value of the execution record component