public int insertExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimplePropertiesTriggerProperties properties = getTriggerProperties(trigger); PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(INSERT_SIMPLE_PROPS_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, trigger.getKey().getName()); ps.setString(2, trigger.getKey().getGroup()); ps.setString(3, properties.getString1()); ps.setString(4, properties.getString2()); ps.setString(5, properties.getString3()); ps.setInt(6, properties.getInt1()); ps.setInt(7, properties.getInt2()); ps.setLong(8, properties.getLong1()); ps.setLong(9, properties.getLong2()); ps.setBigDecimal(10, properties.getDecimal1()); ps.setBigDecimal(11, properties.getDecimal2()); ps.setBoolean(12, properties.isBoolean1()); ps.setBoolean(13, properties.isBoolean2()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int insertExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimplePropertiesTriggerProperties properties = getTriggerProperties(trigger); PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(INSERT_SIMPLE_PROPS_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, trigger.getKey().getName()); ps.setString(2, trigger.getKey().getGroup()); ps.setString(3, properties.getString1()); ps.setString(4, properties.getString2()); ps.setString(5, properties.getString3()); ps.setInt(6, properties.getInt1()); ps.setInt(7, properties.getInt2()); ps.setLong(8, properties.getLong1()); ps.setLong(9, properties.getLong2()); ps.setBigDecimal(10, properties.getDecimal1()); ps.setBigDecimal(11, properties.getDecimal2()); ps.setBoolean(12, properties.isBoolean1()); ps.setBoolean(13, properties.isBoolean2()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int updateExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimplePropertiesTriggerProperties properties = getTriggerProperties(trigger); PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(UPDATE_SIMPLE_PROPS_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, properties.getString1()); ps.setString(2, properties.getString2()); ps.setString(3, properties.getString3()); ps.setInt(4, properties.getInt1()); ps.setInt(5, properties.getInt2()); ps.setLong(6, properties.getLong1()); ps.setLong(7, properties.getLong2()); ps.setBigDecimal(8, properties.getDecimal1()); ps.setBigDecimal(9, properties.getDecimal2()); ps.setBoolean(10, properties.isBoolean1()); ps.setBoolean(11, properties.isBoolean2()); ps.setString(12, trigger.getKey().getName()); ps.setString(13, trigger.getKey().getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int updateExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimplePropertiesTriggerProperties properties = getTriggerProperties(trigger); PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(UPDATE_SIMPLE_PROPS_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, properties.getString1()); ps.setString(2, properties.getString2()); ps.setString(3, properties.getString3()); ps.setInt(4, properties.getInt1()); ps.setInt(5, properties.getInt2()); ps.setLong(6, properties.getLong1()); ps.setLong(7, properties.getLong2()); ps.setBigDecimal(8, properties.getDecimal1()); ps.setBigDecimal(9, properties.getDecimal2()); ps.setBoolean(10, properties.isBoolean1()); ps.setBoolean(11, properties.isBoolean2()); ps.setString(12, trigger.getKey().getName()); ps.setString(13, trigger.getKey().getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
@Override protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties props) { TimeZone tz = null; // if we use null, that's ok as system default tz will be used String tzId = props.getString2(); if(tzId != null && tzId.trim().length() != 0) // there could be null entries from previously released versions tz = TimeZone.getTimeZone(tzId); ScheduleBuilder<?> sb = CalendarIntervalScheduleBuilder.calendarIntervalSchedule() .withInterval(props.getInt1(), IntervalUnit.valueOf(props.getString1())) .inTimeZone(tz) .preserveHourOfDayAcrossDaylightSavings(props.isBoolean1()) .skipDayIfHourDoesNotExist(props.isBoolean2()); int timesTriggered = props.getInt2(); String[] statePropertyNames = { "timesTriggered" }; Object[] statePropertyValues = { timesTriggered }; return new TriggerPropertyBundle(sb, statePropertyNames, statePropertyValues); }
@Override protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties props) { TimeZone tz = null; // if we use null, that's ok as system default tz will be used String tzId = props.getString2(); if(tzId != null && tzId.trim().length() != 0) // there could be null entries from previously released versions tz = TimeZone.getTimeZone(tzId); ScheduleBuilder<?> sb = CalendarIntervalScheduleBuilder.calendarIntervalSchedule() .withInterval(props.getInt1(), IntervalUnit.valueOf(props.getString1())) .inTimeZone(tz) .preserveHourOfDayAcrossDaylightSavings(props.isBoolean1()) .skipDayIfHourDoesNotExist(props.isBoolean2()); int timesTriggered = props.getInt2(); String[] statePropertyNames = { "timesTriggered" }; Object[] statePropertyValues = { timesTriggered }; return new TriggerPropertyBundle(sb, statePropertyNames, statePropertyValues); }
@Override protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties props) { int repeatCount = (int)props.getLong1(); int interval = props.getInt1(); String intervalUnitStr = props.getString1(); String daysOfWeekStr = props.getString2();
@Override protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties props) { int repeatCount = (int)props.getLong1(); int interval = props.getInt1(); String intervalUnitStr = props.getString1(); String daysOfWeekStr = props.getString2();