net.sf.cpsolver.studentsct.model
Class Student

java.lang.Object
  extended by net.sf.cpsolver.studentsct.model.Student
All Implemented Interfaces:
Comparable<Student>

public class Student
extends Object
implements Comparable<Student>

Representation of a student. Each student contains id, and a list of requests.

Last-like semester students are mark as dummy. Dummy students have lower value and generally should not block "real" students from getting requested courses.

Version:
StudentSct 1.2 (Student Sectioning)
Copyright (C) 2007 - 2010 Tomas Muller
muller@unitime.org
http://muller.unitime.org

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.

Constructor Summary
Student(long id)
          Constructor
Student(long id, boolean dummy)
          Constructor
 
Method Summary
 boolean canAssign(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.
 List<AcademicAreaCode> getAcademicAreaClasiffications()
          List of academic area - classification codes (AcademicAreaCode) for the given student
 Long getEmailTimeStamp()
          Get last email time stamp (online sectioning only)
 String getExternalId()
          Get student external id
 long getId()
          Student unique id
 List<LinkedSections> getLinkedSections()
          Linked sections of this student
 List<AcademicAreaCode> getMajors()
          List of major codes (AcademicAreaCode) for the given student
 List<AcademicAreaCode> getMinors()
          List of major codes (AcademicAreaCode) for the given student
 String getName()
          Get student name
 List<Request> getRequests()
          Student's course and free time requests
 String getStatus()
          Get student status (online sectioning only)
 int hashCode()
          Hash code (base only on student id)
 boolean isComplete()
          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.
 int nrAlternativeRequests()
          Number of alternative requests
 int nrAssignedRequests()
          Number of assigned COURSE requests
 int nrRequests()
          Number of requests (alternative requests are ignored)
 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 setName(String name)
          Set student name
 void setStatus(String status)
          Set student status
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Student

public Student(long id)
Constructor

Parameters:
id - student unique id

Student

public Student(long id,
               boolean dummy)
Constructor

Parameters:
id - student unique id
dummy - dummy flag
Method Detail

getId

public long getId()
Student unique id


setId

public void setId(long id)
Set student unique id


getRequests

public List<Request> getRequests()
Student's course and free time requests


nrRequests

public int nrRequests()
Number of requests (alternative requests are ignored)


nrAlternativeRequests

public int nrAlternativeRequests()
Number of alternative requests


canAssign

public boolean canAssign(Request request)
True if the given request can be assigned to the student. A request cannot be assigned to a student when the student already has the desired number of requests assigned (i.e., number of non-alternative course requests).


isComplete

public boolean isComplete()
True if the student has assigned the desired number of requests (i.e., number of non-alternative course requests).


nrAssignedRequests

public int nrAssignedRequests()
Number of assigned COURSE requests


toString

public String toString()
Overrides:
toString in class Object

isDummy

public boolean isDummy()
Student's dummy flag. Dummy students have lower value and generally should not block "real" students from getting requested courses.


setDummy

public void setDummy(boolean dummy)
Set student's dummy flag. Dummy students have lower value and generally should not block "real" students from getting requested courses.


getAcademicAreaClasiffications

public List<AcademicAreaCode> getAcademicAreaClasiffications()
List of academic area - classification codes (AcademicAreaCode) for the given student


getMajors

public List<AcademicAreaCode> getMajors()
List of major codes (AcademicAreaCode) for the given student


getMinors

public List<AcademicAreaCode> getMinors()
List of major codes (AcademicAreaCode) for the given student


equals

public boolean equals(Object object)
Compare two students for equality. Two students are considered equal if they have the same id.

Overrides:
equals in class Object

hashCode

public int hashCode()
Hash code (base only on student id)

Overrides:
hashCode in class Object

countFreeTimeOverlaps

public int countFreeTimeOverlaps(Enrollment enrollment)
Count number of free time slots overlapping with the given enrollment


countFreeTimeOverlaps

public int countFreeTimeOverlaps(TimeLocation time)
Count number of free time slots overlapping with the given time


getExternalId

public String getExternalId()
Get student external id


setExternalId

public void setExternalId(String externalId)
Set student external id


getName

public String getName()
Get student name


setName

public void setName(String name)
Set student name


getLinkedSections

public List<LinkedSections> getLinkedSections()
Linked sections of this student


getStatus

public String getStatus()
Get student status (online sectioning only)


setStatus

public void setStatus(String status)
Set student status


getEmailTimeStamp

public Long getEmailTimeStamp()
Get last email time stamp (online sectioning only)


setEmailTimeStamp

public void setEmailTimeStamp(Long emailTimeStamp)
Set last email time stamp


compareTo

public int compareTo(Student s)
Specified by:
compareTo in interface Comparable<Student>


Copyright © 2014 UniTime LLC. All Rights Reserved.