Class Course

java.lang.Object
be.gaudry.model.edu.course.Course
All Implemented Interfaces:
ILightObject

public class Course extends Object implements ILightObject
Concrete course (subject, teacher, parent course, location, goals, etc)
Since:
1.0 Oct 12, 2008, 1.0
Version:
%I%, %G%
Author:
Steph GAUDRY
  • Constructor Details

    • Course

      public Course()
    • Course

      public Course(CourseSubject subject)
      Parameters:
      subject -
    • Course

      public Course(int id, CourseSubject subject)
      Parameters:
      id -
      subject -
    • Course

      public Course(int id, CourseSubject subject, Collection<Examination> examinations)
      Parameters:
      id -
      subject -
  • Method Details

    • add

      public void add(Examination examination)
    • remove

      public void remove(Examination examination)
    • getSubject

      public CourseSubject getSubject()
      Returns:
      the subject
    • setSubject

      public void setSubject(CourseSubject subject)
      Parameters:
      subject - the subject to set
    • getExaminations

      public Collection<Examination> getExaminations()
      Returns:
      the examinations
    • getParentCourse

      public Course getParentCourse()
      Returns:
      the parentCourse
    • setParentCourse

      public void setParentCourse(Course parentCourse)
      Parameters:
      parentCourse - the parentCourse to set
    • getDisplay

      public String getDisplay()
      Description copied from interface: ILightObject
      String representation of the object. This should be a concise but meaningful representation that is easy for a person to read. \nInto the ILightObject implementations, the toString() method is often used to return the values of the properties to debug.
      Specified by:
      getDisplay in interface ILightObject
      Returns:
      the display
    • setDisplay

      public void setDisplay(String display)
      Description copied from interface: ILightObject
      Sets the display. \nThis general contract does not guarantee that the ILightObject.getDisplay() method will return the same string as the display argument. \nIn many subclasses of the basic implementation AbstractLightObject, the ILightObject.getDisplay() method returns a String built from a few meaningful properties. Thus, setting the display must be implemented in a way to respect the inheritance principle; the subclass behavior must be the same as expected from the supertype. \nBe careful than overriding this may produces side effects because setting the display may affects other properties. \nA good way is overriding the GenericLightObjectTest<T> class to test this. \n\nMaven dependency for the the GenericLightObjectTest<T>:
      • groupId: be.gaudry.broldev
      • artifactId: broldev.core.jpa-tests
      Specified by:
      setDisplay in interface ILightObject
      Parameters:
      display - String representation of the object
      See Also:
      ILightObject.getDisplay()
    • getId

      public int getId()
      Description copied from interface: ILightObject
      Identifier of the ILightObject
      Specified by:
      getId in interface ILightObject
      Returns:
      the id
    • setId

      public void setId(int id)
      Specified by:
      setId in interface ILightObject
      Parameters:
      id - the id to set
      See Also:
      ILightObject.getId()
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this course. Some fields are not checked here :
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this course is the same as the obj argument; false otherwise.
      See Also:
      Object.equals(java.lang.Object), hashCode()
    • hashCode

      public int hashCode()
      Returns a hash code value for the course. Some fields are not considered here :
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this course.
      See Also:
      Object.hashCode(), equals(Object)
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
      AbstractLightObject.toString()