dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10215
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2812: Removed pointless property for CompletenessResult class
------------------------------------------------------------
revno: 2812
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-02-03 18:03:02 +0100
message:
Removed pointless property for CompletenessResult class
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessResult.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.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-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessResult.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessResult.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessResult.java 2011-02-03 17:03:02 +0000
@@ -48,8 +48,6 @@
private int organisationUnitId;
- private int reportTableId;
-
// -------------------------------------------------------------------------
// Properties 2
// -------------------------------------------------------------------------
@@ -96,13 +94,12 @@
* @param registrationsOnTime the number of registrations on time.
*/
public DataSetCompletenessResult( int dataSetId, int periodId, String periodName, int organisationUnitId,
- int reportTableId, String name, int sources, int registrations, int registrationsOnTime )
+ String name, int sources, int registrations, int registrationsOnTime )
{
this.dataSetId = dataSetId;
this.periodId = periodId;
this.periodName = periodName;
this.organisationUnitId = organisationUnitId;
- this.reportTableId = reportTableId;
this.name = name;
this.sources = sources;
this.registrations = registrations;
@@ -249,16 +246,6 @@
this.organisationUnitId = organisationUnitId;
}
- public int getReportTableId()
- {
- return reportTableId;
- }
-
- public void setReportTableId( int reportTableId )
- {
- this.reportTableId = reportTableId;
- }
-
// -------------------------------------------------------------------------
// Getters and setters 2
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessService.java 2011-02-03 17:03:02 +0000
@@ -48,10 +48,9 @@
* @param dataSetIds
* @param periodIds
* @param organisationUnitIds
- * @param reportTableId
*/
void exportDataSetCompleteness( Collection<Integer> dataSetIds,
- Collection<Integer> periodIds, Collection<Integer> organisationUnitIds, Integer reportTableId );
+ Collection<Integer> periodIds, Collection<Integer> organisationUnitIds );
/**
* Returns a Collection of DataSetCompletenessResults. The DataSetCompletenessResult
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessInternalProcess.java 2011-02-03 17:03:02 +0000
@@ -79,13 +79,6 @@
this.organisationUnitIds = organisationUnitIds;
}
- private Integer reportTableId;
-
- public void setReportTableId( Integer reportTableId )
- {
- this.reportTableId = reportTableId;
- }
-
// -------------------------------------------------------------------------
// SerialToGroup implementation
// -------------------------------------------------------------------------
@@ -102,6 +95,6 @@
@Override
public void executeStatements()
{
- completenessService.exportDataSetCompleteness( dataSetIds, periodIds, organisationUnitIds, reportTableId );
+ completenessService.exportDataSetCompleteness( dataSetIds, periodIds, organisationUnitIds );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java 2011-01-30 20:55:40 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/impl/AbstractDataSetCompletenessService.java 2011-02-03 17:03:02 +0000
@@ -160,9 +160,9 @@
// -------------------------------------------------------------------------
// DataSetCompleteness
// -------------------------------------------------------------------------
-
+
public void exportDataSetCompleteness( Collection<Integer> dataSetIds,
- Collection<Integer> periodIds, Collection<Integer> organisationUnitIds, Integer reportTableId )
+ Collection<Integer> periodIds, Collection<Integer> organisationUnitIds )
{
log.info( "Data completeness export process started" );
@@ -196,7 +196,6 @@
aggregatedResult.setPeriodId( period.getId() );
aggregatedResult.setPeriodName( period.getName() );
aggregatedResult.setOrganisationUnitId( unit.getId() );
- aggregatedResult.setReportTableId( reportTableId );
for ( final Period intersectingPeriod : intersectingPeriods )
{
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2011-01-31 19:47:04 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2011-02-03 17:03:02 +0000
@@ -184,8 +184,7 @@
{
completenessService.exportDataSetCompleteness( getIdentifiers( DataSet.class, reportTable.getDataSets() ),
getIdentifiers( Period.class, reportTable.getAllPeriods() ),
- getIdentifiers( OrganisationUnit.class, reportTable.getAllUnits() ),
- reportTable.getId() );
+ getIdentifiers( OrganisationUnit.class, reportTable.getAllUnits() ) );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java 2010-08-27 07:07:57 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java 2011-02-03 17:03:02 +0000
@@ -175,7 +175,7 @@
assertEquals( new DataSetCompletenessResult( unitA.getName(), 3, 2, 0 ), resultF );
completenessService.exportDataSetCompleteness( getIdentifiers( DataSet.class, dataSets ),
- getIdentifiers( Period.class, periods ), getIdentifiers( OrganisationUnit.class, units ), reportTable.getId() );
+ getIdentifiers( Period.class, periods ), getIdentifiers( OrganisationUnit.class, units ) );
assertEquals( 100.0, completenessStore.getPercentage( dataSetA.getId(), periodA.getId(), unitB.getId() ) );
assertEquals( 100.0, completenessStore.getPercentage( dataSetA.getId(), periodA.getId(), unitC.getId() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java 2011-01-06 09:03:29 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java 2011-02-03 17:03:02 +0000
@@ -401,14 +401,14 @@
batchHandler.init();
- batchHandler.addObject( new DataSetCompletenessResult( 'A', 'A', "PeriodA", 'A', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'A', 'A', "PeriodA", 'B', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'A', 'B', "PeriodA", 'A', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'A', 'B', "PeriodA", 'B', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'B', 'A', "PeriodA", 'A', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'B', 'A', "PeriodA", 'B', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'B', 'B', "PeriodA", 'A', 1, "NameA", 20, 10, 5 ) );
- batchHandler.addObject( new DataSetCompletenessResult( 'B', 'B', "PeriodA", 'B', 1, "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'A', 'A', "PeriodA", 'A', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'A', 'A', "PeriodA", 'B', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'A', 'B', "PeriodA", 'A', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'A', 'B', "PeriodA", 'B', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'B', 'A', "PeriodA", 'A', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'B', 'A', "PeriodA", 'B', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'B', 'B', "PeriodA", 'A', "NameA", 20, 10, 5 ) );
+ batchHandler.addObject( new DataSetCompletenessResult( 'B', 'B', "PeriodA", 'B', "NameA", 20, 10, 5 ) );
batchHandler.flush();
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java 2010-11-23 16:12:57 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java 2011-02-03 17:03:02 +0000
@@ -94,7 +94,6 @@
statementBuilder.setColumn( "periodid" );
statementBuilder.setColumn( "periodname" );
statementBuilder.setColumn( "organisationunitid" );
- statementBuilder.setColumn( "reporttableid" );
statementBuilder.setColumn( "sources" );
statementBuilder.setColumn( "registrations" );
statementBuilder.setColumn( "registrationsOnTime" );
@@ -108,7 +107,6 @@
statementBuilder.setValue( result.getPeriodId() );
statementBuilder.setValue( result.getPeriodName() );
statementBuilder.setValue( result.getOrganisationUnitId() );
- statementBuilder.setValue( result.getReportTableId() );
statementBuilder.setValue( result.getSources() );
statementBuilder.setValue( result.getRegistrations() );
statementBuilder.setValue( result.getRegistrationsOnTime() );