Record Class AssignmentResponse

java.lang.Object
java.lang.Record
com.nicholasalfonso.lato.dto.response.AssignmentResponse
Record Components:
id - the assignment database ID
courseId - the owning course ID
courseName - the owning course display name
courseCode - the owning course code
courseColor - the owning course UI color
title - the resolved assignment title
description - the resolved assignment description
dueDate - the resolved due date
dueTime - the resolved due time
priority - the assignment priority level
completed - whether the assignment is marked complete
archived - whether the assignment is archived

public record AssignmentResponse(Long id, Long courseId, String courseName, String courseCode, String courseColor, String title, String description, LocalDate dueDate, LocalTime dueTime, Assignment.AssignmentPriority priority, boolean completed, boolean archived) extends Record
Summary view of an assignment including resolved display values and course context.
  • Constructor Details

    • AssignmentResponse

      public AssignmentResponse(Long id, Long courseId, String courseName, String courseCode, String courseColor, String title, String description, LocalDate dueDate, LocalTime dueTime, Assignment.AssignmentPriority priority, boolean completed, boolean archived)
      Creates an instance of a AssignmentResponse record class.
      Parameters:
      id - the value for the id record component
      courseId - the value for the courseId record component
      courseName - the value for the courseName record component
      courseCode - the value for the courseCode record component
      courseColor - the value for the courseColor record component
      title - the value for the title record component
      description - the value for the description record component
      dueDate - the value for the dueDate record component
      dueTime - the value for the dueTime record component
      priority - the value for the priority record component
      completed - the value for the completed record component
      archived - the value for the archived 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.
    • id

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

      public Long courseId()
      Returns the value of the courseId record component.
      Returns:
      the value of the courseId record component
    • courseName

      public String courseName()
      Returns the value of the courseName record component.
      Returns:
      the value of the courseName record component
    • courseCode

      public String courseCode()
      Returns the value of the courseCode record component.
      Returns:
      the value of the courseCode record component
    • courseColor

      public String courseColor()
      Returns the value of the courseColor record component.
      Returns:
      the value of the courseColor record component
    • title

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

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

      public LocalDate dueDate()
      Returns the value of the dueDate record component.
      Returns:
      the value of the dueDate record component
    • dueTime

      public LocalTime dueTime()
      Returns the value of the dueTime record component.
      Returns:
      the value of the dueTime record component
    • priority

      public Assignment.AssignmentPriority priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • completed

      public boolean completed()
      Returns the value of the completed record component.
      Returns:
      the value of the completed record component
    • archived

      public boolean archived()
      Returns the value of the archived record component.
      Returns:
      the value of the archived record component