Class DerbyCourse

java.lang.Object
be.gaudry.dao.edu.derby.DerbyCourse
All Implemented Interfaces:
ICourse

public class DerbyCourse extends Object implements ICourse
Since:
1.0 Dec 25, 2008
Version:
1.3 Nov 13,2010
Author:
Steph GAUDRY
  • Constructor Details

    • DerbyCourse

      public DerbyCourse()
      Builds an instance
  • Method Details

    • loadCourses

      public Collection<Course> loadCourses(SchoolClass schoolClass, boolean lazy)
      Description copied from interface: ICourse
      Loads courses for a given school class.
      Be aware than even lazy parameter is false, only examinations are loaded, but not quotations into each examination.
      Specified by:
      loadCourses in interface ICourse
      lazy - false to load also the examinations for each course
      Returns:
    • copyCourses

      public String copyCourses(int originalSchoolClass, int destinationSchoolClass)
      Description copied from interface: ICourse
      Copies courses from a school class into another schoolclass Each existing course into the destination school class isn't copy.
      Specified by:
      copyCourses in interface ICourse
      Parameters:
      originalSchoolClass - school class from where to copy the courses
      destinationSchoolClass - school class where to paste the courses
      Returns:
      localized feedback of the operation
      Since:
      1.3 (Nov 13, 2010)
    • loadQuotations

      public void loadQuotations(Student student)
      Description copied from interface: ICourse
      Loads all courses and quotations into a student object
      Specified by:
      loadQuotations in interface ICourse
    • loadQuotations

      public void loadQuotations(Examination examination)
      Description copied from interface: ICourse
      Loads courses and quotations into an examination object
      Specified by:
      loadQuotations in interface ICourse
    • deleteQuotation

      public boolean deleteQuotation(Quotation quotation, int studentId)
      Specified by:
      deleteQuotation in interface ICourse
      Returns:
      false if a problem occurs
    • deleteQuotations

      public int deleteQuotations(List<StudentScoreList> quotations)
      Specified by:
      deleteQuotations in interface ICourse
      Returns:
      count of deleted quotations
    • deleteQuotations

      public int deleteQuotations(Map<Student,​Quotation> quotations)
      Specified by:
      deleteQuotations in interface ICourse
    • saveOrUpdateQuotations

      public boolean saveOrUpdateQuotations(Student student, Course course)
      Description copied from interface: ICourse
      Saves or updates quotations for a given course of a given student.
      The general contract of saveOrUpdateQuotations is 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:
      saveOrUpdateQuotations in interface ICourse
      Returns:
      false if a problem occurs
    • saveOrUpdateQuotations

      public boolean saveOrUpdateQuotations(Examination examination)
      Specified by:
      saveOrUpdateQuotations in interface ICourse
    • loadExamination

      public Examination loadExamination(int id)