|
|
|
|
@ -56,21 +56,8 @@ public class CreateStartScan {
|
|
|
|
|
ResultSet rs = stmt.executeQuery(sql); |
|
|
|
|
|
|
|
|
|
//fix for individual results (not resultset)
|
|
|
|
|
String a = null; |
|
|
|
|
String b = null; |
|
|
|
|
String c = null; |
|
|
|
|
String d = null; |
|
|
|
|
String e = null; |
|
|
|
|
//still kind of needed for now since theres no established primary key, needs to be do
|
|
|
|
|
while (rs.next()) { |
|
|
|
|
a = rs.getString("scanid"); |
|
|
|
|
b = rs.getString("productid"); |
|
|
|
|
c = rs.getString("eventid"); |
|
|
|
|
d = rs.getString("ismanagedservice"); |
|
|
|
|
e = rs.getString("componentlist"); |
|
|
|
|
} |
|
|
|
|
//TODO: need to add unique keys to DBs
|
|
|
|
|
finalScan = new ScanObj(a,b,c,d,e); |
|
|
|
|
finalScan = new ScanObj(rs.getString("scanid"),rs.getString("productid"),rs.getString("eventid"),rs.getString("ismanagedservice"),rs.getString("componentlist")); |
|
|
|
|
String copySql = "INSERT INTO archive (scanid, productid, eventid, ismanagedservice, componentlist) VALUES ('" +finalScan.scanId+"', '"+finalScan.productId+"', '"+finalScan.eventId+"', '"+finalScan.isManagedService+"', '"+finalScan.componentList+"')"; |
|
|
|
|
stmt.executeUpdate(copySql); |
|
|
|
|
|
|
|
|
|
@ -80,7 +67,7 @@ public class CreateStartScan {
|
|
|
|
|
|
|
|
|
|
//send task to the actual interface here using the resultset returned (should multiple scanids be allowed):
|
|
|
|
|
//once the task is complete AND we have confirmation that the scan is done run the following sql
|
|
|
|
|
|
|
|
|
|
conn.close(); |
|
|
|
|
} catch (SQLException e){ |
|
|
|
|
System.out.println(e); |
|
|
|
|
} |
|
|
|
|
|