public List<SchedulerStateRecord> selectSchedulerStateRecords(Connection conn, String theInstanceId) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { List<SchedulerStateRecord> lst = new LinkedList<SchedulerStateRecord>(); if (theInstanceId != null) { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATE)); ps.setString(1, theInstanceId); } else { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATES)); } rs = ps.executeQuery(); while (rs.next()) { SchedulerStateRecord rec = new SchedulerStateRecord(); rec.setSchedulerInstanceId(rs.getString(COL_INSTANCE_NAME)); rec.setCheckinTimestamp(rs.getLong(COL_LAST_CHECKIN_TIME)); rec.setCheckinInterval(rs.getLong(COL_CHECKIN_INTERVAL)); lst.add(rec); } return lst; } finally { closeResultSet(rs); closeStatement(ps); } }
public List<SchedulerStateRecord> selectSchedulerStateRecords(Connection conn, String theInstanceId) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { List<SchedulerStateRecord> lst = new LinkedList<SchedulerStateRecord>(); if (theInstanceId != null) { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATE)); ps.setString(1, theInstanceId); } else { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATES)); } rs = ps.executeQuery(); while (rs.next()) { SchedulerStateRecord rec = new SchedulerStateRecord(); rec.setSchedulerInstanceId(rs.getString(COL_INSTANCE_NAME)); rec.setCheckinTimestamp(rs.getLong(COL_LAST_CHECKIN_TIME)); rec.setCheckinInterval(rs.getLong(COL_CHECKIN_INTERVAL)); lst.add(rec); } return lst; } finally { closeResultSet(rs); closeStatement(ps); } }
orphanedInstance.setSchedulerInstanceId(inst);
orphanedInstance.setSchedulerInstanceId(inst);
public List selectSchedulerStateRecords(Connection conn, String instanceId) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { List lst = new LinkedList(); if (instanceId != null) { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATE)); ps.setString(1, instanceId); } else { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATES)); } rs = ps.executeQuery(); while (rs.next()) { SchedulerStateRecord rec = new SchedulerStateRecord(); rec.setSchedulerInstanceId(rs.getString(COL_INSTANCE_NAME)); rec.setCheckinTimestamp(rs.getLong(COL_LAST_CHECKIN_TIME)); rec.setCheckinInterval(rs.getLong(COL_CHECKIN_INTERVAL)); lst.add(rec); } return lst; } finally { closeResultSet(rs); closeStatement(ps); } }
public List selectSchedulerStateRecords(Connection conn, String instanceId) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; try { List lst = new LinkedList(); if (instanceId != null) { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATE)); ps.setString(1, instanceId); } else { ps = conn.prepareStatement(rtp(SELECT_SCHEDULER_STATES)); } rs = ps.executeQuery(); while (rs.next()) { SchedulerStateRecord rec = new SchedulerStateRecord(); rec.setSchedulerInstanceId(rs.getString(COL_INSTANCE_NAME)); rec.setCheckinTimestamp(rs.getLong(COL_LAST_CHECKIN_TIME)); rec.setCheckinInterval(rs.getLong(COL_CHECKIN_INTERVAL)); lst.add(rec); } return lst; } finally { closeResultSet(rs); closeStatement(ps); } }
orphanedInstance.setSchedulerInstanceId((String)orphanIter.next());
orphanedInstance.setSchedulerInstanceId((String)orphanIter.next());