Class CourseProgress

All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, IDBean, ViewEntry, Cacheable

public class CourseProgress extends CertificationRequirement implements AuthoredBean, ViewEntry
A bean to track Flight Academy Course requirements. Each Certification has a number of requirements that need to be completed before the Course is done.
Since:
1.0
Version:
11.0
Author:
Luke
See Also:
  • Constructor Details

    • CourseProgress

      public CourseProgress(int courseID, int sequenceID)
      Creates a new Course Progress entry.
      Parameters:
      courseID - the database ID of the Course
      sequenceID - the order number
      Throws:
      IllegalArgumentException - if courseID or sequenceID are zero or negative
  • Method Details

    • getComplete

      public boolean getComplete()
      Returns whether this requirement has been completed.
      Returns:
      TRUE if the requirement is complete, otherwise FALSE
      See Also:
    • getCompletedOn

      public Instant getCompletedOn()
      Returns the completion date for this entry.
      Returns:
      the date/time this was marked complete, otherwise FALSE
      See Also:
    • getCourseID

      public int getCourseID()
      Returns the Course ID.
      Returns:
      the database ID of the Course
      See Also:
    • getAuthorID

      public int getAuthorID()
      Description copied from interface: AuthoredBean
      Returns the Author of this bean.
      Specified by:
      getAuthorID in interface AuthoredBean
      Returns:
      the author's database ID
      See Also:
    • setCourseID

      public void setCourseID(int id)
      Updates the Course ID for this Progress entry.
      Parameters:
      id - the database ID of the Course
      Throws:
      IllegalArgumentException - if id is negative
      See Also:
    • setAuthorID

      public void setAuthorID(int id)
      Description copied from interface: AuthoredBean
      Updates the author of this bean.
      Specified by:
      setAuthorID in interface AuthoredBean
      Parameters:
      id - the author's database ID.
      See Also:
    • setComplete

      public void setComplete(boolean done)
      Updates whether this requirement has been completed.
      Parameters:
      done - TRUE if the requirement is complete, otherwise FALSE
      See Also:
    • setCompletedOn

      public void setCompletedOn(Instant dt)
      Updates the complation date of this requirement.
      Parameters:
      dt - the date/time it was completed or null if incomplete
      See Also:
    • getRowClassName

      public String getRowClassName()
      Returns the CSS row class name if rendered in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name
    • equals

      public boolean equals(Object o)
      Checks for equality by comparing sequence numbers.
      Overrides:
      equals in class DatabaseBean