Package be.gaudry.dao.edu.derby
Class DerbyCourse
java.lang.Object
be.gaudry.dao.edu.derby.DerbyCourse
- All Implemented Interfaces:
ICourse
- Since:
- 1.0 Dec 25, 2008
- Version:
- 1.3 Nov 13,2010
- Author:
- Steph GAUDRY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyCourses(int originalSchoolClass, int destinationSchoolClass)Copies courses from a school class into another schoolclass Each existing course into the destination school class isn't copy.booleandeleteQuotation(Quotation quotation, int studentId)intdeleteQuotations(List<StudentScoreList> quotations)intdeleteQuotations(Map<Student,Quotation> quotations)loadCourses(SchoolClass schoolClass, boolean lazy)Loads courses for a given school class.
Be aware than even lazy parameter isfalse, only examinations are loaded, but not quotations into each examination.loadExamination(int id)voidloadQuotations(Examination examination)Loads courses and quotations into an examination objectvoidloadQuotations(Student student)Loads all courses and quotations into a student objectbooleansaveOrUpdateQuotations(Examination examination)booleansaveOrUpdateQuotations(Student student, Course course)Saves or updates quotations for a given course of a given student.
The general contract ofsaveOrUpdateQuotationsis that each quotation for a given course is saved or updated into persistent layer.
If a quotation has an id equals to -1, it will be inserted after a check to know if an examination must be created for this quotation, and the id is set after the save operation.
-
Constructor Details
-
DerbyCourse
public DerbyCourse()Builds an instance
-
-
Method Details
-
loadCourses
Description copied from interface:ICourseLoads courses for a given school class.
Be aware than even lazy parameter isfalse, only examinations are loaded, but not quotations into each examination.- Specified by:
loadCoursesin interfaceICourselazy-falseto load also the examinations for each course- Returns:
-
copyCourses
Description copied from interface:ICourseCopies courses from a school class into another schoolclass Each existing course into the destination school class isn't copy.- Specified by:
copyCoursesin interfaceICourse- Parameters:
originalSchoolClass- school class from where to copy the coursesdestinationSchoolClass- school class where to paste the courses- Returns:
- localized feedback of the operation
- Since:
- 1.3 (Nov 13, 2010)
-
loadQuotations
Description copied from interface:ICourseLoads all courses and quotations into a student object- Specified by:
loadQuotationsin interfaceICourse
-
loadQuotations
Description copied from interface:ICourseLoads courses and quotations into an examination object- Specified by:
loadQuotationsin interfaceICourse
-
deleteQuotation
- Specified by:
deleteQuotationin interfaceICourse- Returns:
- false if a problem occurs
-
deleteQuotations
- Specified by:
deleteQuotationsin interfaceICourse- Returns:
- count of deleted quotations
-
deleteQuotations
- Specified by:
deleteQuotationsin interfaceICourse
-
saveOrUpdateQuotations
Description copied from interface:ICourseSaves or updates quotations for a given course of a given student.
The general contract ofsaveOrUpdateQuotationsis that each quotation for a given course is saved or updated into persistent layer.
If a quotation has an id equals to -1, it will be inserted after a check to know if an examination must be created for this quotation, and the id is set after the save operation.- Specified by:
saveOrUpdateQuotationsin interfaceICourse- Returns:
- false if a problem occurs
-
saveOrUpdateQuotations
- Specified by:
saveOrUpdateQuotationsin interfaceICourse
-
loadExamination
-