Interface ForecastJob

    • Method Detail

      • getChildOrder

        Long getChildOrder()
        Get the value for ChildOrder. (The index number of this child with respect to its siblings and its parent) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDescription

        String getDescription()
        Get the value for Description. (The name of the job.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getSearchDescription

        String getSearchDescription()
        Get the value for SearchDescription. (The description converted to upper-case, used for searching.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getErrorDescription

        String getErrorDescription()
        Get the value for ErrorDescription. (The description of the error that occurred when forecasting this job.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getEstimates

        JobEstimates getEstimates()
        Get the value for Estimates. (Estimates for this job.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getExpectedEndTime

        DateTimeZone getExpectedEndTime()
        Get the value for ExpectedEndTime. (The date and time when the job is expected to finish.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getExpectedRunTime

        Long getExpectedRunTime()
        Get the value for ExpectedRunTime. (The average run time from the JobDefinition statistics when the forecast job is created.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getExpectedStartTime

        DateTimeZone getExpectedStartTime()
        Get the value for ExpectedStartTime. (The date and time the job is expected to start executing.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getForecastStatus

        ForecastJobStatus getForecastStatus()
        Get the value for ForecastStatus. (The current status of the job) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getFrequency

        Long getFrequency()
        Get the value for Frequency. (The number of times the job will submit between the expected start and end time.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getJobGroupEndDate

        DateTimeZone getJobGroupEndDate()
        Get the value for JobGroupEndDate. (The job group ends at the defined date and time. )
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getJobGroupId

        Long getJobGroupId()
        Get the value for JobGroupId. (The job group id for external use. Note that the JobGroup object is not externally visible.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getJobGroupMaxJobs

        Long getJobGroupMaxJobs()
        Get the value for JobGroupMaxJobs. (The job group ends if the defined maximum of jobs is reached. )
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getJobGroupPresubmitCount

        Long getJobGroupPresubmitCount()
        Get the value for JobGroupPresubmitCount. (The number of jobs that is scheduled in advance for the job group.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getJobStatus

        JobStatus getJobStatus()
        Get the value for JobStatus. (The current status of the job) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMaintenance

        JobMaintenance getMaintenance()
        Get the value for Maintenance. (The maintenance level for the Job.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getNextSubmitBaseTime

        DateTimeZone getNextSubmitBaseTime()
        Get the value for NextSubmitBaseTime. (The time that will be used as a start time for the calculation of the next RequestedStartTime for a Job with a SubmitFrame or a RecurrencePattern.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getNumChildForecastJobs

        Long getNumChildForecastJobs()
        Get the value for NumChildForecastJobs. (How many children ForecastJobs does this ForecastJob have? This is a performance optimization field.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getPriority

        Long getPriority()
        Get the value for Priority. (The priority of a job. priority 1-100, higher has precedence; This field only has relevance if the resources or queue size is limited.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getRecurrencePattern

        String getRecurrencePattern()
        Get the value for RecurrencePattern. (The recurrence pattern for this forecast)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getReturnCode

        Long getReturnCode()
        Get the value for ReturnCode. (The return code of the job)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStartAtValue

        String getStartAtValue()
        Get the value for StartAtValue. (At which job chain step the job should start running from.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStartTime

        DateTimeZone getStartTime()
        Get the value for StartTime. (The date and time the job is expected to start executing.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStepIteration

        Long getStepIteration()
        Get the value for StepIteration. (For job chain steps and their calls only: Iteration number.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setDescription

        void setDescription​(String newDescription)
        Set the value for Description. (The name of the job.) This value is mandatory.
        Parameters:
        newDescription - the new value for Description. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setExpectedRunTime

        void setExpectedRunTime​(Long newExpectedRunTime)
        Set the value for ExpectedRunTime. (The average run time from the JobDefinition statistics when the forecast job is created.) This value is optional.
        Parameters:
        newExpectedRunTime - the new value for ExpectedRunTime.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setFrequency

        void setFrequency​(Long newFrequency)
        Set the value for Frequency. (The number of times the job will submit between the expected start and end time.) This value is mandatory.
        Parameters:
        newFrequency - the new value for Frequency. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setJobGroupId

        void setJobGroupId​(Long newJobGroupId)
        Set the value for JobGroupId. (The job group id for external use. Note that the JobGroup object is not externally visible.) This value is mandatory.
        Parameters:
        newJobGroupId - the new value for JobGroupId. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setStartTime

        void setStartTime​(DateTimeZone newStartTime)
        Set the value for StartTime. (The date and time the job is expected to start executing.) This value is mandatory.
        Parameters:
        newStartTime - the new value for StartTime. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • forecast

        RWIterable<ForecastJob> forecast​(JobForecastContext forecastContext)
        Create forecast jobs based on the current forecast job. The start and run time determine the forecast period. A forecast job without job group and zero frequency will return an iterator with all job groups that will be forecast in the requested time interval. If job group is filled and frequency is zero, an iterator with the forecast jobs for that job group in the requested time interval is returned.
        Specified by:
        forecast in interface ForecastJobComp
        Parameters:
        forecastContext - An object with the parameters for the forecast.
        Returns:
        The iterator over the all forecast jobs.
      • forecastJob

        void forecastJob​(JobForecastContext forecastContext)
        Fill this forecast job with a forecast for the job that is set in the job attribute. If the job is a chain, the forecasts for the steps and calls will be child objects of the returned forecast job.
        Parameters:
        forecastContext - An object with the parameters for the forecast.
      • getParentForecastJob

        ForecastJob getParentForecastJob()
        Get the ParentForecastJob.
        Returns:
        ParentForecastJob
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getJob

        Job getJob()
        Get the Job.
        Returns:
        Job
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getJobChainCall

        JobChainCall getJobChainCall()
        Get the JobChainCall.
        Returns:
        JobChainCall
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getJobChainStep

        JobChainStep getJobChainStep()
        Get the JobChainStep.
        Returns:
        JobChainStep
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getJobDefinition

        JobDefinition getJobDefinition()
        Get the JobDefinition.
        Returns:
        JobDefinition
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getQueue

        Queue getQueue()
        Get the Queue.
        Returns:
        Queue
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getSubmitFrame

        SubmitFrame getSubmitFrame()
        Get the SubmitFrame.
        Returns:
        SubmitFrame
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getTimeWindow

        TimeWindow getTimeWindow()
        Get the TimeWindow.
        Returns:
        TimeWindow
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setParentForecastJob

        void setParentForecastJob​(ForecastJob newParentForecastJob)
        Set the value for ParentForecastJob. This value is optional.
        Parameters:
        newParentForecastJob - is the object to set ParentForecastJob to. The parent Job of this Job.
      • setJob

        void setJob​(Job newJob)
        Set the value for Job. This value is optional.
        Parameters:
        newJob - is the object to set Job to. The real job for a forecast job.
      • setJobChainCall

        void setJobChainCall​(JobChainCall newJobChainCall)
        Set the value for JobChainCall. This value is optional.
        Parameters:
        newJobChainCall - is the object to set JobChainCall to. The forecast job of a job chain call.
      • setJobChainStep

        void setJobChainStep​(JobChainStep newJobChainStep)
        Set the value for JobChainStep. This value is optional.
        Parameters:
        newJobChainStep - is the object to set JobChainStep to. The forecast job representing a job chain step.
      • setJobDefinition

        void setJobDefinition​(JobDefinition newJobDefinition)
        Set the value for JobDefinition. This value is mandatory.
        Parameters:
        newJobDefinition - is the object to set JobDefinition to. The job definition for a forecast job. If this is null, then the object cannot be persisted.
      • setQueue

        void setQueue​(Queue newQueue)
        Set the value for Queue. This value is mandatory.
        Parameters:
        newQueue - is the object to set Queue to. The queue of a forecast job. If this is null, then the object cannot be persisted.
      • setSubmitFrame

        void setSubmitFrame​(SubmitFrame newSubmitFrame)
        Set the value for SubmitFrame. This value is optional.
        Parameters:
        newSubmitFrame - is the object to set SubmitFrame to. The submit frame of a forecast job.
      • setTimeWindow

        void setTimeWindow​(TimeWindow newTimeWindow)
        Set the value for TimeWindow. This value is optional.
        Parameters:
        newTimeWindow - is the object to set TimeWindow to. The time window of a forecast job.