Package edu.ucsb.cs.scaffold.controller
Record Class CoursesController.InstructorCourseView
java.lang.Object
java.lang.Record
edu.ucsb.cs.scaffold.controller.CoursesController.InstructorCourseView
- Enclosing class:
CoursesController
public static record CoursesController.InstructorCourseView(Long id, String courseName, String term, School school, String instructorEmail, int numStudents, int numStaff, Long plRepoId, Long plInstanceId, String plRepoName, String plInstanceShortName, Long plInstanceNumericId, int xSpacing, int ySpacing)
extends Record
Projection of Course entity with fields that are relevant for instructors and admins
-
Constructor Summary
ConstructorsConstructorDescriptionInstructorCourseView(Long id, String courseName, String term, School school, String instructorEmail, int numStudents, int numStaff, Long plRepoId, Long plInstanceId, String plRepoName, String plInstanceShortName, Long plInstanceNumericId, int xSpacing, int ySpacing) Creates an instance of aInstructorCourseViewrecord class. -
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 theinstructorEmailrecord component.intnumStaff()Returns the value of thenumStaffrecord component.intReturns the value of thenumStudentsrecord component.Returns the value of theplInstanceIdrecord component.Returns the value of theplInstanceNumericIdrecord component.Returns the value of theplInstanceShortNamerecord component.plRepoId()Returns the value of theplRepoIdrecord component.Returns the value of theplRepoNamerecord 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.intxSpacing()Returns the value of thexSpacingrecord component.intySpacing()Returns the value of theySpacingrecord component.
-
Constructor Details
-
InstructorCourseView
-
InstructorCourseView
public InstructorCourseView(Long id, String courseName, String term, School school, String instructorEmail, int numStudents, int numStaff, Long plRepoId, Long plInstanceId, String plRepoName, String plInstanceShortName, Long plInstanceNumericId, int xSpacing, int ySpacing) Creates an instance of aInstructorCourseViewrecord class.- Parameters:
id- the value for theidrecord 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 componentplRepoId- the value for theplRepoIdrecord componentplInstanceId- the value for theplInstanceIdrecord componentplRepoName- the value for theplRepoNamerecord componentplInstanceShortName- the value for theplInstanceShortNamerecord componentplInstanceNumericId- the value for theplInstanceNumericIdrecord componentxSpacing- the value for thexSpacingrecord componentySpacing- the value for theySpacingrecord 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
-
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
-
plRepoId
Returns the value of theplRepoIdrecord component.- Returns:
- the value of the
plRepoIdrecord component
-
plInstanceId
Returns the value of theplInstanceIdrecord component.- Returns:
- the value of the
plInstanceIdrecord component
-
plRepoName
Returns the value of theplRepoNamerecord component.- Returns:
- the value of the
plRepoNamerecord component
-
plInstanceShortName
Returns the value of theplInstanceShortNamerecord component.- Returns:
- the value of the
plInstanceShortNamerecord component
-
plInstanceNumericId
Returns the value of theplInstanceNumericIdrecord component.- Returns:
- the value of the
plInstanceNumericIdrecord component
-
xSpacing
public int xSpacing()Returns the value of thexSpacingrecord component.- Returns:
- the value of the
xSpacingrecord component
-
ySpacing
public int ySpacing()Returns the value of theySpacingrecord component.- Returns:
- the value of the
ySpacingrecord component
-