Package be.gaudry.model.edu
Class Student
java.lang.Object
be.gaudry.model.AbstractLightObject
be.gaudry.model.person.Person
be.gaudry.model.edu.Student
- All Implemented Interfaces:
ILightObject,Serializable
- Since:
- 1.0 Oct 12, 2008, 1.0
- Version:
- %I%, %G%
- Author:
- Steph GAUDRY
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class be.gaudry.model.person.Person
FIND_ALL_QUERYFields inherited from interface be.gaudry.model.ILightObject
DEFAULT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanIndicates whether some other object is "equal to" this student.intinthashCode()Returns a hash code value for the course.voidvoidRemoves allquotationsfor this student where the quotationcourseis the given course.voidRemoves a givenquotationfrom this student quotations.voidsetSchoolClass(SchoolClass schoolClass)Don't use this method to add a student into a class.voidsetStudentId(int studentId)Methods inherited from class be.gaudry.model.person.Person
copy, getBirthdate, getDisplay, getFirstName, getGender, getId, getLastName, setBirthdate, setDisplay, setFirstName, setGender, setId, setLastName, toString
-
Constructor Details
-
Student
public Student() -
Student
- Parameters:
id-lastName-
-
Student
- Parameters:
lastName-firstName-
-
Student
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this student.
Check is done on following fields :
Some fields are not checked here :scoreLists
- Overrides:
equalsin classPerson- Parameters:
obj- the reference object with which to compare.- Returns:
trueif this student is the same as the obj argument;falseotherwise.- See Also:
Object.equals(java.lang.Object),hashCode()
-
hashCode
public int hashCode()Returns a hash code value for the course.
Hash is done on following fields :
Some fields are not considered here :scoreLists
- Overrides:
hashCodein classPerson- Returns:
- a hash code value for this student.
- See Also:
Object.hashCode(),equals(Object)
-
register
-
add
Associates the specifiedQuotationwith the specifiedCoursekey in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value.
UsesMap.putimplementation.- Parameters:
course- key to store the quotationquotation- quotation to store
-
remove
Removes a givenquotationfrom this student quotations.- Parameters:
course- key to retrieve the quotation.quotation- quotation to remove
-
remove
Removes allquotationsfor this student where the quotationcourseis the given course.- Parameters:
course-
-
getSchoolClass
- Returns:
- the schoolClass
-
setSchoolClass
Don't use this method to add a student into a class. This method does not make reverse link.
UseSchoolClass.add(Student)instead of this to make bidirectional link.- Parameters:
schoolClass- the schoolClass to set
-
getScoreLists
- Returns:
- the scoreLists
-
setStudentId
public void setStudentId(int studentId)- Parameters:
studentId- the studentId to set
-
getStudentId
public int getStudentId()- Returns:
- the studentId
-