Changes to return type of Executable.getType() method to make it compile with Oracle...
[jabaws.git] / webservices / compbio / stat / collector / StatDB.java
index c2dd29a..2b7b66b 100644 (file)
@@ -111,6 +111,16 @@ public class StatDB {
                conn.close();\r
        }\r
 \r
+       static void clearStatTable() throws SQLException {\r
+               Connection conn = getDBConnection();\r
+               String query = "delete from exec_stat";\r
+               Statement st = conn.createStatement();\r
+               st.executeUpdate(query);\r
+               st.close();\r
+               conn.commit();\r
+               conn.close();\r
+       }\r
+\r
        void insertData(Set<JobStat> jobstatus) throws SQLException {\r
                log.info("Inserting " + jobstatus.size()\r
                                + " new records into the statistics database");\r
@@ -328,6 +338,8 @@ public class StatDB {
                }\r
        }\r
        public static void main(String[] args) throws SQLException {\r
+               // This is called from Ant cleanStatTable task\r
+               clearStatTable();\r
                // new StatDB().createStatTable();\r
                // insertData(null);\r
                /*\r