Record Class CoursesController.InstructorCourseView
java.lang.Object
java.lang.Record
edu.ucsb.cs156.frontiers.controllers.CoursesController.InstructorCourseView
- Enclosing class:
CoursesController
public static record CoursesController.InstructorCourseView(Long id, String installationId, String orgName, String courseName, String term, String school, String instructorEmail, int numStudents, int numStaff)
extends Record
Projection of Course entity with fields that are relevant for instructors and admins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecourseName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theinstallationId
record component.Returns the value of theinstructorEmail
record component.int
numStaff()
Returns the value of thenumStaff
record component.int
Returns the value of thenumStudents
record component.orgName()
Returns the value of theorgName
record component.school()
Returns the value of theschool
record component.term()
Returns the value of theterm
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
InstructorCourseView
-
InstructorCourseView
public InstructorCourseView(Long id, String installationId, String orgName, String courseName, String term, String school, String instructorEmail, int numStudents, int numStaff) Creates an instance of aInstructorCourseView
record class.- Parameters:
id
- the value for theid
record componentinstallationId
- the value for theinstallationId
record componentorgName
- the value for theorgName
record componentcourseName
- the value for thecourseName
record componentterm
- the value for theterm
record componentschool
- the value for theschool
record componentinstructorEmail
- the value for theinstructorEmail
record componentnumStudents
- the value for thenumStudents
record componentnumStaff
- the value for thenumStaff
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
-
installationId
Returns the value of theinstallationId
record component.- Returns:
- the value of the
installationId
record component
-
orgName
Returns the value of theorgName
record component.- Returns:
- the value of the
orgName
record component
-
courseName
Returns the value of thecourseName
record component.- Returns:
- the value of the
courseName
record component
-
term
Returns the value of theterm
record component.- Returns:
- the value of the
term
record component
-
school
Returns the value of theschool
record component.- Returns:
- the value of the
school
record component
-
instructorEmail
Returns the value of theinstructorEmail
record component.- Returns:
- the value of the
instructorEmail
record component
-
numStudents
public int numStudents()Returns the value of thenumStudents
record component.- Returns:
- the value of the
numStudents
record component
-
numStaff
public int numStaff()Returns the value of thenumStaff
record component.- Returns:
- the value of the
numStaff
record component
-