Class Schedule

All Implemented Interfaces:
Identifiable, Serializable

public class Schedule extends ScheduleDescriptor
The class that represents a schedule. A schedule is composed of the item to schedule and the mechanism (trigger) for how and when the schedule will runs.
See Also:
  • Constructor Details

    • Schedule

      public Schedule(String id, String name, String description, String owner, ScheduleDescriptor.ScheduleStatus status, String schedulableLabel, Date lastModified, Schedulable schedulable, ScheduleTrigger trigger)
      It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the schedules returned by the API.
      Parameters:
      id - the unique identifier of the schedule.
      name - the name of the schedule.
      description - the description of the schedule.
      owner - the owner of the schedule.
      status - the status of the schedule.
      schedulableLabel - the label of the item (such as the job) that is scheduled.
      lastModified - the date on which the schedule was last modified.
      schedulable - the job to run when the schedule is triggered.
      trigger - the infromation about how and when the schedule runs.
  • Method Details

    • getSchedulable

      public Schedulable getSchedulable()
      Gets the schedulable item.
      Returns:
      Returns the schedulable item.
    • setSchedulable

      public void setSchedulable(Schedulable schedulable)
      Sets the schedulable item.
      Parameters:
      schedulable - The schedulable item.
    • getTrigger

      public ScheduleTrigger getTrigger()
      Gets the trigger that defines when to run the schedule.
      Returns:
      The trigger.
    • setTrigger

      public void setTrigger(ScheduleTrigger trigger)
      Sets the trigger which defines when to run the schedule.
      Parameters:
      trigger - The trigger.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ScheduleDescriptor
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ScheduleDescriptor
    • toString

      public String toString()
      Overrides:
      toString in class ScheduleDescriptor