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 aRosterStudentDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncourseId()Returns the value of thecourseIdrecord component.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.githubId()Returns the value of thegithubIdrecord component.Returns the value of thegithubLoginrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.lastName()Returns the value of thelastNamerecord component.Returns the value of theorgStatusrecord component.Returns the value of therosterStatusrecord component.section()Returns the value of thesectionrecord component.Returns the value of thestudentIdrecord component.teams()Returns the value of theteamsrecord component.final StringtoString()Returns a string representation of this record class.longuserId()Returns the value of theuserIdrecord 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 aRosterStudentDTOrecord class.- Parameters:
id- the value for theidrecord componentcourseId- the value for thecourseIdrecord componentstudentId- the value for thestudentIdrecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentemail- the value for theemailrecord componentsection- the value for thesectionrecord componentuserId- the value for theuserIdrecord componentgithubId- the value for thegithubIdrecord componentgithubLogin- the value for thegithubLoginrecord componentrosterStatus- the value for therosterStatusrecord componentorgStatus- the value for theorgStatusrecord componentteams- the value for theteamsrecord 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
-
studentId
Returns the value of thestudentIdrecord component.- Returns:
- the value of the
studentIdrecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
email
Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-
section
Returns the value of thesectionrecord component.- Returns:
- the value of the
sectionrecord component
-
userId
public long userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
githubId
Returns the value of thegithubIdrecord component.- Returns:
- the value of the
githubIdrecord component
-
githubLogin
Returns the value of thegithubLoginrecord component.- Returns:
- the value of the
githubLoginrecord component
-
rosterStatus
Returns the value of therosterStatusrecord component.- Returns:
- the value of the
rosterStatusrecord component
-
orgStatus
Returns the value of theorgStatusrecord component.- Returns:
- the value of the
orgStatusrecord component
-
teams
Returns the value of theteamsrecord component.- Returns:
- the value of the
teamsrecord component
-