|
|
|
@ -212,8 +212,8 @@ public interface StdJDBCConstants extends Constants {
|
|
|
|
|
+ ", " + COL_NEXT_FIRE_TIME + ", " + COL_PREV_FIRE_TIME + ", " |
|
|
|
|
+ COL_TRIGGER_STATE + ", " + COL_TRIGGER_TYPE + ", " |
|
|
|
|
+ COL_START_TIME + ", " + COL_END_TIME + ", " + COL_CALENDAR_NAME |
|
|
|
|
+ ", " + COL_MISFIRE_INSTRUCTION + ", " + COL_JOB_DATAMAP + ", " + COL_PRIORITY + ") " |
|
|
|
|
+ " VALUES(" + SCHED_NAME_SUBST + ", ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
|
|
|
|
+ ", " + COL_MISFIRE_INSTRUCTION + ", " + COL_JOB_DATAMAP + ", " + COL_PRIORITY + ", " + COL_APPOINT_ID + ") " |
|
|
|
|
+ " VALUES(" + SCHED_NAME_SUBST + ", ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
|
|
|
|
|
|
|
|
|
String INSERT_SIMPLE_TRIGGER = "INSERT INTO " |
|
|
|
|
+ TABLE_PREFIX_SUBST + TABLE_SIMPLE_TRIGGERS + " (" |
|
|
|
@ -507,13 +507,24 @@ public interface StdJDBCConstants extends Constants {
|
|
|
|
|
+ " AND " + COL_TRIGGER_STATE + " = ? AND " + COL_NEXT_FIRE_TIME + " = ?"; |
|
|
|
|
|
|
|
|
|
String SELECT_NEXT_TRIGGER_TO_ACQUIRE = "SELECT " |
|
|
|
|
+ COL_TRIGGER_NAME + ", " + COL_TRIGGER_GROUP + ", " |
|
|
|
|
+ COL_NEXT_FIRE_TIME + ", " + COL_PRIORITY + " FROM " |
|
|
|
|
+ TABLE_PREFIX_SUBST + TABLE_TRIGGERS + " WHERE " |
|
|
|
|
+ COL_SCHEDULER_NAME + " = " + SCHED_NAME_SUBST |
|
|
|
|
+ " AND " + COL_TRIGGER_STATE + " = ? AND " + COL_NEXT_FIRE_TIME + " <= ? " |
|
|
|
|
+ "AND (" + COL_MISFIRE_INSTRUCTION + " = -1 OR (" +COL_MISFIRE_INSTRUCTION+ " != -1 AND "+ COL_NEXT_FIRE_TIME + " >= ?)) " |
|
|
|
|
+ "ORDER BY "+ COL_NEXT_FIRE_TIME + " ASC, " + COL_PRIORITY + " DESC"; |
|
|
|
|
+ COL_TRIGGER_NAME + ", " + COL_TRIGGER_GROUP + ", " |
|
|
|
|
+ COL_NEXT_FIRE_TIME + ", " + COL_PRIORITY + " FROM " |
|
|
|
|
+ TABLE_PREFIX_SUBST + TABLE_TRIGGERS + " WHERE " |
|
|
|
|
+ COL_SCHEDULER_NAME + " = " + SCHED_NAME_SUBST |
|
|
|
|
+ " AND " + COL_APPOINT_ID + " IS NULL" |
|
|
|
|
+ " AND " + COL_TRIGGER_STATE + " = ? AND " + COL_NEXT_FIRE_TIME + " <= ? " |
|
|
|
|
+ "AND (" + COL_MISFIRE_INSTRUCTION + " = -1 OR (" + COL_MISFIRE_INSTRUCTION + " != -1 AND " + COL_NEXT_FIRE_TIME + " >= ?)) " |
|
|
|
|
+ "ORDER BY " + COL_NEXT_FIRE_TIME + " ASC, " + COL_PRIORITY + " DESC"; |
|
|
|
|
|
|
|
|
|
String SELECT_NEXT_APPOINT_TRIGGER_TO_ACQUIRE = "SELECT " |
|
|
|
|
+ COL_TRIGGER_NAME + ", " + COL_TRIGGER_GROUP + ", " |
|
|
|
|
+ COL_NEXT_FIRE_TIME + ", " + COL_PRIORITY + " FROM " |
|
|
|
|
+ TABLE_PREFIX_SUBST + TABLE_TRIGGERS + " WHERE " |
|
|
|
|
+ COL_SCHEDULER_NAME + " = " + SCHED_NAME_SUBST |
|
|
|
|
+ " AND " + COL_APPOINT_ID + " = ?" |
|
|
|
|
+ " AND " + COL_TRIGGER_STATE + " = ? AND " + COL_NEXT_FIRE_TIME + " <= ? " |
|
|
|
|
+ "AND (" + COL_MISFIRE_INSTRUCTION + " = -1 OR (" + COL_MISFIRE_INSTRUCTION + " != -1 AND " + COL_NEXT_FIRE_TIME + " >= ?)) " |
|
|
|
|
+ "ORDER BY " + COL_NEXT_FIRE_TIME + " ASC, " + COL_PRIORITY + " DESC"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String INSERT_FIRED_TRIGGER = "INSERT INTO " |
|
|
|
|