public class Student extends Object implements Comparable<Student>
Modifier and Type | Class and Description |
---|---|
static class |
Student.BackToBackPreference |
static class |
Student.ModalityPreference |
static class |
Student.StudentPriority
Student priority level.
|
Constructor and Description |
---|
Student(long id)
Constructor
|
Student(long id,
boolean dummy)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAssign(Assignment<Request,Enrollment> assignment,
Request request)
True if the given request can be assigned to the student.
|
int |
compareTo(Student s) |
int |
countFreeTimeOverlaps(Enrollment enrollment)
Count number of free time slots overlapping with the given enrollment
|
int |
countFreeTimeOverlaps(TimeLocation time)
Count number of free time slots overlapping with the given time
|
boolean |
equals(Object object)
Compare two students for equality.
|
Set<String> |
getAccommodations()
List student accommodations
|
List<Instructor> |
getAdvisors()
List of student's advisors
|
List<AreaClassificationMajor> |
getAreaClassificationMajors()
List of academic area, classification, and major codes (
AreaClassificationMajor ) for the given student |
List<AreaClassificationMajor> |
getAreaClassificationMinors()
List of academic area, classification, and minor codes (
AreaClassificationMajor ) for the given student |
float |
getAssignedCredit(Assignment<Request,Enrollment> assignment)
Return the number of assigned credits of the student
|
Student.BackToBackPreference |
getBackToBackPreference() |
Integer |
getClassFirstDate() |
Integer |
getClassLastDate() |
Long |
getEmailTimeStamp()
Get last email time stamp (online sectioning only)
|
String |
getExternalId()
Get student external id
|
List<StudentGroup> |
getGroups()
List of student groups (
StudentGroup ) for the given student |
long |
getId()
Student unique id
|
List<LinkedSections> |
getLinkedSections()
Linked sections of this student
|
float |
getMaxCredit()
Get student max credit (
Float.MAX_VALUE if not set)
return student max credit |
float |
getMinCredit()
Get student min credit (0 if not set)
return student min credit
|
Student.ModalityPreference |
getModalityPreference() |
String |
getName()
Get student name
|
AreaClassificationMajor |
getPrimaryMajor() |
Student.StudentPriority |
getPriority()
Student's priority.
|
List<Request> |
getRequests()
Student's course and free time requests
|
String |
getStatus()
Get student status (online sectioning only)
|
List<Unavailability> |
getUnavailabilities()
List of student unavailabilities
|
boolean |
hasAccommodation(String code)
Check if a student has given accommodation
|
boolean |
hasCritical()
Deprecated.
|
boolean |
hasCritical(Request.RequestPriority rp)
Has student any critical course requests?
|
int |
hashCode()
Hash code (base only on student id)
|
boolean |
hasMaxCredit()
True if student has max credit defined
|
boolean |
hasMinCredit()
True if student has min credit defined
|
boolean |
hasUnassignedCritical(Assignment<Request,Enrollment> assignment)
Deprecated.
|
boolean |
hasUnassignedCritical(Assignment<Request,Enrollment> assignment,
Request.RequestPriority rp)
Has student any unassigned critical course requests?
|
boolean |
isAllowDisabled()
True if student can be enrolled in disabled sections, regardless if his/her reservations
|
boolean |
isAvailable(Enrollment enrollment)
Check if student is available during the given enrollment
|
boolean |
isAvailable(Section section)
Check if student is available during the given section
|
boolean |
isComplete(Assignment<Request,Enrollment> assignment)
True if the student has assigned the desired number of requests (i.e.,
number of non-alternative course requests).
|
boolean |
isDummy()
Student's dummy flag.
|
boolean |
isNeedShortDistances()
Return true if the student needs short distances.
|
boolean |
isPriority()
Deprecated.
|
int |
nrAlternativeRequests()
Number of alternative requests
|
int |
nrAssignedRequests(Assignment<Request,Enrollment> assignment)
Number of assigned COURSE requests
|
int |
nrRequests()
Number of requests (alternative requests are ignored)
|
void |
setAllowDisabled(boolean allowDisabled)
Set to true if student can be enrolled in disabled sections, regardless if his/her reservations
|
void |
setBackToBackPreference(Student.BackToBackPreference p) |
void |
setClassFirstDate(Integer classFirstDate) |
void |
setClassLastDate(Integer classLastDate) |
void |
setDummy(boolean dummy)
Set student's dummy flag.
|
void |
setEmailTimeStamp(Long emailTimeStamp)
Set last email time stamp
|
void |
setExternalId(String externalId)
Set student external id
|
void |
setId(long id)
Set student unique id
|
void |
setMaxCredit(Float maxCredit)
Set student max credit (null if not set)
|
void |
setMinCredit(Float maxCredit)
Set student min credit (null if not set)
|
void |
setModalityPreference(Student.ModalityPreference p) |
void |
setName(String name)
Set student name
|
void |
setNeedShortDistances(boolean needShortDistances)
Set true if the student needs short distances.
|
void |
setPriority(boolean priority)
Deprecated.
|
void |
setPriority(Student.StudentPriority priority)
Set student's priority.
|
void |
setStatus(String status)
Set student status
|
String |
toString() |
public Student(long id)
id
- student unique idpublic Student(long id, boolean dummy)
id
- student unique iddummy
- dummy flagpublic long getId()
public void setId(long id)
id
- student unique idpublic List<Request> getRequests()
public int nrRequests()
public int nrAlternativeRequests()
public boolean canAssign(Assignment<Request,Enrollment> assignment, Request request)
assignment
- current assignmentrequest
- given request of this studentpublic boolean isComplete(Assignment<Request,Enrollment> assignment)
assignment
- current assignmentpublic int nrAssignedRequests(Assignment<Request,Enrollment> assignment)
assignment
- current assignmentpublic boolean isDummy()
public void setDummy(boolean dummy)
dummy
- projected studentpublic Student.StudentPriority getPriority()
public void setPriority(Student.StudentPriority priority)
priority
- student priority level@Deprecated public void setPriority(boolean priority)
priority
- true for priority student@Deprecated public boolean isPriority()
public List<StudentGroup> getGroups()
StudentGroup
) for the given studentpublic Set<String> getAccommodations()
public List<AreaClassificationMajor> getAreaClassificationMajors()
AreaClassificationMajor
) for the given studentpublic AreaClassificationMajor getPrimaryMajor()
public List<AreaClassificationMajor> getAreaClassificationMinors()
AreaClassificationMajor
) for the given studentpublic List<Instructor> getAdvisors()
public boolean equals(Object object)
public int hashCode()
public int countFreeTimeOverlaps(Enrollment enrollment)
enrollment
- given enrollmentpublic int countFreeTimeOverlaps(TimeLocation time)
time
- given timepublic String getExternalId()
public void setExternalId(String externalId)
externalId
- student external idpublic List<LinkedSections> getLinkedSections()
public String getStatus()
public void setStatus(String status)
status
- student sectioning statuspublic Long getEmailTimeStamp()
public void setEmailTimeStamp(Long emailTimeStamp)
emailTimeStamp
- student email time stamppublic int compareTo(Student s)
compareTo
in interface Comparable<Student>
public List<Unavailability> getUnavailabilities()
public boolean isAvailable(Section section)
section
- given sectionpublic boolean isAvailable(Enrollment enrollment)
enrollment
- given enrollmentpublic boolean isNeedShortDistances()
public void setNeedShortDistances(boolean needShortDistances)
needShortDistances
- true if the student needs short distances (default is false)public boolean isAllowDisabled()
public void setAllowDisabled(boolean allowDisabled)
allowDisabled
- does this student allow for disabled sectionspublic boolean hasMinCredit()
public float getMinCredit()
@Deprecated public boolean hasCritical()
public boolean hasCritical(Request.RequestPriority rp)
@Deprecated public boolean hasUnassignedCritical(Assignment<Request,Enrollment> assignment)
public boolean hasUnassignedCritical(Assignment<Request,Enrollment> assignment, Request.RequestPriority rp)
public void setMinCredit(Float maxCredit)
maxCredit
- student min creditpublic boolean hasMaxCredit()
public float getMaxCredit()
Float.MAX_VALUE
if not set)
return student max creditpublic void setMaxCredit(Float maxCredit)
maxCredit
- student max creditpublic float getAssignedCredit(Assignment<Request,Enrollment> assignment)
assignment
- current assignmentEnrollment.getCredit()
public boolean hasAccommodation(String code)
code
- accommodation reference codepublic void setClassFirstDate(Integer classFirstDate)
public Integer getClassFirstDate()
public void setClassLastDate(Integer classLastDate)
public Integer getClassLastDate()
public Student.ModalityPreference getModalityPreference()
public void setModalityPreference(Student.ModalityPreference p)
public Student.BackToBackPreference getBackToBackPreference()
public void setBackToBackPreference(Student.BackToBackPreference p)