dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24821
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12222: Minor
------------------------------------------------------------
revno: 12222
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-24 10:11:36 +0200
message:
Minor
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/scheduling/AnalyticsTableTask.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableService.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsTableService.java 2013-09-24 08:11:36 +0000
@@ -47,4 +47,9 @@
* Drops analytics and and temporary analytics tables between 1900 and 2100.
*/
void dropTables();
+
+ /**
+ * Generate required resource tables.
+ */
+ void generateResourceTables();
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/scheduling/AnalyticsTableTask.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/scheduling/AnalyticsTableTask.java 2013-09-04 07:35:34 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/scheduling/AnalyticsTableTask.java 2013-09-24 08:11:36 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.analytics.AnalyticsTableService;
import org.hisp.dhis.message.MessageService;
-import org.hisp.dhis.resourcetable.ResourceTableService;
import org.hisp.dhis.scheduling.TaskId;
import org.hisp.dhis.system.notification.Notifier;
import org.springframework.beans.factory.annotation.Autowired;
@@ -59,9 +58,6 @@
private AnalyticsTableService eventAnalyticsTableService;
@Autowired
- private ResourceTableService resourceTableService;
-
- @Autowired
private Notifier notifier;
@Autowired
@@ -92,7 +88,7 @@
try
{
- resourceTableService.generateAll();
+ analyticsTableService.generateResourceTables();
notifier.notify( taskId, "Updating analytics tables" );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableService.java 2013-09-24 08:11:36 +0000
@@ -45,7 +45,9 @@
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.period.Cal;
+import org.hisp.dhis.resourcetable.ResourceTableService;
import org.hisp.dhis.scheduling.TaskId;
+import org.hisp.dhis.sqlview.SqlViewService;
import org.hisp.dhis.system.notification.Notifier;
import org.hisp.dhis.system.util.Clock;
import org.hisp.dhis.system.util.ConcurrentUtils;
@@ -74,6 +76,12 @@
private DataElementService dataElementService;
@Autowired
+ private ResourceTableService resourceTableService;
+
+ @Autowired
+ private SqlViewService sqlViewService;
+
+ @Autowired
private Notifier notifier;
// -------------------------------------------------------------------------
@@ -144,6 +152,22 @@
tableManager.dropTable( table.getTempTableName() );
}
}
+
+ public void generateResourceTables()
+ {
+ sqlViewService.dropAllSqlViewTables();
+ resourceTableService.generateOrganisationUnitStructures();
+ resourceTableService.generateCategoryOptionComboNames();
+ resourceTableService.generateDataElementGroupSetTable();
+ resourceTableService.generateIndicatorGroupSetTable();
+ resourceTableService.generateOrganisationUnitGroupSetTable();
+ resourceTableService.generateCategoryTable();
+ resourceTableService.generateDataElementTable();
+ resourceTableService.generatePeriodTable();
+ resourceTableService.generateDatePeriodTable();
+ resourceTableService.generateDataElementCategoryOptionComboTable();
+ sqlViewService.createAllViewTables();
+ }
// -------------------------------------------------------------------------
// Supportive methods