Class Schedule


  • public class Schedule
    extends java.lang.Object
    Define the content of a Schedule record.
    • Constructor Summary

      Constructors 
      Constructor Description
      Schedule​(int layoutId)
      Create a new schedule with default values.
      Schedule​(int scheduleId, int layoutId, java.lang.String scheduleName, java.lang.String effDate, int startHour, int duration)  
    • Constructor Detail

      • Schedule

        public Schedule​(int layoutId)
        Create a new schedule with default values.
        Parameters:
        layoutId - The parent layout id.
        Throws:
        java.lang.IllegalArgumentException - SCHEDULE_ADD_FAIL
      • Schedule

        public Schedule​(int scheduleId,
                        int layoutId,
                        java.lang.String scheduleName,
                        java.lang.String effDate,
                        int startHour,
                        int duration)
    • Method Detail

      • getCopy

        public Schedule getCopy​(int layoutId)
        Make a copy of the schedule.
        Parameters:
        layoutId - The new layoutId, if zero use the current layout id.
        Returns:
        a new schedule instance.
      • setScheduleName

        public void setScheduleName​(java.lang.String newName)
      • getEffDate

        public java.lang.String getEffDate()
      • setEffDate

        public void setEffDate​(java.lang.String newDate)
      • setStartHour

        public void setStartHour​(int newStartHour)
        Set the start hour, 0 - 23.
        Parameters:
        newStartHour - The start hour in the range of 0 to 23.
        Throws:
        java.lang.IllegalArgumentException - (START_HOUR_RANGE).
      • setDuration

        public void setDuration​(int newDuration)
        Set the duration, 1 - 24 hours.
        Parameters:
        newDuration - The duration in the range of 1 to 24.
        Throws:
        java.lang.IllegalArgumentException - (DURATION_RANGE).
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object