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.
// the load is not run for the first time && it's not processed in this load, clear the old technologies for the project
2722
+
// the load is not run for the first time && it's not processed in this load, clear the old groups for the project
2721
2723
deleteTechnologies.clearParameters();
2722
2724
deleteTechnologies.setLong(1, projectID);
2723
2725
deleteTechnologies.executeUpdate();
@@ -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