Package edu.ucsb.cs156.frontiers.models
Record Class RosterStudentDTO
java.lang.Object
java.lang.Record
edu.ucsb.cs156.frontiers.models.RosterStudentDTO
public record RosterStudentDTO(Long id, Long courseId, String studentId, String firstName, String lastName, String email, String section, long userId, Integer githubId, String githubLogin, RosterStatus rosterStatus, OrgStatus orgStatus, List<String> teams)
extends Record
This is a DTO class that represents a student in the roster. It is used to transfer data between
the server and the client.
-
Constructor Summary
ConstructorsConstructorDescriptionRosterStudentDTO
(RosterStudent rosterStudent) RosterStudentDTO
(Long id, Long courseId, String studentId, String firstName, String lastName, String email, String section, long userId, Integer githubId, String githubLogin, RosterStatus rosterStatus, OrgStatus orgStatus, List<String> teams) Creates an instance of aRosterStudentDTO
record class. -
Method Summary
Modifier and TypeMethodDescriptioncourseId()
Returns the value of thecourseId
record component.email()
Returns the value of theemail
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefirstName
record component.githubId()
Returns the value of thegithubId
record component.Returns the value of thegithubLogin
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.lastName()
Returns the value of thelastName
record component.Returns the value of theorgStatus
record component.Returns the value of therosterStatus
record component.section()
Returns the value of thesection
record component.Returns the value of thestudentId
record component.teams()
Returns the value of theteams
record component.final String
toString()
Returns a string representation of this record class.long
userId()
Returns the value of theuserId
record component.
-
Constructor Details
-
RosterStudentDTO
-
RosterStudentDTO
public RosterStudentDTO(Long id, Long courseId, String studentId, String firstName, String lastName, String email, String section, long userId, Integer githubId, String githubLogin, RosterStatus rosterStatus, OrgStatus orgStatus, List<String> teams) Creates an instance of aRosterStudentDTO
record class.- Parameters:
id
- the value for theid
record componentcourseId
- the value for thecourseId
record componentstudentId
- the value for thestudentId
record componentfirstName
- the value for thefirstName
record componentlastName
- the value for thelastName
record componentemail
- the value for theemail
record componentsection
- the value for thesection
record componentuserId
- the value for theuserId
record componentgithubId
- the value for thegithubId
record componentgithubLogin
- the value for thegithubLogin
record componentrosterStatus
- the value for therosterStatus
record componentorgStatus
- the value for theorgStatus
record componentteams
- the value for theteams
record 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 theid
record component.- Returns:
- the value of the
id
record component
-
courseId
Returns the value of thecourseId
record component.- Returns:
- the value of the
courseId
record component
-
studentId
Returns the value of thestudentId
record component.- Returns:
- the value of the
studentId
record component
-
firstName
Returns the value of thefirstName
record component.- Returns:
- the value of the
firstName
record component
-
lastName
Returns the value of thelastName
record component.- Returns:
- the value of the
lastName
record component
-
email
Returns the value of theemail
record component.- Returns:
- the value of the
email
record component
-
section
Returns the value of thesection
record component.- Returns:
- the value of the
section
record component
-
userId
public long userId()Returns the value of theuserId
record component.- Returns:
- the value of the
userId
record component
-
githubId
Returns the value of thegithubId
record component.- Returns:
- the value of the
githubId
record component
-
githubLogin
Returns the value of thegithubLogin
record component.- Returns:
- the value of the
githubLogin
record component
-
rosterStatus
Returns the value of therosterStatus
record component.- Returns:
- the value of the
rosterStatus
record component
-
orgStatus
Returns the value of theorgStatus
record component.- Returns:
- the value of the
orgStatus
record component
-
teams
Returns the value of theteams
record component.- Returns:
- the value of the
teams
record component
-