You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
// we need to delete this project and all related objects in the database.
@@ -2171,7 +2174,6 @@ public void doLoadProjects() throws Exception {
2171
2174
}
2172
2175
}
2173
2176
2174
-
2175
2177
/**
2176
2178
* <p/>
2177
2179
* Load Marathon Matches to the DW.
@@ -2750,6 +2752,93 @@ public void doLoadProjectTechnologies() throws Exception {
2750
2752
}
2751
2753
}
2752
2754
2755
+
/**
2756
+
* Loads the project groups.
2757
+
*
2758
+
* @throws Exception if any error.
2759
+
* @since 1.2.3
2760
+
*/
2761
+
publicvoiddoLoadProjectGroups() throwsException {
2762
+
log.info("load project groups");
2763
+
2764
+
PreparedStatementfirstTimeSelect = null;
2765
+
PreparedStatementdeleteGroups = null;
2766
+
PreparedStatementselectGroups = null;
2767
+
PreparedStatementinsertGroups = null;
2768
+
ResultSetrs = null;
2769
+
Set<Long> deletedProjects = newHashSet<Long>();
2770
+
2771
+
try {
2772
+
longstart = System.currentTimeMillis();
2773
+
2774
+
firstTimeSelect = prepareStatement("SELECT count(*) from project_groups", TARGET_DB);
2775
+
rs = firstTimeSelect.executeQuery();
2776
+
rs.next();
2777
+
2778
+
// no records, it's the first run of loading groups
2779
+
booleanfirstRun = rs.getInt(1) == 0;
2780
+
2781
+
if(firstRun) log.info("Loading project group table for the first time. A complete load will be performed");
2782
+
2783
+
finalStringSELECT = "select p.project_id, group_id from project p INNER JOIN common_oltp:contest_eligibility ce ON ce.contest_id = p.project_id INNER JOIN common_oltp:group_contest_eligibility gce ON gce.contest_eligibility_id=ce.contest_eligibility_id \n" +
2784
+
(firstRun ? "" : " AND (p.create_date > ? OR p.modify_date > ?)") +
0 commit comments