public int insertPausedTriggerGroup(Connection conn, String groupName) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_PAUSED_TRIGGER_GROUP)); ps.setString(1, groupName); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int deletePausedTriggerGroup(Connection conn, String groupName) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_PAUSED_TRIGGER_GROUP)); ps.setString(1, groupName); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int deleteAllPausedTriggerGroups(Connection conn) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_PAUSED_TRIGGER_GROUPS)); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int deleteSchedulerState(Connection conn, String theInstanceId) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_SCHEDULER_STATE)); ps.setString(1, theInstanceId); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int deleteFiredTriggers(Connection conn, String theInstanceId) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_INSTANCES_FIRED_TRIGGERS)); ps.setString(1, theInstanceId); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int deleteSchedulerState(Connection conn, String theInstanceId) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_SCHEDULER_STATE)); ps.setString(1, theInstanceId); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int deleteAllPausedTriggerGroups(Connection conn) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_PAUSED_TRIGGER_GROUPS)); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int updateSchedulerState(Connection conn, String theInstanceId, long checkInTime) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_SCHEDULER_STATE)); ps.setLong(1, checkInTime); ps.setString(2, theInstanceId); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int deleteFiredTriggers(Connection conn, String theInstanceId) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_INSTANCES_FIRED_TRIGGERS)); ps.setString(1, theInstanceId); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int insertPausedTriggerGroup(Connection conn, String groupName) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_PAUSED_TRIGGER_GROUP)); ps.setString(1, groupName); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int deletePausedTriggerGroup(Connection conn, String groupName) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_PAUSED_TRIGGER_GROUP)); ps.setString(1, groupName); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int updateSchedulerState(Connection conn, String theInstanceId, long checkInTime) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(UPDATE_SCHEDULER_STATE)); ps.setLong(1, checkInTime); ps.setString(2, theInstanceId); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int insertSchedulerState(Connection conn, String theInstanceId, long checkInTime, long interval) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_SCHEDULER_STATE)); ps.setString(1, theInstanceId); ps.setLong(2, checkInTime); ps.setLong(3, interval); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int insertSchedulerState(Connection conn, String theInstanceId, long checkInTime, long interval) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(INSERT_SCHEDULER_STATE)); ps.setString(1, theInstanceId); ps.setLong(2, checkInTime); ps.setLong(3, interval); return ps.executeUpdate(); } finally { closeStatement(ps); } }
public int deletePausedTriggerGroup(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_PAUSED_TRIGGER_GROUP)); ps.setString(1, toSqlLikeClause(matcher)); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public int deletePausedTriggerGroup(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(rtp(DELETE_PAUSED_TRIGGER_GROUP)); ps.setString(1, toSqlLikeClause(matcher)); int rows = ps.executeUpdate(); return rows; } finally { closeStatement(ps); } }
public boolean isTriggerGroupPaused(Connection conn, String groupName) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(rtp(SELECT_PAUSED_TRIGGER_GROUP)); ps.setString(1, groupName); rs = ps.executeQuery(); return rs.next(); } finally { closeResultSet(rs); closeStatement(ps); } }
public boolean isTriggerGroupPaused(Connection conn, String groupName) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(rtp(SELECT_PAUSED_TRIGGER_GROUP)); ps.setString(1, groupName); rs = ps.executeQuery(); return rs.next(); } finally { closeResultSet(rs); closeStatement(ps); } }
public int selectJobExecutionCount(Connection conn, JobKey jobKey) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(rtp(SELECT_JOB_EXECUTION_COUNT)); ps.setString(1, jobKey.getName()); ps.setString(2, jobKey.getGroup()); rs = ps.executeQuery(); return (rs.next()) ? rs.getInt(1) : 0; } finally { closeResultSet(rs); closeStatement(ps); } }
public int selectJobExecutionCount(Connection conn, JobKey jobKey) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(rtp(SELECT_JOB_EXECUTION_COUNT)); ps.setString(1, jobKey.getName()); ps.setString(2, jobKey.getGroup()); rs = ps.executeQuery(); return (rs.next()) ? rs.getInt(1) : 0; } finally { closeResultSet(rs); closeStatement(ps); } }