Package edu.ucsb.cs156.frontiers.models
Record Class CourseStaffDTO
java.lang.Object
java.lang.Record
edu.ucsb.cs156.frontiers.models.CourseStaffDTO
public record CourseStaffDTO(Long id, Long courseId, String firstName, String lastName, String email, String role, long userId, Integer githubId, String githubLogin, OrgStatus orgStatus)
extends Record
This is a DTO class that represents a staff member in a course. It is used to transfer data
between the server and the client.
-
Constructor Summary
ConstructorsConstructorDescriptionCourseStaffDTO(CourseStaff courseStaff) CourseStaffDTO(Long id, Long courseId, String firstName, String lastName, String email, String role, long userId, Integer githubId, String githubLogin, OrgStatus orgStatus) Creates an instance of aCourseStaffDTOrecord 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.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.longuserId()Returns the value of theuserIdrecord component.
-
Constructor Details
-
CourseStaffDTO
-
CourseStaffDTO
public CourseStaffDTO(Long id, Long courseId, String firstName, String lastName, String email, String role, long userId, Integer githubId, String githubLogin, OrgStatus orgStatus) Creates an instance of aCourseStaffDTOrecord class.- Parameters:
id- the value for theidrecord componentcourseId- the value for thecourseIdrecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentemail- the value for theemailrecord componentrole- the value for therolerecord componentuserId- the value for theuserIdrecord componentgithubId- the value for thegithubIdrecord componentgithubLogin- the value for thegithubLoginrecord componentorgStatus- the value for theorgStatusrecord 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
-
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
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord 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
-
orgStatus
Returns the value of theorgStatusrecord component.- Returns:
- the value of the
orgStatusrecord component
-