public int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(DELETE_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(DELETE_SIMPLE_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(DELETE_SIMPLE_PROPS_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(DELETE_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(DELETE_SIMPLE_PROPS_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int deleteExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(DELETE_SIMPLE_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int updateExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimpleTrigger simpleTrigger = (SimpleTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(UPDATE_SIMPLE_TRIGGER, tablePrefix, schedNameLiteral)); ps.setInt(1, simpleTrigger.getRepeatCount()); ps.setBigDecimal(2, new BigDecimal(String.valueOf(simpleTrigger.getRepeatInterval()))); ps.setInt(3, simpleTrigger.getTimesTriggered()); ps.setString(4, simpleTrigger.getKey().getName()); ps.setString(5, simpleTrigger.getKey().getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int insertExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { CronTrigger cronTrigger = (CronTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(INSERT_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, trigger.getKey().getName()); ps.setString(2, trigger.getKey().getGroup()); ps.setString(3, cronTrigger.getCronExpression()); ps.setString(4, cronTrigger.getTimeZone().getID()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int updateExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { CronTrigger cronTrigger = (CronTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(UPDATE_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, cronTrigger.getCronExpression()); ps.setString(2, cronTrigger.getTimeZone().getID()); ps.setString(3, trigger.getKey().getName()); ps.setString(4, trigger.getKey().getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int insertExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { CronTrigger cronTrigger = (CronTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(INSERT_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, trigger.getKey().getName()); ps.setString(2, trigger.getKey().getGroup()); ps.setString(3, cronTrigger.getCronExpression()); ps.setString(4, cronTrigger.getTimeZone().getID()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int updateExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { CronTrigger cronTrigger = (CronTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(UPDATE_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, cronTrigger.getCronExpression()); ps.setString(2, cronTrigger.getTimeZone().getID()); ps.setString(3, trigger.getKey().getName()); ps.setString(4, trigger.getKey().getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int insertExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimpleTrigger simpleTrigger = (SimpleTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(INSERT_SIMPLE_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, trigger.getKey().getName()); ps.setString(2, trigger.getKey().getGroup()); ps.setInt(3, simpleTrigger.getRepeatCount()); ps.setBigDecimal(4, new BigDecimal(String.valueOf(simpleTrigger.getRepeatInterval()))); ps.setInt(5, simpleTrigger.getTimesTriggered()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int updateExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimpleTrigger simpleTrigger = (SimpleTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(UPDATE_SIMPLE_TRIGGER, tablePrefix, schedNameLiteral)); ps.setInt(1, simpleTrigger.getRepeatCount()); ps.setBigDecimal(2, new BigDecimal(String.valueOf(simpleTrigger.getRepeatInterval()))); ps.setInt(3, simpleTrigger.getTimesTriggered()); ps.setString(4, simpleTrigger.getKey().getName()); ps.setString(5, simpleTrigger.getKey().getGroup()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public int insertExtendedTriggerProperties(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException { SimpleTrigger simpleTrigger = (SimpleTrigger)trigger; PreparedStatement ps = null; try { ps = conn.prepareStatement(Util.rtp(INSERT_SIMPLE_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, trigger.getKey().getName()); ps.setString(2, trigger.getKey().getGroup()); ps.setInt(3, simpleTrigger.getRepeatCount()); ps.setBigDecimal(4, new BigDecimal(String.valueOf(simpleTrigger.getRepeatInterval()))); ps.setInt(5, simpleTrigger.getTimesTriggered()); return ps.executeUpdate(); } finally { Util.closeStatement(ps); } }
public TriggerPropertyBundle loadExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(Util.rtp(SELECT_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); rs = ps.executeQuery(); if (rs.next()) { String cronExpr = rs.getString(COL_CRON_EXPRESSION); String timeZoneId = rs.getString(COL_TIME_ZONE_ID); CronScheduleBuilder cb = CronScheduleBuilder.cronSchedule(cronExpr); if (timeZoneId != null) cb.inTimeZone(TimeZone.getTimeZone(timeZoneId)); return new TriggerPropertyBundle(cb, null, null); } throw new IllegalStateException("No record found for selection of Trigger with key: '" + triggerKey + "' and statement: " + Util.rtp(SELECT_CRON_TRIGGER, tablePrefix, schedNameLiteral)); } finally { Util.closeResultSet(rs); Util.closeStatement(ps); } }
public TriggerPropertyBundle loadExtendedTriggerProperties(Connection conn, TriggerKey triggerKey) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(Util.rtp(SELECT_CRON_TRIGGER, tablePrefix, schedNameLiteral)); ps.setString(1, triggerKey.getName()); ps.setString(2, triggerKey.getGroup()); rs = ps.executeQuery(); if (rs.next()) { String cronExpr = rs.getString(COL_CRON_EXPRESSION); String timeZoneId = rs.getString(COL_TIME_ZONE_ID); CronScheduleBuilder cb = CronScheduleBuilder.cronSchedule(cronExpr); if (timeZoneId != null) cb.inTimeZone(TimeZone.getTimeZone(timeZoneId)); return new TriggerPropertyBundle(cb, null, null); } throw new IllegalStateException("No record found for selection of Trigger with key: '" + triggerKey + "' and statement: " + Util.rtp(SELECT_CRON_TRIGGER, tablePrefix, schedNameLiteral)); } finally { Util.closeResultSet(rs); 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 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); } }