Record Class AssignmentResponse
java.lang.Object
java.lang.Record
com.nicholasalfonso.lato.dto.response.AssignmentResponse
- Record Components:
id- the assignment database IDcourseId- the owning course IDcourseName- the owning course display namecourseCode- the owning course codecourseColor- the owning course UI colortitle- the resolved assignment titledescription- the resolved assignment descriptiondueDate- the resolved due datedueTime- the resolved due timepriority- the assignment priority levelcompleted- whether the assignment is marked completearchived- 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 Summary
ConstructorsConstructorDescriptionAssignmentResponse(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 aAssignmentResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanarchived()Returns the value of thearchivedrecord component.booleanReturns the value of thecompletedrecord component.Returns the value of thecourseCoderecord component.Returns the value of thecourseColorrecord component.courseId()Returns the value of thecourseIdrecord component.Returns the value of thecourseNamerecord component.Returns the value of thedescriptionrecord component.dueDate()Returns the value of thedueDaterecord component.dueTime()Returns the value of thedueTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.priority()Returns the value of thepriorityrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aAssignmentResponserecord class.- Parameters:
id- the value for theidrecord componentcourseId- the value for thecourseIdrecord componentcourseName- the value for thecourseNamerecord componentcourseCode- the value for thecourseCoderecord componentcourseColor- the value for thecourseColorrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentdueDate- the value for thedueDaterecord componentdueTime- the value for thedueTimerecord componentpriority- the value for thepriorityrecord componentcompleted- the value for thecompletedrecord componentarchived- the value for thearchivedrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
courseId
Returns the value of thecourseIdrecord component.- Returns:
- the value of the
courseIdrecord component
-
courseName
Returns the value of thecourseNamerecord component.- Returns:
- the value of the
courseNamerecord component
-
courseCode
Returns the value of thecourseCoderecord component.- Returns:
- the value of the
courseCoderecord component
-
courseColor
Returns the value of thecourseColorrecord component.- Returns:
- the value of the
courseColorrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
dueDate
Returns the value of thedueDaterecord component.- Returns:
- the value of the
dueDaterecord component
-
dueTime
Returns the value of thedueTimerecord component.- Returns:
- the value of the
dueTimerecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
completed
public boolean completed()Returns the value of thecompletedrecord component.- Returns:
- the value of the
completedrecord component
-
archived
public boolean archived()Returns the value of thearchivedrecord component.- Returns:
- the value of the
archivedrecord component
-