Record Class ConstraintRecord

java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.merlin.server.models.ConstraintRecord
Record Components:
priority - The constraint's priority on the plan's specification.
invocationId - The constraint's invocation id on the plan's specification.
constraintId - The constraint's database id.
revision - The revision of the constraint's definition.
name - The user-defined name of the constraint.
type - What language the constraint is in. Contains a type-appropriate definition.
arguments - Arguments to be passed to the constraint. Currently only used with JAR-type constraints.

public record ConstraintRecord(long priority, long invocationId, long constraintId, long revision, String name, String description, ConstraintType type, Map<String,gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue> arguments) extends Record
A record of a Constraint to be checked, as interpreted from the database.
  • Constructor Details

    • ConstraintRecord

      public ConstraintRecord(long priority, long invocationId, long constraintId, long revision, String name, String description, ConstraintType type, Map<String,gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue> arguments)
      Creates an instance of a ConstraintRecord record class.
      Parameters:
      priority - the value for the priority record component
      invocationId - the value for the invocationId record component
      constraintId - the value for the constraintId record component
      revision - the value for the revision record component
      name - the value for the name record component
      description - the value for the description record component
      type - the value for the type record component
      arguments - the value for the arguments record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • priority

      public long priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • invocationId

      public long invocationId()
      Returns the value of the invocationId record component.
      Returns:
      the value of the invocationId record component
    • constraintId

      public long constraintId()
      Returns the value of the constraintId record component.
      Returns:
      the value of the constraintId record component
    • revision

      public long revision()
      Returns the value of the revision record component.
      Returns:
      the value of the revision record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • type

      public ConstraintType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • arguments

      public Map<String,gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue> arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component