Interface ICourse

All Known Implementing Classes:
DerbyCourse

public interface ICourse
Defines the general contract of Course, Examination, or Quotation management.
Do not provides any CourseSubject management (you must use administration module for that).
Since:
1.0 Dec 25, 2008
Version:
1.2 Nov 13,2010
Author:
Steph GAUDRY
  • Method Summary

    Modifier and Type
    Method
    Description
    copyCourses​(int origin, int destination)
    Copies courses from a school class into another schoolclass Each existing course into the destination school class isn't copy.
    boolean
    deleteQuotation​(Quotation quotation, int studentId)
     
    int
     
    int
     
    loadCourses​(SchoolClass schoolClass, boolean lazy)
    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.
    void
    loadQuotations​(Examination examination)
    Loads courses and quotations into an examination object
    void
    loadQuotations​(Student student)
    Loads all courses and quotations into a student object
    boolean
     
    boolean
    saveOrUpdateQuotations​(Student student, Course course)
    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.
  • Method Details

    • loadCourses

      Collection<Course> loadCourses(SchoolClass schoolClass, boolean lazy)
      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.
      Parameters:
      schoolClass -
      lazy - false to load also the examinations for each course
      Returns:
    • loadQuotations

      void loadQuotations(Student student)
      Loads all courses and quotations into a student object
      Parameters:
      student -
    • loadQuotations

      void loadQuotations(Examination examination)
      Loads courses and quotations into an examination object
      Parameters:
      examination -
    • deleteQuotation

      boolean deleteQuotation(Quotation quotation, int studentId)
      Parameters:
      quotation -
      studentId -
      Returns:
      false if a problem occurs
    • deleteQuotations

      int deleteQuotations(List<StudentScoreList> quotations)
      Parameters:
      quotations -
      Returns:
      count of deleted quotations
    • deleteQuotations

      int deleteQuotations(Map<Student,​Quotation> quotations)
    • saveOrUpdateQuotations

      boolean saveOrUpdateQuotations(Student student, Course course)
      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.
      Parameters:
      student -
      course -
      Returns:
      false if a problem occurs
    • saveOrUpdateQuotations

      boolean saveOrUpdateQuotations(Examination examination)
    • copyCourses

      String copyCourses(int origin, int destination)
      Copies courses from a school class into another schoolclass Each existing course into the destination school class isn't copy.
      Parameters:
      origin - school class from where to copy the courses
      destination - school class where to paste the courses
      Returns:
      localized feedback of the operation
      Since:
      1.2 (Nov 13, 2010)