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 thecourseNamerecord 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.Returns the value of theinstallationIdrecord component.Returns the value of theinstructorEmailrecord component.intnumStaff()Returns the value of thenumStaffrecord component.intReturns the value of thenumStudentsrecord component.orgName()Returns the value of theorgNamerecord component.school()Returns the value of theschoolrecord component.term()Returns the value of thetermrecord component.final StringtoString()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 aInstructorCourseViewrecord class.- Parameters:
id- the value for theidrecord componentinstallationId- the value for theinstallationIdrecord componentorgName- the value for theorgNamerecord componentcourseName- the value for thecourseNamerecord componentterm- the value for thetermrecord componentschool- the value for theschoolrecord componentinstructorEmail- the value for theinstructorEmailrecord componentnumStudents- the value for thenumStudentsrecord componentnumStaff- the value for thenumStaffrecord 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
-
installationId
Returns the value of theinstallationIdrecord component.- Returns:
- the value of the
installationIdrecord component
-
orgName
Returns the value of theorgNamerecord component.- Returns:
- the value of the
orgNamerecord component
-
courseName
Returns the value of thecourseNamerecord component.- Returns:
- the value of the
courseNamerecord component
-
term
Returns the value of thetermrecord component.- Returns:
- the value of the
termrecord component
-
school
Returns the value of theschoolrecord component.- Returns:
- the value of the
schoolrecord component
-
instructorEmail
Returns the value of theinstructorEmailrecord component.- Returns:
- the value of the
instructorEmailrecord component
-
numStudents
public int numStudents()Returns the value of thenumStudentsrecord component.- Returns:
- the value of the
numStudentsrecord component
-
numStaff
public int numStaff()Returns the value of thenumStaffrecord component.- Returns:
- the value of the
numStaffrecord component
-