Class Schedule


  • public class Schedule
    extends Object
    Since:
    4.0.8
    Version:
    $Revision: 16294 $ $Date: 2014-06-24 13:51:20 -0300 (Tue, 24 Jun 2014) $
    • Constructor Detail

      • Schedule

        public Schedule()
    • Method Detail

      • getEndDate

        public Date getEndDate()
      • setEndDate

        public void setEndDate​(Date endDateTime)
      • getId

        public String getId()
      • setId

        public void setId​(String id)
      • getLastProcessDateTime

        public Date getLastProcessDateTime()
      • setLastProcessDateTime

        public void setLastProcessDateTime​(Date lastProcessDateTime)
      • getModelId

        public String getModelId()
      • setModelId

        public void setModelId​(String modelId)
      • getNextProcessDateTime

        public Date getNextProcessDateTime()
      • setNextProcessDateTime

        public void setNextProcessDateTime​(Date nextProcessDateTime)
      • getProcessTime

        public Time getProcessTime()
      • setProcessTime

        public void setProcessTime​(Time processDateTime)
      • getScheduleMonthDay

        public Integer getScheduleMonthDay()
      • setScheduleMonthDay

        public void setScheduleMonthDay​(Integer scheduleMonthDay)
      • getScheduleType

        public int getScheduleType()
      • setScheduleType

        public void setScheduleType​(int scheduleType)
      • getScheduleWeekDay

        public Integer getScheduleWeekDay()
      • setScheduleWeekDay

        public void setScheduleWeekDay​(Integer scheduleWeekDay)
      • getStartDate

        public Date getStartDate()
      • setStartDate

        public void setStartDate​(Date startDateTime)
      • getStatus

        public int getStatus()
      • setStatus

        public void setStatus​(int status)
      • computeNextProcessDateTime

        public Date computeNextProcessDateTime​(int threshold)
        Computes the next process date/time based only on the start date and last process date. This method does not take into consideration any values set on the nextProcessDateTime field.
        Parameters:
        threshold - the acceptable variation from the schedule process time and the current date in order to allow the schedule to be executed in case it's late.
        Returns:
        Since:
        4.0.8
      • compareWithThreshold

        public static boolean compareWithThreshold​(Calendar date1,
                                                   Calendar date2,
                                                   int threshold)
        Compares date1 and date2 considering the specified threshold. Returns true if (date1 + threshold) is before date2, false otherwise.
        Parameters:
        date1 -
        date2 -
        threshold - the acceptable thershold in minutes
        Returns:
        Since:
        4.0.8
      • getExecutionStatus

        public int getExecutionStatus()
        Returns the executionStatus.
        Returns:
        the executionStatus
        Since:
        4.0.8
      • setExecutionStatus

        public void setExecutionStatus​(int executionStatus)
        Sets the executionStatus.
        Parameters:
        executionStatus - the executionStatus value to set
        Since:
        4.0.8