/** * Trigger equality is based upon the equality of the TriggerKey. * * @return true if the key of this Trigger equals that of the given Trigger. */ @Override public boolean equals(Object o) { if(!(o instanceof Trigger)) return false; Trigger other = (Trigger)o; return !(other.getKey() == null || getKey() == null) && getKey().equals(other.getKey()); }
/** * Trigger equality is based upon the equality of the TriggerKey. * * @return true if the key of this Trigger equals that of the given Trigger. */ @Override public boolean equals(Object o) { if(!(o instanceof Trigger)) return false; Trigger other = (Trigger)o; return !(other.getKey() == null || getKey() == null) && getKey().equals(other.getKey()); }
/** * <p> * Compare the next fire time of this <code>Trigger</code> to that of * another by comparing their keys, or in other words, sorts them * according to the natural (i.e. alphabetical) order of their keys. * </p> */ public int compareTo(Trigger other) { if(other.getKey() == null && getKey() == null) return 0; if(other.getKey() == null) return -1; if(getKey() == null) return 1; return getKey().compareTo(other.getKey()); }
/** * <p> * Compare the next fire time of this <code>Trigger</code> to that of * another by comparing their keys, or in other words, sorts them * according to the natural (i.e. alphabetical) order of their keys. * </p> */ public int compareTo(Trigger other) { if(other.getKey() == null && getKey() == null) return 0; if(other.getKey() == null) return -1; if(getKey() == null) return 1; return getKey().compareTo(other.getKey()); }
public TriggerBuilder<T> getTriggerBuilder() { return TriggerBuilder.newTrigger() .forJob(getJobKey()) .modifiedByCalendar(getCalendarName()) .usingJobData(getJobDataMap()) .withDescription(getDescription()) .endAt(getEndTime()) .withIdentity(getKey()) .withPriority(getPriority()) .startAt(getStartTime()) .withSchedule(getScheduleBuilder()); }
public TriggerBuilder<T> getTriggerBuilder() { return TriggerBuilder.newTrigger() .forJob(getJobKey()) .modifiedByCalendar(getCalendarName()) .usingJobData(getJobDataMap()) .withDescription(getDescription()) .endAt(getEndTime()) .withIdentity(getKey()) .withPriority(getPriority()) .startAt(getStartTime()) .withSchedule(getScheduleBuilder()); }
@JsonIgnore public TriggerKey getKey() { return trigger.getKey(); }