← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3478: Removed Source and CalculatedDataElement from Indian modules

 

------------------------------------------------------------
revno: 3478
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-04-27 19:15:13 +0200
message:
  Removed Source and CalculatedDataElement from Indian modules
removed:
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/CalculateCDEsAction.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/multidimensional/SelectAction.java
modified:
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTarget.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetStore.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValue.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueStore.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListDataValue.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListStore.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_in.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/Survey.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyStore.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueStore.java
  local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java
  local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java
  local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultEmployeeService.java
  local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultLineListService.java
  local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HiberateEmployeeStore.java
  local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HibernateLineListStore.java
  local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java
  local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/Report_inDeletionHandler.java
  local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/hibernate/HibernateReportStore.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/DefaultDeTargetDataValueService.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/hibernate/HibernateDeTargetDataValueStore.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/DefaultSurveyService.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/hibernate/HibernateSurveyStore.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/DefaultSurveyDataValueService.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/hibernate/HibernateSurveyDataValueStore.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/target/DefaultDeTargetMappingService.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateCommentsResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateGroupWiseDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateLastUpdatedDataSetResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateSummaryDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateValidationStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateGroupWiseMobileDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateLastUpdatedMobileDataSetResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateMobileDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GeneratePercentageDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateSummaryMobileDataStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateValidationMobileStatusResultAction.java
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/orgunitgroupsetwise/action/GenerateDataStatusOrgnisationunitGroupSetWiseResultAction.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SaveLineListingAggData.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SectionFormAction.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValue.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueService.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueStore.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/comments/DefaultStandardCommentsManager.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/DefaultLLDataValueService.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java
  local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/state/DefaultSelectedStateManager.java
  local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/TwentyPoint/action/GenerateTwentyPointReportsFromAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddMultipleUserAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetNationalIndicatorReportsAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetProgressReportsAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportResultAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsFormAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsResultAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java
  local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/DefineDeTargetAssociationsAction.java
  local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/SetupAssociationsTreeAction.java
  local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/DefineSurveyAssociationsAction.java
  local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/SetupAssociationsTreeAction.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 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTarget.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTarget.java	2011-01-15 12:29:21 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTarget.java	2011-04-27 17:15:13 +0000
@@ -33,7 +33,7 @@
 
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -72,7 +72,7 @@
     /**
      * All Sources that register data with this DataElement Target.
      */
-    private Set<Source> sources = new HashSet<Source>();
+    private Set<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
     
     /**
      * Description of this DataElement Target.
@@ -199,12 +199,12 @@
         this.decategoryOptionCombo = decategoryOptionCombo;
     }
 
-    public Set<Source> getSources()
+    public Set<OrganisationUnit> getSources()
     {
         return sources;
     }
 
-    public void setSources( Set<Source> sources )
+    public void setSources( Set<OrganisationUnit> sources )
     {
         this.sources = sources;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetService.java	2011-01-17 07:45:29 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetService.java	2011-04-27 17:15:13 +0000
@@ -30,8 +30,7 @@
 
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.source.Source;
-
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -95,7 +94,7 @@
     /**
      * Returns all DeTarget associated with the specified source.
      */
-    Collection<DeTarget> getDeTargetBySource( Source source );
+    Collection<DeTarget> getDeTargetBySource( OrganisationUnit source );
 
     /**
      * Returns all DeTarget associated with the specified dataelement.

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetStore.java	2011-01-17 07:45:29 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/detarget/DeTargetStore.java	2011-04-27 17:15:13 +0000
@@ -30,7 +30,7 @@
 
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -94,7 +94,7 @@
     /**
      * Returns all DeTarget associated with the specified source.
      */
-    Collection<DeTarget> getDeTargetsBySource( Source source );
+    Collection<DeTarget> getDeTargetsBySource( OrganisationUnit source );
     
     /**
      * Returns all DeTarget associated with the specified indicator.

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValue.java	2011-01-17 09:20:40 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValue.java	2011-04-27 17:15:13 +0000
@@ -32,8 +32,8 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.detarget.DeTarget;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -59,7 +59,7 @@
     /**
      * Part of the DeTargetDataValue's composite ID
      */
-    private Source source;
+    private OrganisationUnit source;
 
     /**
      * 
@@ -89,7 +89,7 @@
     {
     }
 
-    public DeTargetDataValue( DeTarget deTarget, DataElement dataelement, DataElementCategoryOptionCombo decategoryOptionCombo, Source source, Period period, String value )
+    public DeTargetDataValue( DeTarget deTarget, DataElement dataelement, DataElementCategoryOptionCombo decategoryOptionCombo, OrganisationUnit source, Period period, String value )
     {
         this.deTarget = deTarget;
         this.dataelement = dataelement;
@@ -99,7 +99,7 @@
         this.value = value;
     }
 
-    public DeTargetDataValue( DeTarget deTarget, DataElement dataelement, DataElementCategoryOptionCombo decategoryOptionCombo, Source source, Period period ,String value, String storedBy,Date timestamp )
+    public DeTargetDataValue( DeTarget deTarget, DataElement dataelement, DataElementCategoryOptionCombo decategoryOptionCombo, OrganisationUnit source, Period period ,String value, String storedBy,Date timestamp )
     {
         this.deTarget = deTarget;
         this.dataelement = dataelement;
@@ -185,12 +185,12 @@
         this.decategoryOptionCombo = decategoryOptionCombo;
     }
 
-    public Source getSource()
+    public OrganisationUnit getSource()
     {
         return source;
     }
 
-    public void setSource( Source source )
+    public void setSource( OrganisationUnit source )
     {
         this.source = source;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueService.java	2011-01-15 09:31:34 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueService.java	2011-04-27 17:15:13 +0000
@@ -31,11 +31,8 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.detarget.DeTarget;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
-
-
-
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -82,7 +79,7 @@
      * @param source the Source for which the DeTargetDataValue should be deleted.
      * @return the number of deleted DeTargetDataValue.
      */
-    int deleteDeTargetDataValuesBySource( Source source );
+    int deleteDeTargetDataValuesBySource( OrganisationUnit source );
     
     /**
      * Deletes all DeTargetDataValue registered for the given DeTarget.
@@ -100,7 +97,7 @@
      */
     int deleteDeTargetDataValuesByDataElementAndCategoryOptionCombo( DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
     
-    int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, Source source );
+    int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement, DataElementCategoryOptionCombo deoptioncombo, OrganisationUnit source );
     
     /**
      * Returns a DeTargetDataValue.
@@ -124,7 +121,7 @@
      * @return the DeTargetDataValue which corresponds to the given parameters, or null
      *         if no match.
      */
-    DeTargetDataValue getDeTargetDataValue( Source source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
+    DeTargetDataValue getDeTargetDataValue( OrganisationUnit source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
     
     // -------------------------------------------------------------------------
     // Collections of DataValues
@@ -144,7 +141,7 @@
      * @return a collection of all DeTargetDataValue which match the given Source 
      *         or an empty collection if no values match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source );
     
     /**
      * Returns all DeTargetDataValue for a given Source and DeTarget.
@@ -154,7 +151,7 @@
      * @return a collection of all DeTargetDataValue which match the given Source and
      *         DeTarget, or an empty collection if no values match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget );
     
     /**
      * Returns all SurveyDataValues for a given collection of Sources and a
@@ -166,7 +163,7 @@
      *         Sources and the Survey, or an empty collection if no values
      *         match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<Source> sources, DeTarget deTarget );
+    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<OrganisationUnit> sources, DeTarget deTarget );
     
     /**
      * Returns all DeTargetDataValue for a given Source, and collection of
@@ -179,7 +176,7 @@
      *         and any of the DeTarget, or an empty collection if no
      *         values match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source, Collection<DeTarget> deTargets );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, Collection<DeTarget> deTargets );
     
     /**
      * Returns all DataValues for a given DataElement, Period, and collection of 
@@ -191,7 +188,7 @@
      * @return a collection of all DeTargetDataValue which match the given DeTarget,
      *         and Sources.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<? extends Source> sources );
+    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<OrganisationUnit> sources );
     
     /**
      * Returns all DataValues for a given collection of DataElements, collection of Periods, and
@@ -204,7 +201,7 @@
      * @return a collection of all DeTargetDataValue which match the given collection of DeTarget,
      *         and Sources, limited by the firstResult and maxResults property.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<? extends Source> sources, int firstResult, int maxResults );
+    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<OrganisationUnit> sources, int firstResult, int maxResults );
     
     /**
      * Returns all DeTargetDataValue for a given collection of DeTarget.
@@ -224,7 +221,7 @@
      * @param deTarget the DeTarget of the DeTargetDataValue.
      * @return a collection of all DeTargetDataValue which mach the given collection of DeTarget.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget , Source source, Period period);
+    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, OrganisationUnit source, Period period);
     
     
     /**
@@ -235,8 +232,8 @@
      * * @param deoptioncombo
      * @return
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
     
-    Double getAggregatedDeTargetDataValue( Source source, DeTarget deTarget,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
+    Double getAggregatedDeTargetDataValue( OrganisationUnit source, DeTarget deTarget,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
     
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueStore.java	2011-01-15 09:31:34 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/detargetdatavalue/DeTargetDataValueStore.java	2011-04-27 17:15:13 +0000
@@ -31,8 +31,8 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.detarget.DeTarget;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -79,7 +79,7 @@
      * @param source the Source for which the DeTargetDataValue should be deleted.
      * @return the number of deleted DeTargetDataValue.
      */
-    int deleteDeTargetDataValuesBySource( Source source );
+    int deleteDeTargetDataValuesBySource( OrganisationUnit source );
     
     /**
      * Deletes all DeTargetDataValue registered for the given DeTarget.
@@ -96,7 +96,7 @@
      * @return the number of deleted DeTargetDataValue.
      */
     int deleteDeTargetDataValuesByDataElementAndCategoryOptionCombo( DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
-    int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, Source source );
+    int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, OrganisationUnit source );
     
     /**
      * Returns a DeTargetDataValue.
@@ -120,7 +120,7 @@
      * @return the DeTargetDataValue which corresponds to the given parameters, or null
      *         if no match.
      */
-    DeTargetDataValue getDeTargetDataValue( Source source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
+    DeTargetDataValue getDeTargetDataValue( OrganisationUnit source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
     
     
     // -------------------------------------------------------------------------
@@ -141,7 +141,7 @@
      * @return a collection of all DeTargetDataValue which match the given Source 
      *         or an empty collection if no values match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source );
     
     /**
      * Returns all DeTargetDataValue for a given Source and DeTarget.
@@ -151,7 +151,7 @@
      * @return a collection of all DeTargetDataValue which match the given Source and
      *         DeTarget, or an empty collection if no values match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget );
     
     /**
      * Returns all DeTargetDataValue for a given collection of Sources and a
@@ -163,7 +163,7 @@
      *         Sources and the Survey, or an empty collection if no values
      *         match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<Source> sources, DeTarget deTarget );
+    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<OrganisationUnit> sources, DeTarget deTarget );
     
     /**
      * Returns all DeTargetDataValue for a given Source, and collection of
@@ -176,7 +176,7 @@
      *         and any of the DeTarget, or an empty collection if no
      *         values match.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source, Collection<DeTarget> deTargets );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, Collection<DeTarget> deTargets );
     
     /**
      * Returns all DataValues for a given DataElement, Period, and collection of 
@@ -188,7 +188,7 @@
      * @return a collection of all DeTargetDataValue which match the given DeTarget,
      *         and Sources.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<? extends Source> sources );
+    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<OrganisationUnit> sources );
     
     /**
      * Returns all DataValues for a given collection of DataElements, collection of Periods, and
@@ -201,7 +201,7 @@
      * @return a collection of all DeTargetDataValue which match the given collection of DeTarget,
      *         and Sources, limited by the firstResult and maxResults property.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<? extends Source> sources, int firstResult, int maxResults );    
+    Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<OrganisationUnit> sources, int firstResult, int maxResults );    
     //Collection<DeTargetDataValue> getDeTargetMemberDataValues( DeTargetMember deTargetMember ,DataElement dataelement ,DataElementCategoryOptionCombo decategoryOptionCombo );
     Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget ,DataElement dataelement ,DataElementCategoryOptionCombo decategoryOptionCombo );
     
@@ -219,7 +219,7 @@
      * @param deTarget the DeTarget of the DeTargetDataValue.
      * @return a collection of all DeTargetDataValue which mach the given collection of DeTarget.
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget , Source source, Period period );
+    Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, OrganisationUnit source, Period period );
     
     
     
@@ -231,6 +231,6 @@
      * * @param deoptioncombo
      * @return
      */
-    Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
+    Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo );
 
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListDataValue.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListDataValue.java	2011-04-27 17:15:13 +0000
@@ -31,8 +31,8 @@
 import java.util.Date;
 import java.util.Map;
 
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 @SuppressWarnings("serial")
 public class LineListDataValue
@@ -55,7 +55,7 @@
     /**
      * The organisation unit the values are saved for the specific LineListing Group
      */
-    private Source source;
+    private OrganisationUnit source;
 
     private String storedBy;
 
@@ -72,14 +72,14 @@
         // TODO Auto-generated constructor stub
     }
 
-    public LineListDataValue (Period period, Source source,Map<String, String>  lineListValues)
+    public LineListDataValue (Period period, OrganisationUnit source,Map<String, String>  lineListValues)
     {
         this.period = period;
         this.source = source;
         this.lineListValues =lineListValues;
     }
 
-    public LineListDataValue (Period period, Source source,Map<String, String>  lineListValues, String storedBy)
+    public LineListDataValue (Period period, OrganisationUnit source,Map<String, String>  lineListValues, String storedBy)
     {
         this.period = period;
         this.source = source;
@@ -111,12 +111,12 @@
         this.period = period;
     }
 
-    public Source getSource()
+    public OrganisationUnit getSource()
     {
         return source;
     }
 
-    public void setSource( Source source )
+    public void setSource( OrganisationUnit source )
     {
         this.source = source;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListGroup.java	2011-04-27 17:15:13 +0000
@@ -32,9 +32,9 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 public class LineListGroup
 {
@@ -74,7 +74,7 @@
     /**
      * All Sources that register data with this LineList Group.
      */
-    private Set<Source> sources = new HashSet<Source>();
+    private Set<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
     
     /**
     * Property indicating whether the LineList is locked for data entry.
@@ -89,7 +89,7 @@
     /**
      * All locked Sources within the LineList Group.
      */    
-    private Set<Source> lockedSources = new HashSet<Source>();
+    private Set<OrganisationUnit> lockedSources = new HashSet<OrganisationUnit>();
     
     /**
      * Indicating position in the custom sort order.
@@ -234,12 +234,12 @@
         this.lineListElements = lineListElements;
     }
 
-    public Set<Source> getSources()
+    public Set<OrganisationUnit> getSources()
     {
         return sources;
     }
 
-    public void setSources( Set<Source> sources )
+    public void setSources( Set<OrganisationUnit> sources )
     {
         this.sources = sources;
     }
@@ -254,12 +254,12 @@
         this.lineListLockedPeriods = lockedPeriods;
     }
 
-    public Set<Source> getLockedSources()
+    public Set<OrganisationUnit> getLockedSources()
     {
         return lockedSources;
     }
 
-    public void setLockedSources( Set<Source> lockedSources )
+    public void setLockedSources( Set<OrganisationUnit> lockedSources )
     {
         this.lockedSources = lockedSources;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListService.java	2011-04-15 11:13:19 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListService.java	2011-04-27 17:15:13 +0000
@@ -32,7 +32,7 @@
 
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 public interface LineListService
 {
@@ -92,7 +92,7 @@
     /**
      * Returns all Line List Groups associated with the specified source.
      */
-    Collection<LineListGroup> getLineListGroupsBySource(Source source);
+    Collection<LineListGroup> getLineListGroupsBySource(OrganisationUnit source);
     
     /**
      * Returns all Line List Groups associated with the specified Element
@@ -102,13 +102,13 @@
     /**
      * Returns all Line List Groups associated with the specified sources.
      */
-    Collection<LineListGroup> getLineListGroupsBySources( Collection<? extends Source> sources );
+    Collection<LineListGroup> getLineListGroupsBySources( Collection<OrganisationUnit> sources );
     
     /**
      * Returns the number of Sources among the specified Sources associated with
      * the specified Line List Group.
      */
-    int getSourcesAssociatedWithLineListGroup( LineListGroup lineListGroup, Collection<? extends Source> sources );
+    int getSourcesAssociatedWithLineListGroup( LineListGroup lineListGroup, Collection<OrganisationUnit> sources );
 
     /**
      * Get all LineListGroups.

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListStore.java	2011-04-15 11:13:19 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/LineListStore.java	2011-04-27 17:15:13 +0000
@@ -32,7 +32,7 @@
 
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 public interface LineListStore
 {
@@ -91,7 +91,7 @@
     /**
      * Returns all Line List Groups associated with the specified source.
      */
-    Collection<LineListGroup> getLineListGroupsBySource( Source source );
+    Collection<LineListGroup> getLineListGroupsBySource( OrganisationUnit source );
 
     /**
      * Returns all Line List Groups associated with the specified Element

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java	2011-04-19 07:43:37 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportService.java	2011-04-27 17:15:13 +0000
@@ -37,7 +37,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 public interface ReportService
 {
@@ -57,7 +56,7 @@
 
     Report_in getReportByName( String name );
 
-    Collection<Report_in> getReportBySource( Source source );
+    Collection<Report_in> getReportBySource( OrganisationUnit source );
 
     Collection<Report_in> getAllReports();
 
@@ -67,7 +66,7 @@
 
     Collection<Report_in> getReportsByPeriodAndReportType( PeriodType periodType, String reportType );
 
-    Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, Source source, String reportType );
+    Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source, String reportType );
 
     // -------------------------------------------------------------------------
     // Report_in Design

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java	2010-08-19 10:40:50 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportStore.java	2011-04-27 17:15:13 +0000
@@ -29,8 +29,8 @@
 
 import java.util.Collection;
 
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 public interface ReportStore 
 {
@@ -50,7 +50,7 @@
         
         Report_in getReportByName( String name );
         
-        Collection<Report_in> getReportBySource( Source source );
+        Collection<Report_in> getReportBySource( OrganisationUnit source );
         
         Collection<Report_in> getAllReports();
         
@@ -60,5 +60,5 @@
         
         Collection<Report_in> getReportsByPeriodAndReportType( PeriodType periodType, String reportType );
 
-        Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, Source source, String reportType );
+        Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source, String reportType );
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_in.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_in.java	2011-04-19 07:43:37 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/Report_in.java	2011-04-27 17:15:13 +0000
@@ -31,9 +31,9 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 @SuppressWarnings("serial")
 public class Report_in
@@ -74,7 +74,7 @@
     /**
      * All Sources that are generating this Report_in.
      */
-    private Set<Source> sources = new HashSet<Source>();
+    private Set<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
 
     // -------------------------------------------------------------------------
     // Contructors
@@ -240,12 +240,12 @@
         this.reportType = reportType;
     }
 
-    public Set<Source> getSources()
+    public Set<OrganisationUnit> getSources()
     {
         return sources;
     }
 
-    public void setSources( Set<Source> sources )
+    public void setSources( Set<OrganisationUnit> sources )
     {
         this.sources = sources;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/Survey.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/Survey.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/Survey.java	2011-04-27 17:15:13 +0000
@@ -32,10 +32,8 @@
 import java.util.HashSet;
 import java.util.Set;
 
-
 import org.hisp.dhis.indicator.Indicator;
-
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Brajesh Murari
@@ -68,7 +66,7 @@
     /**
      * All Sources that register data with this Survey.
      */
-    private Set<Source> sources = new HashSet<Source>();
+    private Set<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
     
     /**
      * Description of this Survey.
@@ -197,12 +195,12 @@
         this.indicators = indicators;
     }
 
-    public Set<Source> getSources()
+    public Set<OrganisationUnit> getSources()
     {
         return sources;
     }
 
-    public void setSources( Set<Source> sources )
+    public void setSources( Set<OrganisationUnit> sources )
     {
         this.sources = sources;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyService.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyService.java	2011-04-27 17:15:13 +0000
@@ -31,7 +31,7 @@
 import java.util.List;
 
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Brajesh Murari
@@ -94,7 +94,7 @@
     /**
      * Returns all Survey associated with the specified source.
      */
-    Collection<Survey> getSurveysBySource( Source source );
+    Collection<Survey> getSurveysBySource( OrganisationUnit source );
 
     /**
      * Returns all Survey associated with the specified indicator.
@@ -104,13 +104,13 @@
     /**
      * Returns all Survey associated with the specified sources.
      */
-    Collection<Survey> getSurveysBySources( Collection<? extends Source> sources );
+    Collection<Survey> getSurveysBySources( Collection<OrganisationUnit> sources );
 
     /**
      * Returns the number of Sources among the specified Sources associated with
      * the specified Survey.
      */
-    int getSourcesAssociatedWithSurvey( Survey survey, Collection<? extends Source> sources );
+    int getSourcesAssociatedWithSurvey( Survey survey, Collection<OrganisationUnit> sources );
 
     /**
      * Get all Surveys.

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyStore.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/survey/SurveyStore.java	2011-04-27 17:15:13 +0000
@@ -30,7 +30,7 @@
 import java.util.Collection;
 
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Brajesh Murari
@@ -94,7 +94,7 @@
     /**
      * Returns all Survey associated with the specified source.
      */
-    Collection<Survey> getSurveysBySource( Source source );
+    Collection<Survey> getSurveysBySource( OrganisationUnit source );
     
     /**
      * Returns all Survey associated with the specified indicator.

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java	2011-04-27 17:15:13 +0000
@@ -31,15 +31,13 @@
 import java.util.Date;
 
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.survey.Survey;
 
 /**
  * @author Brajesh Murari
  * @version $Id$
  */
-
-@SuppressWarnings("serial")
 public class SurveyDataValue implements Serializable
 {
     /**
@@ -55,7 +53,7 @@
     /**
      * Part of the SurveyDataValue's composite ID
      */
-    private Source source;
+    private OrganisationUnit source;
 
     /**
      * 
@@ -81,7 +79,7 @@
     {
     }
 
-    public SurveyDataValue( Survey survey, Indicator indicator, Source source, String value )
+    public SurveyDataValue( Survey survey, Indicator indicator, OrganisationUnit source, String value )
     {
         this.survey = survey;
         this.indicator = indicator;
@@ -89,7 +87,7 @@
         this.value = value;
     }
 
-    public SurveyDataValue( Survey survey, Indicator indicator, Source source, String value, String storedBy,
+    public SurveyDataValue( Survey survey, Indicator indicator, OrganisationUnit source, String value, String storedBy,
         Date timestamp )
     {
         this.survey = survey;
@@ -153,12 +151,12 @@
         this.survey = survey;
     }
 
-    public Source getSource()
+    public OrganisationUnit getSource()
     {
         return source;
     }
 
-    public void setSource( Source source )
+    public void setSource( OrganisationUnit source )
     {
         this.source = source;
     }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueService.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueService.java	2011-04-27 17:15:13 +0000
@@ -30,7 +30,7 @@
 import java.util.Collection;
 
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.survey.Survey;
 
 /**
@@ -77,7 +77,7 @@
      * @param source the Source for which the SurveyDataValue should be deleted.
      * @return the number of deleted SurveyDataValue.
      */
-    int deleteSurveyDataValuesBySource( Source source );
+    int deleteSurveyDataValuesBySource( OrganisationUnit source );
     
     /**
      * Deletes all SurveyDataValues registered for the given Survey.
@@ -95,7 +95,7 @@
      */
     int deleteSurveyDataValuesBySurvey( Survey survey );
     
-    int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, Source source );
+    int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, OrganisationUnit source );
 
     /**
      * Returns a SurveyDataValue.
@@ -105,7 +105,7 @@
      * @return the SurveyDataValue which corresponds to the given parameters, or null
      *         if no match.
      */
-    SurveyDataValue getSurveyDataValue( Source source, Survey survey );
+    SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey );
 
     // -------------------------------------------------------------------------
     // Collections of DataValues
@@ -125,7 +125,7 @@
      * @return a collection of all SurveyDataValues which match the given Source 
      *         or an empty collection if no values match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Source source );
+    Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source );
 
     /**
      * Returns all SurveyDataValues for a given Source and Survey.
@@ -135,7 +135,7 @@
      * @return a collection of all SurveyDataValues which match the given Source and
      *         Survey, or an empty collection if no values match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Source source, Survey survey );
+    Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Survey survey );
 
     /**
      * Returns all SurveyDataValues for a given collection of Sources and a
@@ -147,7 +147,7 @@
      *         Sources and the Survey, or an empty collection if no values
      *         match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Collection<Source> sources, Survey survey );
+    Collection<SurveyDataValue> getSurveyDataValues( Collection<OrganisationUnit> sources, Survey survey );
 
     /**
      * Returns all SurveyDataValues for a given Source, and collection of
@@ -160,7 +160,7 @@
      *         and any of the Surveys, or an empty collection if no
      *         values match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Source source, Collection<Survey> surveys );
+    Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Collection<Survey> surveys );
 
     /**
      * Returns all DataValues for a given DataElement, Period, and collection of 
@@ -172,7 +172,7 @@
      * @return a collection of all SurveyDataValues which match the given Survey,
      *         and Sources.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<? extends Source> sources );
+    Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<OrganisationUnit> sources );
   
     /**
      * Returns all DataValues for a given collection of DataElements, collection of Periods, and
@@ -186,7 +186,7 @@
      *         and Sources, limited by the firstResult and maxResults property.
      */
     Collection<SurveyDataValue> getSurveyDataValues( Collection<Survey> surveys,  
-        Collection<? extends Source> sources, int firstResult, int maxResults );    
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults );    
     
     /**
      * Returns all SurveyDataValues for a given collection of Surveys.
@@ -204,6 +204,6 @@
      * @param indicator
      * @return
      */
-    SurveyDataValue getSurveyDataValue( Source source, Survey survey, Indicator indicator );
+    SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey, Indicator indicator );
 
 }

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueStore.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValueStore.java	2011-04-27 17:15:13 +0000
@@ -29,7 +29,7 @@
 
 import java.util.Collection;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.survey.Survey;
 
 /**
@@ -77,7 +77,7 @@
      * @param source the Source for which the SurveyDataValue should be deleted.
      * @return the number of deleted SurveyDataValue.
      */
-    int deleteSurveyDataValuesBySource( Source source );
+    int deleteSurveyDataValuesBySource( OrganisationUnit source );
 
     /**
      * Deletes all SurveyDataValues registered for the given Survey.
@@ -87,7 +87,7 @@
      */
     int deleteSurveyDataValuesByIndicator( Indicator indicator );
     
-    int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, Source source );
+    int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, OrganisationUnit source );
 
     /**
      * Deletes all SurveyDataValues registered for the given Survey.
@@ -105,7 +105,7 @@
      * @return the SurveyDataValue which corresponds to the given parameters, or null
      *         if no match.
      */
-    SurveyDataValue getSurveyDataValue( Source source, Survey survey );
+    SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey );
 
     // -------------------------------------------------------------------------
     // Collections of DataValues
@@ -125,7 +125,7 @@
      * @return a collection of all SurveyDataValues which match the given Source 
      *         or an empty collection if no values match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Source source );
+    Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source );
 
     /**
      * Returns all SurveyDataValues for a given Source and Survey.
@@ -135,7 +135,7 @@
      * @return a collection of all SurveyDataValues which match the given Source and
      *         Survey, or an empty collection if no values match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Source source, Survey survey );
+    Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Survey survey );
 
     /**
      * Returns all SurveyDataValues for a given collection of Sources and a
@@ -147,7 +147,7 @@
      *         Sources and the Survey, or an empty collection if no values
      *         match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Collection<Source> sources, Survey survey );
+    Collection<SurveyDataValue> getSurveyDataValues( Collection<OrganisationUnit> sources, Survey survey );
 
     /**
      * Returns all SurveyDataValues for a given Source, and collection of
@@ -160,7 +160,7 @@
      *         and any of the Surveys, or an empty collection if no
      *         values match.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Source source, Collection<Survey> surveys );
+    Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Collection<Survey> surveys );
 
     /**
      * Returns all DataValues for a given DataElement, Period, and collection of 
@@ -172,7 +172,7 @@
      * @return a collection of all SurveyDataValues which match the given Survey,
      *         and Sources.
      */
-    Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<? extends Source> sources );
+    Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<OrganisationUnit> sources );
   
     /**
      * Returns all DataValues for a given collection of DataElements, collection of Periods, and
@@ -186,7 +186,7 @@
      *         and Sources, limited by the firstResult and maxResults property.
      */
     Collection<SurveyDataValue> getSurveyDataValues( Collection<Survey> surveys,  
-        Collection<? extends Source> sources, int firstResult, int maxResults );    
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults );    
     
     /**
      * Returns all SurveyDataValues for a given collection of Surveys.
@@ -204,6 +204,6 @@
      * @param indicator
      * @return
      */
-    SurveyDataValue getSurveyDataValue( Source source, Survey survey, Indicator indicator );
+    SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey, Indicator indicator );
 
 }

=== modified file 'local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java'
--- local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java	2010-11-22 11:37:31 +0000
+++ local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java	2011-04-27 17:15:13 +0000
@@ -5,8 +5,8 @@
 
 import org.hisp.dhis.linelisting.LineListDataValue;
 import org.hisp.dhis.linelisting.LineListElement;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 
 public interface DataBaseManagerInterface
@@ -25,7 +25,7 @@
     public boolean insertSingleLLValueIntoDb( LineListDataValue llDataValue, String tableName );
 
     //public List<Map<String, String>> getFromLLTable( String tableName, int source, int  period );
-    public List<LineListDataValue> getFromLLTable( String tableName, Source source, Period  period );
+    public List<LineListDataValue> getFromLLTable( String tableName, OrganisationUnit source, Period  period );
 
     public boolean removeLLRecord( int recordId , String tableName );
 
@@ -37,17 +37,17 @@
     
     public boolean updateSingleLLValue( LineListDataValue llDataValue, String tableName );
     
-    public int getLLValueCountByLLElements( String tablename, Map<String,String> llElementValueMap, Source source );
-    
-    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String,String> llElementValueMap, Source source, Period  period );
-    
-    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String,String> llElementValueMap, Source source );
-
-    public List<LineListDataValue> getLLValuesByLLElementValue( String tableName, String llElementName, String llElementValue, Source source, Period  period );
-
-    public Period getRecentPeriodForOnChangeData( String tableName, String llElementName, String llElementValue, Source source );
-    
-    public List<LineListDataValue> getLLValuesSortBy( String tableName, String sortBy, Source source, Period  period );
+    public int getLLValueCountByLLElements( String tablename, Map<String,String> llElementValueMap, OrganisationUnit source );
+    
+    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String,String> llElementValueMap, OrganisationUnit source, Period  period );
+    
+    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String,String> llElementValueMap, OrganisationUnit source );
+
+    public List<LineListDataValue> getLLValuesByLLElementValue( String tableName, String llElementName, String llElementValue, OrganisationUnit source, Period  period );
+
+    public Period getRecentPeriodForOnChangeData( String tableName, String llElementName, String llElementValue, OrganisationUnit source );
+    
+    public List<LineListDataValue> getLLValuesSortBy( String tableName, String sortBy, OrganisationUnit source, Period  period );
     
     public int rowCount( String tableName );
     

=== modified file 'local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java'
--- local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java	2010-11-22 14:00:26 +0000
+++ local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java	2011-04-27 17:15:13 +0000
@@ -21,11 +21,11 @@
 import org.hisp.dhis.linelisting.LineListDataValue;
 import org.hisp.dhis.linelisting.LineListElement;
 import org.hisp.dhis.linelisting.LineListService;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.comparator.PeriodComparator;
-import org.hisp.dhis.source.Source;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
@@ -351,7 +351,7 @@
     // -------------------------------------------------------------------------
     // Get LineListDataValues from Department table by source and period
     // -------------------------------------------------------------------------    
-    public List<LineListDataValue> getFromLLTable( String tableName, Source source, Period period )
+    public List<LineListDataValue> getFromLLTable( String tableName, OrganisationUnit source, Period period )
     {
         String columnDefinition = "";
         
@@ -421,7 +421,7 @@
     // -------------------------------------------------------------------------
     // Get LineListDataValues from Department table by source and period and linelist element
     // -------------------------------------------------------------------------    
-    public List<LineListDataValue> getLLValuesByLLElementValue( String tableName, String llElementName, String llElementValue, Source source, Period period )
+    public List<LineListDataValue> getLLValuesByLLElementValue( String tableName, String llElementName, String llElementValue, OrganisationUnit source, Period period )
     {
         String columnDefinition = "";
 
@@ -510,7 +510,7 @@
     // -------------------------------------------------------------------------
     // Get LineListDataValues from Department table filter by source and period and list of linelist elements
     // -------------------------------------------------------------------------    
-    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String, String> llElementValueMap, Source source, Period period )
+    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String, String> llElementValueMap, OrganisationUnit source, Period period )
     {
         String columnDefinition = "";
 
@@ -622,7 +622,7 @@
     // -------------------------------------------------------------------------
     // Get LineListDataValues from Department table filter by source and list of linelist elements
     // -------------------------------------------------------------------------    
-    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String, String> llElementValueMap, Source source )
+    public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String, String> llElementValueMap, OrganisationUnit source )
     {
         String columnDefinition = "";
 
@@ -733,7 +733,7 @@
     // -------------------------------------------------------------------------
     // Get LineListDataValueCount from Department table filter by source and list of linelist elements
     // -------------------------------------------------------------------------    
-    public int getLLValueCountByLLElements( String tableName, Map<String, String> llElementValueMap, Source source )
+    public int getLLValueCountByLLElements( String tableName, Map<String, String> llElementValueMap, OrganisationUnit source )
     {
         String columnDefinition = "";
         int noOfRows = 0;
@@ -786,7 +786,7 @@
     // -------------------------------------------------------------------------
     // Get LineListDataValues from Department table sort by line list element
     // -------------------------------------------------------------------------    
-    public List<LineListDataValue> getLLValuesSortBy( String tableName, String sortBy, Source source, Period period )
+    public List<LineListDataValue> getLLValuesSortBy( String tableName, String sortBy, OrganisationUnit source, Period period )
     {
         String columnDefinition = "";
 
@@ -886,7 +886,7 @@
         
         Period period = llDataValue.getPeriod();
 
-        Source source = llDataValue.getSource();
+        OrganisationUnit source = llDataValue.getSource();
 
         Map<String, String> elementValues = llDataValue.getLineListValues();
         Set<String> elements = elementValues.keySet();
@@ -972,7 +972,7 @@
 
             Period period = llDataValue.getPeriod();
 
-            Source source = llDataValue.getSource();
+            OrganisationUnit source = llDataValue.getSource();
 
             Map<String, String> elementValues = llDataValue.getLineListValues();
             Set<String> elements = elementValues.keySet();
@@ -1263,7 +1263,7 @@
     // -------------------------------------------------------------------------
     // Get Recent Period from Department table for onChange period type
     // -------------------------------------------------------------------------        
-    public Period getRecentPeriodForOnChangeData( String tableName, String llElementName, String llElementValue, Source source )
+    public Period getRecentPeriodForOnChangeData( String tableName, String llElementName, String llElementValue, OrganisationUnit source )
     {
         String columnDefinition = "";
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultEmployeeService.java'
--- local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultEmployeeService.java	2011-04-15 11:14:02 +0000
+++ local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultEmployeeService.java	2011-04-27 17:15:13 +0000
@@ -28,9 +28,6 @@
 
 import java.util.Collection;
 
-import org.hibernate.Criteria;
-import org.hibernate.Session;
-import org.hibernate.criterion.Restrictions;
 import org.springframework.transaction.annotation.Transactional;
 
 /**

=== modified file 'local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultLineListService.java'
--- local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultLineListService.java	2011-04-15 11:14:02 +0000
+++ local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/DefaultLineListService.java	2011-04-27 17:15:13 +0000
@@ -6,14 +6,10 @@
 import java.util.List;
 import java.util.Set;
 
-import org.hibernate.Criteria;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.i18n.I18nService;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.springframework.transaction.annotation.Transactional;
 
 @Transactional
@@ -101,7 +97,7 @@
         return objects;
     }
 
-    public Collection<LineListGroup> getLineListGroupsBySource(Source source)
+    public Collection<LineListGroup> getLineListGroupsBySource(OrganisationUnit source)
     {
         return lineListStore.getLineListGroupsBySource( source );
     }
@@ -111,11 +107,11 @@
         return lineListStore.getLineListGroupsByElement( lineListElement );
     }
 
-    public Collection<LineListGroup> getLineListGroupsBySources( Collection<? extends Source> sources )
+    public Collection<LineListGroup> getLineListGroupsBySources( Collection<OrganisationUnit> sources )
     {
         Set<LineListGroup> lineListGroups = new HashSet<LineListGroup>();
 
-        for (Source source : sources)
+        for (OrganisationUnit source : sources)
         {
             lineListGroups.addAll( lineListStore.getLineListGroupsBySource( source ) );
         }
@@ -123,11 +119,11 @@
         return lineListGroups;
     }
 
-    public int getSourcesAssociatedWithLineListGroup( LineListGroup lineListGroup, Collection<? extends Source> sources )
+    public int getSourcesAssociatedWithLineListGroup( LineListGroup lineListGroup, Collection<OrganisationUnit> sources )
     {
         int count = 0;
 
-        for ( Source source : sources )
+        for ( OrganisationUnit source : sources )
         {
             if ( lineListGroup.getSources().contains( source ) )
             {

=== modified file 'local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HiberateEmployeeStore.java'
--- local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HiberateEmployeeStore.java	2011-04-15 11:14:02 +0000
+++ local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HiberateEmployeeStore.java	2011-04-27 17:15:13 +0000
@@ -35,7 +35,6 @@
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.linelisting.Employee;
 import org.hisp.dhis.linelisting.EmployeeStore;
-import org.hisp.dhis.user.UserCredentials;
 
 /**
  * @author Mithilesh Kumar Thakur

=== modified file 'local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HibernateLineListStore.java'
--- local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HibernateLineListStore.java	2011-04-15 11:14:02 +0000
+++ local/in/dhis-in-services/dhis-in-service-linelisting/src/main/java/org/hisp/dhis/linelisting/hibernate/HibernateLineListStore.java	2011-04-27 17:15:13 +0000
@@ -10,15 +10,14 @@
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.linelisting.Employee;
 import org.hisp.dhis.linelisting.LineListDataElementMap;
 import org.hisp.dhis.linelisting.LineListElement;
 import org.hisp.dhis.linelisting.LineListGroup;
 import org.hisp.dhis.linelisting.LineListOption;
 import org.hisp.dhis.linelisting.LineListStore;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.PeriodStore;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 public class HibernateLineListStore
     implements LineListStore
@@ -102,7 +101,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LineListGroup> getLineListGroupsBySource( Source source )
+    public Collection<LineListGroup> getLineListGroupsBySource( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java'
--- local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java	2011-04-19 07:43:37 +0000
+++ local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java	2011-04-27 17:15:13 +0000
@@ -39,7 +39,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.survey.Survey;
 import org.hisp.dhis.survey.SurveyService;
 import org.hisp.dhis.surveydatavalue.SurveyDataValue;
@@ -202,7 +201,7 @@
     }
 
     @Transactional
-    public Collection<Report_in> getReportBySource( Source source )
+    public Collection<Report_in> getReportBySource( OrganisationUnit source )
     {
         return reportStore.getReportBySource( source );
     }
@@ -226,7 +225,7 @@
     }
 
     @Transactional
-    public Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, Source source,
+    public Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source,
         String reportType )
     {
         return reportStore.getReportsByPeriodSourceAndReportType( periodType, source, reportType );

=== modified file 'local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/Report_inDeletionHandler.java'
--- local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/Report_inDeletionHandler.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/Report_inDeletionHandler.java	2011-04-27 17:15:13 +0000
@@ -1,6 +1,6 @@
 package org.hisp.dhis.reports;
 
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.system.deletion.DeletionHandler;
 
 public class Report_inDeletionHandler
@@ -28,11 +28,11 @@
     }
 
     @Override
-    public void deleteSource( Source source )
+    public void deleteOrganisationUnit( OrganisationUnit unit )
     {
         for ( Report_in report : reportService.getAllReports() )
         {
-            if ( report.getSources().remove( source ) )
+            if ( report.getSources().remove( unit ) )
             {
                 reportService.updateReport( report );
             }

=== modified file 'local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/hibernate/HibernateReportStore.java'
--- local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/hibernate/HibernateReportStore.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/hibernate/HibernateReportStore.java	2011-04-27 17:15:13 +0000
@@ -6,11 +6,11 @@
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Restrictions;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.PeriodStore;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reports.ReportStore;
 import org.hisp.dhis.reports.Report_in;
-import org.hisp.dhis.source.Source;
 
 public class HibernateReportStore
     implements ReportStore
@@ -94,7 +94,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<Report_in> getReportBySource( Source source )
+    public Collection<Report_in> getReportBySource( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -148,7 +148,7 @@
     }
     
     @SuppressWarnings( "unchecked" )
-    public Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, Source source, String reportType )
+    public Collection<Report_in> getReportsByPeriodSourceAndReportType( PeriodType periodType, OrganisationUnit source, String reportType )
     {
         Session session = sessionFactory.getCurrentSession();
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java	2011-01-17 07:45:29 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java	2011-04-27 17:15:13 +0000
@@ -32,7 +32,7 @@
 
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -89,7 +89,7 @@
         return deTargetStore.getDeTargetByShortName( shortName );
     }
     
-    public Collection<DeTarget> getDeTargetBySource( Source source )
+    public Collection<DeTarget> getDeTargetBySource( OrganisationUnit source )
     {
         return deTargetStore.getDeTargetsBySource( source );
     }

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java	2011-01-17 07:45:29 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java	2011-04-27 17:15:13 +0000
@@ -41,7 +41,7 @@
 import org.hisp.dhis.detarget.DeTargetStore;
 import org.hisp.dhis.detargetdatavalue.DeTargetDataValue;
 import org.hisp.dhis.detargetdatavalue.DeTargetDataValueService;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Mithilesh Kumar Thakur
@@ -134,7 +134,7 @@
     
    @SuppressWarnings( "unchecked" )
    
-   public Collection<DeTarget> getDeTargetsBySource( Source source )
+   public Collection<DeTarget> getDeTargetsBySource( OrganisationUnit source )
    {
        Session session = sessionFactory.getCurrentSession();
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/DefaultDeTargetDataValueService.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/DefaultDeTargetDataValueService.java	2011-01-15 09:32:11 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/DefaultDeTargetDataValueService.java	2011-04-27 17:15:13 +0000
@@ -36,7 +36,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -88,7 +87,7 @@
         deTargetDataValueStore.deleteDeTargetDataValue( deTargetDataValue );
     }
         
-    public  int deleteDeTargetDataValuesBySource( Source source )
+    public  int deleteDeTargetDataValuesBySource( OrganisationUnit source )
     {
         return deTargetDataValueStore.deleteDeTargetDataValuesBySource( source );
     }
@@ -103,7 +102,7 @@
         return deTargetDataValueStore.deleteDeTargetDataValuesByDataElementAndCategoryOptionCombo( dataelement, deoptioncombo );
     }
     
-    public int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, Source source )
+    public int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, OrganisationUnit source )
     {
         return deTargetDataValueStore.deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( deTarget, dataelement, deoptioncombo, source );
     }
@@ -118,32 +117,32 @@
         return deTargetDataValueStore.getAllDeTargetDataValues();
     }
     
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Source source )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source )
     {
         return deTargetDataValueStore.getDeTargetDataValues( source );
     }
    
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget )
     {
         return deTargetDataValueStore.getDeTargetDataValues( source, deTarget );
     }
     
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Collection<Source> sources, DeTarget deTarget )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( Collection<OrganisationUnit> sources, DeTarget deTarget )
     {
         return deTargetDataValueStore.getDeTargetDataValues( sources, deTarget );
     }
     
-   public Collection<DeTargetDataValue> getDeTargetDataValues( Source source, Collection<DeTarget> deTargets )
+   public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, Collection<DeTarget> deTargets )
    {
        return deTargetDataValueStore.getDeTargetDataValues( source, deTargets );
    }
    
-   public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<? extends Source> sources )
+   public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<OrganisationUnit> sources )
    {
        return deTargetDataValueStore.getDeTargetDataValues( deTarget, sources );
    }
     
-   public Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<? extends Source> sources, int firstResult, int maxResults )
+   public Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<OrganisationUnit> sources, int firstResult, int maxResults )
    {
        return deTargetDataValueStore.getDeTargetDataValues( deTargets, sources, firstResult, maxResults );
    }
@@ -153,12 +152,12 @@
        return deTargetDataValueStore.getDeTargetDataValues( deTarget );
    }
    
-   public Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+   public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
    {
        return deTargetDataValueStore.getDeTargetDataValues( source, deTarget, dataelement, deoptioncombo );
    }
 
-   public DeTargetDataValue getDeTargetDataValue( Source source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+   public DeTargetDataValue getDeTargetDataValue( OrganisationUnit source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
    {
        return deTargetDataValueStore.getDeTargetDataValue( source, deTarget, period, dataelement, deoptioncombo );
    }
@@ -176,12 +175,12 @@
    }
    
 
-   public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget , Source source, Period period)
+   public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, OrganisationUnit source, Period period)
    {
         return deTargetDataValueStore.getDeTargetDataValues( deTarget ,source , period );
    }
    
-   public Double getAggregatedDeTargetDataValue( Source source, DeTarget deTarget,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+   public Double getAggregatedDeTargetDataValue( OrganisationUnit source, DeTarget deTarget,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
    {
        List<OrganisationUnit> childOrgUnitList = new ArrayList<OrganisationUnit>();
        childOrgUnitList = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( source.getId() ) );

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/hibernate/HibernateDeTargetDataValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/hibernate/HibernateDeTargetDataValueStore.java	2011-01-15 12:30:16 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detargetdatavalue/hibernate/HibernateDeTargetDataValueStore.java	2011-04-27 17:15:13 +0000
@@ -40,8 +40,8 @@
 import org.hisp.dhis.detarget.DeTarget;
 import org.hisp.dhis.detargetdatavalue.DeTargetDataValue;
 import org.hisp.dhis.detargetdatavalue.DeTargetDataValueStore;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 
 /**
@@ -87,7 +87,7 @@
         session.delete( deTargetDataValue );
     }
     
-    public int deleteDeTargetDataValuesBySource( Source source )
+    public int deleteDeTargetDataValuesBySource( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -118,7 +118,7 @@
         return query.executeUpdate();
     }
     
-    public int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, Source source )
+    public int deleteDeTargetDataValuesByDeTargetDataElementCategoryOptionComboAndSource( DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo, OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -152,7 +152,7 @@
         return criteria.list();
     }
     @SuppressWarnings( "unchecked" )
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Source source )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -162,7 +162,7 @@
         return criteria.list();
     }
     @SuppressWarnings( "unchecked" )
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -173,7 +173,7 @@
         return criteria.list();
     }
     @SuppressWarnings( "unchecked" )
-    public  Collection<DeTargetDataValue> getDeTargetDataValues( Collection<Source> sources, DeTarget deTarget )
+    public  Collection<DeTargetDataValue> getDeTargetDataValues( Collection<OrganisationUnit> sources, DeTarget deTarget )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -184,7 +184,7 @@
         return criteria.list();
     }
     @SuppressWarnings( "unchecked" )
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Source source, Collection<DeTarget> deTargets )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, Collection<DeTarget> deTargets )
     {
        Session session = sessionFactory.getCurrentSession();
 
@@ -195,7 +195,7 @@
        return criteria.list();
     }
     @SuppressWarnings( "unchecked" )
-    public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<? extends Source> sources )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, Collection<OrganisationUnit> sources )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -206,7 +206,7 @@
         return criteria.list();
     }
     @SuppressWarnings( "unchecked" )
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<? extends Source> sources, int firstResult, int maxResults )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( Collection<DeTarget> deTargets,  Collection<OrganisationUnit> sources, int firstResult, int maxResults )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -240,7 +240,7 @@
     }
 */    
     @SuppressWarnings( "unchecked" )
-     public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget , Source source, Period period )
+     public Collection<DeTargetDataValue> getDeTargetDataValues( DeTarget deTarget, OrganisationUnit source, Period period )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -279,7 +279,7 @@
     }
    
     @SuppressWarnings( "unchecked" )
-    public Collection<DeTargetDataValue> getDeTargetDataValues( Source source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+    public Collection<DeTargetDataValue> getDeTargetDataValues( OrganisationUnit source, DeTarget deTarget, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -292,7 +292,7 @@
         return  criteria.list();
     }
     
-    public DeTargetDataValue getDeTargetDataValue( Source source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+    public DeTargetDataValue getDeTargetDataValue( OrganisationUnit source, DeTarget deTarget ,Period period, DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
     {
         Session session = sessionFactory.getCurrentSession();
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/DefaultSurveyService.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/DefaultSurveyService.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/DefaultSurveyService.java	2011-04-27 17:15:13 +0000
@@ -34,7 +34,7 @@
 import java.util.Set;
 
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -102,11 +102,11 @@
         return indicators;
     }
 
-    public int getSourcesAssociatedWithSurvey( Survey survey, Collection<? extends Source> sources )
+    public int getSourcesAssociatedWithSurvey( Survey survey, Collection<OrganisationUnit> sources )
     {
         int count = 0;
 
-        for ( Source source : sources )
+        for ( OrganisationUnit source : sources )
         {
             if ( survey.getSources().contains( source ) )
             {
@@ -149,7 +149,7 @@
         return objects;
     }
 
-    public Collection<Survey> getSurveysBySource( Source source )
+    public Collection<Survey> getSurveysBySource( OrganisationUnit source )
     {
         return surveyStore.getSurveysBySource( source );
     }
@@ -159,11 +159,11 @@
         return surveyStore.getSurveysByIndicator( indicator );
     }
 
-    public Collection<Survey> getSurveysBySources( Collection<? extends Source> sources )
+    public Collection<Survey> getSurveysBySources( Collection<OrganisationUnit> sources )
     {
         Set<Survey> surveys = new HashSet<Survey>();
 
-        for ( Source source : sources )
+        for ( OrganisationUnit source : sources )
         {
             surveys.addAll( surveyStore.getSurveysBySource( source ) );
         }

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/hibernate/HibernateSurveyStore.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/hibernate/HibernateSurveyStore.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/survey/hibernate/HibernateSurveyStore.java	2011-04-27 17:15:13 +0000
@@ -36,7 +36,7 @@
 import org.hibernate.SessionFactory;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.survey.Survey;
 import org.hisp.dhis.survey.SurveyStore;
 import org.hisp.dhis.surveydatavalue.SurveyDataValue;
@@ -133,7 +133,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<Survey> getSurveysBySource( Source source )
+    public Collection<Survey> getSurveysBySource( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/DefaultSurveyDataValueService.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/DefaultSurveyDataValueService.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/DefaultSurveyDataValueService.java	2011-04-27 17:15:13 +0000
@@ -30,7 +30,7 @@
 import java.util.Collection;
 
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.survey.Survey;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -71,7 +71,7 @@
         surveyDataValueStore.deleteSurveyDataValue( surveyDataValue );
     }
 
-    public int deleteSurveyDataValuesBySource( Source source )
+    public int deleteSurveyDataValuesBySource( OrganisationUnit source )
     {
         return surveyDataValueStore.deleteSurveyDataValuesBySource( source );
     }
@@ -86,7 +86,7 @@
         return surveyDataValueStore.deleteSurveyDataValuesByIndicator( indicator );
     }
     
-    public int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, Source source )
+    public int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, OrganisationUnit source )
     {
     	return surveyDataValueStore.deleteSurveyDataValuesBySurveyIndicatorAndSource(survey, indicator, source);
     }
@@ -96,38 +96,38 @@
         return surveyDataValueStore.getAllSurveyDataValues();
     }
 
-    public Collection<SurveyDataValue> getSurveyDataValues( Source source )
+    public Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source )
     {
         return surveyDataValueStore.getSurveyDataValues( source );
     }
 
-    public Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<? extends Source> sources )
+    public Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<OrganisationUnit> sources )
     {
         return surveyDataValueStore.getSurveyDataValues( survey, sources );
     }
 
-    public SurveyDataValue getSurveyDataValue( Source source, Survey survey )
+    public SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey )
     {
         return surveyDataValueStore.getSurveyDataValue( source, survey );
     }
 
-    public Collection<SurveyDataValue> getSurveyDataValues( Source source, Survey survey )
+    public Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Survey survey )
     {
         return surveyDataValueStore.getSurveyDataValues( source, survey );
     }
 
-    public Collection<SurveyDataValue> getSurveyDataValues( Collection<Source> sources, Survey survey )
+    public Collection<SurveyDataValue> getSurveyDataValues( Collection<OrganisationUnit> sources, Survey survey )
     {
         return surveyDataValueStore.getSurveyDataValues( sources, survey );
     }
 
-    public Collection<SurveyDataValue> getSurveyDataValues( Source source, Collection<Survey> surveys )
+    public Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Collection<Survey> surveys )
     {
         return surveyDataValueStore.getSurveyDataValues( source, surveys );
     }
 
     public Collection<SurveyDataValue> getSurveyDataValues( Collection<Survey> surveys,
-        Collection<? extends Source> sources, int firstResult, int maxResults )
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults )
     {
         return surveyDataValueStore.getSurveyDataValues( surveys, sources, firstResult, maxResults );
     }
@@ -142,7 +142,7 @@
         surveyDataValueStore.updateSurveyDataValue( dataValue );
     }
 
-    public SurveyDataValue getSurveyDataValue( Source source, Survey survey, Indicator indicator )
+    public SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey, Indicator indicator )
     {
         return surveyDataValueStore.getSurveyDataValue( source, survey, indicator );
     }

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/hibernate/HibernateSurveyDataValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/hibernate/HibernateSurveyDataValueStore.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/surveydatavalue/hibernate/HibernateSurveyDataValueStore.java	2011-04-27 17:15:13 +0000
@@ -36,7 +36,7 @@
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.datavalue.DataValue;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.source.Source;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.survey.Survey;
 import org.hisp.dhis.surveydatavalue.SurveyDataValue;
 import org.hisp.dhis.surveydatavalue.SurveyDataValueStore;
@@ -78,7 +78,7 @@
         session.delete( surveyDataValue );
     }
 
-    public int deleteSurveyDataValuesBySource( Source source )
+    public int deleteSurveyDataValuesBySource( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -108,7 +108,7 @@
         return query.executeUpdate();
     }
 
-    public int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, Source source )
+    public int deleteSurveyDataValuesBySurveyIndicatorAndSource( Survey survey, Indicator indicator, OrganisationUnit source )
     {
     	Session session = sessionFactory.getCurrentSession();
 
@@ -131,7 +131,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<SurveyDataValue> getSurveyDataValues( Source source )
+    public Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -142,7 +142,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<? extends Source> sources )
+    public Collection<SurveyDataValue> getSurveyDataValues( Survey survey, Collection<OrganisationUnit> sources )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -153,7 +153,7 @@
         return criteria.list();
     }
 
-    public SurveyDataValue getSurveyDataValue( Source source, Survey survey )
+    public SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -165,7 +165,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<SurveyDataValue> getSurveyDataValues( Source source, Survey survey )
+    public Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Survey survey )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -177,7 +177,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<SurveyDataValue> getSurveyDataValues( Collection<Source> sources, Survey survey )
+    public Collection<SurveyDataValue> getSurveyDataValues( Collection<OrganisationUnit> sources, Survey survey )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -189,7 +189,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<SurveyDataValue> getSurveyDataValues( Source source, Collection<Survey> surveys )
+    public Collection<SurveyDataValue> getSurveyDataValues( OrganisationUnit source, Collection<Survey> surveys )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -202,7 +202,7 @@
 
     @SuppressWarnings( "unchecked" )
     public Collection<SurveyDataValue> getSurveyDataValues( Collection<Survey> surveys,
-        Collection<? extends Source> sources, int firstResult, int maxResults )
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults )
     {
 
         Session session = sessionFactory.getCurrentSession();
@@ -241,7 +241,7 @@
         session.update( dataValue );
     }
 
-    public SurveyDataValue getSurveyDataValue( Source source, Survey survey, Indicator indicator )
+    public SurveyDataValue getSurveyDataValue( OrganisationUnit source, Survey survey, Indicator indicator )
     {
         Session session = sessionFactory.getCurrentSession();
 

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/target/DefaultDeTargetMappingService.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/target/DefaultDeTargetMappingService.java	2010-06-16 11:17:12 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/target/DefaultDeTargetMappingService.java	2011-04-27 17:15:13 +0000
@@ -7,12 +7,10 @@
 @Transactional
 public class DefaultDeTargetMappingService implements DeTargetMappingService
 {
-	// -------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unused")
-    
     private DeTargetMappingStore deTargetMappingStore;
 
     public void setDeTargetMappingStore( DeTargetMappingStore deTargetMappingStore )

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateCommentsResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateCommentsResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateCommentsResultAction.java	2011-04-27 17:15:13 +0000
@@ -27,7 +27,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 import com.opensymphony.xwork2.Action;
 
@@ -369,7 +368,7 @@
         //dataTableName = dashBoardService.createDataTableForComments(orgUnitInfo, deInfo, periodInfo);
         
         dataSetPeriods = new HashMap<DataSet, Collection<Period>>();
-        Iterator dataSetIterator = selectedDataSets.iterator();
+        Iterator<String> dataSetIterator = selectedDataSets.iterator();
         
         DataSet ds;
         Collection<DataElement> dataElements = new ArrayList<DataElement>();
@@ -389,15 +388,15 @@
                 endPeriod.getEndDate() );
             dataSetPeriods.put( ds, periodList );
 
-            Iterator orgUnitListIterator = orgUnitList.iterator();
+            Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
             OrganisationUnit o;
-            Set<Source> dso = new HashSet<Source>();
+            Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
             Iterator periodIterator;
             
             while ( orgUnitListIterator.hasNext() )
             {
                 
-                o = (OrganisationUnit) orgUnitListIterator.next();
+                o = orgUnitListIterator.next();
                 orgUnitInfo = ""+o.getId();
                 
                 if(maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( o ))
@@ -410,7 +409,6 @@
                 periodIterator = periodList.iterator();
                 
                 Period p;
-                @SuppressWarnings("unused")
                 Collection dataValueResult;
                 double dataStatusPercentatge;
                 
@@ -442,24 +440,13 @@
                         {
                             OrganisationUnit ou = organisationUnitService.getOrganisationUnit( rs1.getInt( 1 ) );
                             DataElement de = dataElementService.getDataElement( rs1.getInt( 2 ));
-                            @SuppressWarnings("unused")
                             Period per = periodService.getPeriod( rs1.getInt(3) );
-                            
-                            @SuppressWarnings("unused")
                             String tempStr = ou.getShortName() + " --- " + de.getName(); 
                         }                            
                         
-                        
-                        //results.add( new Integer( (int) dataStatusPercentatge ) );
                         continue;
                     }
-                    
-                    /*
-                    dataValueResult = dataValueService.getDataValues( o, p, dataElements );
-                    dataStatusPercentatge = ((double) dataValueResult.size() / (double) dataElements.size()) * 100.0;
-                 
-                    */
-                    
+                                        
                     orgUnitInfo = ""+ o.getId();
                     query = "SELECT COUNT(*) FROM "+ dataTableName +" WHERE dataelementid IN ("+deInfo+") AND sourceid IN ("+orgUnitInfo+") AND periodid IN ("+periodInfo+")";
                     ps1 = con.prepareStatement(query);
@@ -540,7 +527,6 @@
     }
 
     // Returns the OrgUnitTree for which Root is the orgUnit
-    @SuppressWarnings("unchecked")
     public List<OrganisationUnit> getChildOrgUnitTree( OrganisationUnit orgUnit )
     {
         List<OrganisationUnit> orgUnitTree = new ArrayList<OrganisationUnit>();
@@ -548,11 +534,11 @@
 
         Collection<OrganisationUnit> children = orgUnit.getChildren();
 
-        Iterator childIterator = children.iterator();
+        Iterator<OrganisationUnit> childIterator = children.iterator();
         OrganisationUnit child;
         while ( childIterator.hasNext() )
         {
-            child = (OrganisationUnit) childIterator.next();
+            child = childIterator.next();
             orgUnitTree.addAll( getChildOrgUnitTree( child ) );
         }
         return orgUnitTree;
@@ -573,7 +559,7 @@
         }               
     }
 
-    private void getOrgUnitInfo(OrganisationUnit organisationUnit, Set<Source> dso)
+    private void getOrgUnitInfo(OrganisationUnit organisationUnit, Set<OrganisationUnit> dso)
     {                
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -602,7 +588,4 @@
         }
         return deInfo.toString();
     }
-
-
-    
-}// class end
+}

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java	2011-04-15 11:34:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -26,7 +26,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
@@ -435,7 +434,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -495,13 +494,13 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
 
         while ( orgUnitListIterator.hasNext() )
         {
-            o = (OrganisationUnit) orgUnitListIterator.next();
+            o = orgUnitListIterator.next();
             orgUnitInfo = "" + o.getId();
 
             if ( maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( o ) )
@@ -670,7 +669,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -789,7 +788,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateGroupWiseDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateGroupWiseDataStatusResultAction.java	2011-04-15 11:34:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateGroupWiseDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -28,7 +28,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
@@ -425,7 +424,7 @@
             selDataSet = dSet;
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
 
@@ -536,12 +535,12 @@
 
             Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
             OrganisationUnit o;
-            Set<Source> dso = new HashSet<Source>();
+            Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
             Iterator<Period> periodIterator;
 
             while ( orgUnitListIterator.hasNext() )
             {
-                o = (OrganisationUnit) orgUnitListIterator.next();
+                o = orgUnitListIterator.next();
                 orgUnitInfo = "" + o.getId();
 
                 if ( maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( o ) )
@@ -701,7 +700,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -820,7 +819,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateLastUpdatedDataSetResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateLastUpdatedDataSetResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateLastUpdatedDataSetResultAction.java	2011-04-27 17:15:13 +0000
@@ -52,7 +52,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
 import org.hisp.dhis.user.UserStore;
@@ -456,7 +455,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -509,13 +508,13 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
         
         while ( orgUnitListIterator.hasNext() )
         {
-            o = (OrganisationUnit) orgUnitListIterator.next();
+            o = orgUnitListIterator.next();
             orgUnitInfo = "" + o.getId();
 
             if ( maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( o ) )
@@ -676,7 +675,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -755,7 +754,7 @@
     }
 
     @SuppressWarnings( "unused" )
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateSummaryDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateSummaryDataStatusResultAction.java	2011-04-15 11:34:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateSummaryDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -23,7 +23,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
@@ -275,7 +274,7 @@
 
     private String dataViewName;
     
-    Set<Source> dso;
+    Set<OrganisationUnit> dso;
 
     // ---------------------------------------------------------------
     // Action Implementation
@@ -343,7 +342,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();      
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();      
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -403,7 +402,7 @@
         deInfo = getDEInfo( dataElements );
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        dso = new HashSet<Source>();
+        dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
         String orgUnitId = "";
@@ -609,7 +608,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -723,7 +722,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateValidationStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateValidationStatusResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateValidationStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -51,7 +51,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 
 import com.opensymphony.xwork2.Action;
 
@@ -373,7 +372,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();      
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();      
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -413,7 +412,7 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator periodIterator;
         dso = selDataSet.getSources();
         String orgUnitId = "";
@@ -421,7 +420,7 @@
         while ( orgUnitListIterator.hasNext() )
         {
             //System.out.println( "Getting into first orgunit loop" );
-            o = (OrganisationUnit) orgUnitListIterator.next();
+            o = orgUnitListIterator.next();
             orgUnitInfo = "" + o.getId();
 
             if ( maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( o ) )
@@ -501,19 +500,7 @@
             //System.out.println("o = "+o.getName() + " dsValidationPassResults size = "+dsValidationPassResults.size());
             ouMapValidationPassStatusResult.put( o, dsValidationPassResults );
         }
-/*        
         
-        for( OrganisationUnit orgUnit : ouMapValidationPassStatusResult.keySet() )
-        {
-            System.out.print( orgUnit.getName() );
-            for( Integer result : ouMapValidationPassStatusResult.get( orgUnit ) )
-            {
-                System.out.print( " - "+ result );
-            }
-            System.out.println("");
-        }
-*/        
-        // For Level Names
         String ouLevelNames[] = new String[organisationUnitService.getNumberOfOrganisationalLevels() + 1];
         
         for ( int i = 0; i < ouLevelNames.length; i++ )
@@ -541,7 +528,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -566,12 +553,12 @@
         orgUnitTree.add( orgUnit );
         List<OrganisationUnit> children = new ArrayList<OrganisationUnit>( orgUnit.getChildren() );
         Collections.sort( children, new OrganisationUnitNameComparator() );
-        Iterator childIterator = children.iterator();
+        Iterator<OrganisationUnit> childIterator = children.iterator();
         OrganisationUnit child;
         
         while ( childIterator.hasNext() )
         {
-            child = (OrganisationUnit) childIterator.next();
+            child = childIterator.next();
             orgUnitTree.addAll( getChildOrgUnitTree( child ) );
         }
         return orgUnitTree;
@@ -590,7 +577,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -615,7 +602,7 @@
 
         @SuppressWarnings( "unused" )
         List<OrganisationUnit> assignedOrganisationUnits = new ArrayList<OrganisationUnit>();
-        Set<Source> assignedSources = selectedDataSet.getSources();
+        Set<OrganisationUnit> assignedSources = selectedDataSet.getSources();
         filteredOrganisationUnits.retainAll( assignedSources );
         return filteredOrganisationUnits;
     }

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateGroupWiseMobileDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateGroupWiseMobileDataStatusResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateGroupWiseMobileDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -54,7 +54,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserStore;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -469,7 +468,7 @@
             selDataSet = dSet;
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
 
@@ -581,7 +580,7 @@
 
             Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
             OrganisationUnit o;
-            Set<Source> dso = new HashSet<Source>();
+            Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
             Iterator<Period> periodIterator;
 
             while ( orgUnitListIterator.hasNext() )
@@ -591,7 +590,7 @@
                 // user phone no
                 userPhoneNo = "";
                 
-                List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+                List<User> users = new ArrayList<User>( o.getUsers() );
                 
                 for ( User user : users )
                 {
@@ -765,7 +764,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -884,7 +883,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateLastUpdatedMobileDataSetResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateLastUpdatedMobileDataSetResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateLastUpdatedMobileDataSetResultAction.java	2011-04-27 17:15:13 +0000
@@ -51,7 +51,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
 import org.hisp.dhis.user.UserStore;
@@ -473,7 +472,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -526,7 +525,7 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
         
@@ -537,7 +536,7 @@
             // user phone no
             userPhoneNo = "";
             
-            List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+            List<User> users = new ArrayList<User>( o.getUsers() );
             
             for ( User user : users )
             {
@@ -711,7 +710,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -790,7 +789,7 @@
     }
 
     @SuppressWarnings( "unused" )
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateMobileDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateMobileDataStatusResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateMobileDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -58,7 +58,6 @@
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reports.ReportService;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserStore;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -497,7 +496,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -558,7 +557,7 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
 
@@ -569,7 +568,7 @@
             // user phone no
             userPhoneNo = "";
             
-            List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+            List<User> users = new ArrayList<User>( o.getUsers() );
             
             for ( User user : users )
             {
@@ -786,7 +785,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -905,7 +904,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GeneratePercentageDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GeneratePercentageDataStatusResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GeneratePercentageDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -26,7 +26,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserStore;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -452,7 +451,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -510,7 +509,7 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
 
@@ -522,7 +521,7 @@
             // user phone no
             userPhoneNo = "";
             
-            List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+            List<User> users = new ArrayList<User>( o.getUsers() );
             
             for ( User user : users )
             {
@@ -654,7 +653,7 @@
     }
     
     
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateSummaryMobileDataStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateSummaryMobileDataStatusResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateSummaryMobileDataStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -51,7 +51,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserStore;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -441,7 +440,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();      
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();      
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -501,7 +500,7 @@
         deInfo = getDEInfo( dataElements );
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator<Period> periodIterator;
         dso = selDataSet.getSources();
         String orgUnitId = "";
@@ -514,7 +513,7 @@
             // user phone no
             userPhoneNo = "";
             
-            List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+            List<User> users = new ArrayList<User>( o.getUsers() );
             
             for ( User user : users )
             {
@@ -717,7 +716,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -833,7 +832,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -868,7 +867,7 @@
 
         @SuppressWarnings( "unused" )
         List<OrganisationUnit> assignedOrganisationUnits = new ArrayList<OrganisationUnit>();
-        Set<Source> assignedSources = selectedDataSet.getSources();
+        Set<OrganisationUnit> assignedSources = selectedDataSet.getSources();
         filteredOrganisationUnits.retainAll( assignedSources );
         return filteredOrganisationUnits;
     }

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateValidationMobileStatusResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateValidationMobileStatusResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/mobile/action/GenerateValidationMobileStatusResultAction.java	2011-04-27 17:15:13 +0000
@@ -50,7 +50,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserStore;
 
@@ -399,7 +398,7 @@
             }
         }
 
-        Set<Source> dSetSource = selDataSet.getSources();      
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();      
         orgUnitInfo = "-1";
         Iterator<OrganisationUnit> ouIt = orgUnitList.iterator();
         while ( ouIt.hasNext() )
@@ -439,7 +438,7 @@
 
         Iterator<OrganisationUnit> orgUnitListIterator = orgUnitList.iterator();
         OrganisationUnit o;
-        Set<Source> dso = new HashSet<Source>();
+        Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
         Iterator periodIterator;
         dso = selDataSet.getSources();
         String orgUnitId = "";
@@ -452,7 +451,7 @@
             // user phone no
             userPhoneNo = "";
             
-            List<User> users = new ArrayList<User>( userStore.getUsersByOrganisationUnit( o ) );
+            List<User> users = new ArrayList<User>( o.getUsers() );
             
             for ( User user : users )
             {
@@ -587,7 +586,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -636,7 +635,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
         Iterator<OrganisationUnit> childIterator = children.iterator();
@@ -661,7 +660,7 @@
 
         @SuppressWarnings( "unused" )
         List<OrganisationUnit> assignedOrganisationUnits = new ArrayList<OrganisationUnit>();
-        Set<Source> assignedSources = selectedDataSet.getSources();
+        Set<OrganisationUnit> assignedSources = selectedDataSet.getSources();
         filteredOrganisationUnits.retainAll( assignedSources );
         return filteredOrganisationUnits;
     }

=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/orgunitgroupsetwise/action/GenerateDataStatusOrgnisationunitGroupSetWiseResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/orgunitgroupsetwise/action/GenerateDataStatusOrgnisationunitGroupSetWiseResultAction.java	2010-12-08 07:24:10 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/orgunitgroupsetwise/action/GenerateDataStatusOrgnisationunitGroupSetWiseResultAction.java	2011-04-27 17:15:13 +0000
@@ -50,7 +50,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.source.Source;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
@@ -393,7 +392,7 @@
             endPeriod.getEndDate() );
 
         // Dataset source
-        Set<Source> dSetSource = selDataSet.getSources();
+        Set<OrganisationUnit> dSetSource = selDataSet.getSources();
 
         // OrgUnit Group Info
         orgUnitGroupList = new ArrayList<OrganisationUnitGroup>( orgUnitListCB.size() );
@@ -458,7 +457,7 @@
             
             Iterator orgUnitListIterator = orgUnitList.iterator();          
             OrganisationUnit o;
-            Set<Source> dso = new HashSet<Source>();
+            Set<OrganisationUnit> dso = new HashSet<OrganisationUnit>();
             Iterator periodIterator = null;
             dso = selDataSet.getSources();
             Map<Integer, Integer> ougResult = new HashMap<Integer, Integer>();
@@ -641,7 +640,7 @@
         return SUCCESS;
     }
 
-    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<Source> dso )
+    public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 
@@ -691,7 +690,7 @@
         }
     }
 
-    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<Source> dso )
+    private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set<OrganisationUnit> dso )
     {
         Collection<OrganisationUnit> children = organisationUnit.getChildren();
 

=== removed file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/CalculateCDEsAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/CalculateCDEsAction.java	2010-09-01 09:05:14 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/CalculateCDEsAction.java	1970-01-01 00:00:00 +0000
@@ -1,167 +0,0 @@
-package org.hisp.dhis.den.action;
-
-/*
- * Copyright (c) 2004-2007, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */ 
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.hisp.dhis.dataelement.CalculatedDataElement;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.den.state.SelectedStateManager;
-import org.hisp.dhis.den.state.StatefulDataValueSaver;
-import org.hisp.dhis.expression.ExpressionService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.Period;
-
-import com.opensymphony.xwork2.Action;
-
-public class CalculateCDEsAction
-    implements Action
-{
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
-    private SelectedStateManager selectedStateManager;
-
-    public void setSelectedStateManager( SelectedStateManager selectedStateManager )
-    {
-        this.selectedStateManager = selectedStateManager;
-    }
-
-    private StatefulDataValueSaver statefulDataValueSaver;
-
-    public void setStatefulDataValueSaver( StatefulDataValueSaver statefulDataValueSaver )
-    {
-        this.statefulDataValueSaver = statefulDataValueSaver;
-    }
-    
-    private ExpressionService expressionService;
-
-    public void setExpressionService( ExpressionService expressionService )
-    {
-        this.expressionService = expressionService;
-    }
-    
-    private DataElementCategoryService dataElementCategoryService;
-
-    public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
-    {
-        this.dataElementCategoryService = dataElementCategoryService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private Map<Integer, String> cdeValueMap;
-
-    public Map<Integer, String> getCdeValueMap()
-    {
-        return cdeValueMap;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-
-        OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
-        
-        Period period = selectedStateManager.getSelectedPeriod();
-        
-        Collection<DataElement> dataElements = selectedStateManager.getSelectedDataSet().getDataElements();
-        
-        if ( dataElements.size() > 0 )
-        {           	     
-        	Collection<CalculatedDataElement> cdes = dataElementService
-            	.getCalculatedDataElementsByDataElements( dataElements );
-        	
-        	//Look for the existence of CDEs in the form itself.
-        	Iterator<DataElement> iterator = dataElements.iterator();            
-
-            while ( iterator.hasNext() )
-            {
-                DataElement dataElement = iterator.next();
-
-                if ( dataElement instanceof CalculatedDataElement )
-                {                	
-                	cdes.add( (CalculatedDataElement) dataElement );  
-                }
-            }            
-        	
-        	cdeValueMap = new HashMap<Integer, String>();
-
-        	String value = null;
-
-        	for ( CalculatedDataElement cde : cdes )
-        	{        	
-        		value = expressionService.getExpressionValue( cde.getExpression(), period, organisationUnit, false, false ).toString();        			
-        		
-        		if ( value == null )
-        		{
-        			continue;
-        		}
-
-        		// Should the value be updated in Data Entry?
-        		if ( dataElements.contains( cde ) )
-        		{        		
-        			cdeValueMap.put( cde.getId(), value );        			
-        		}
-
-        		// Should the value be saved to the database?
-        		if ( cde.isSaved() )
-        		{        			
-        			DataElementCategoryCombo catCombo = dataElementCategoryService.getDataElementCategoryComboByName("default");
-        			DataElementCategoryOptionCombo optionCombo = catCombo.getOptionCombos().iterator().next();
-        			statefulDataValueSaver.saveValue( cde.getId(), optionCombo.getId(), "" + value );
-        		}
-
-        		value = null;
-        	}
-        }
-        return SUCCESS;
-    }
-}

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java	2010-11-12 11:12:37 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/FormAction.java	2011-04-27 17:15:13 +0000
@@ -36,7 +36,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.hisp.dhis.dataelement.CalculatedDataElement;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
@@ -174,13 +173,6 @@
     {
         return dataValueMap;
     }
-
-    private Map<CalculatedDataElement,Integer> calculatedValueMap;
-    
-    public Map<CalculatedDataElement,Integer> getCalculatedValueMap()
-    {
-        return calculatedValueMap;
-    }
     
     private List<String> standardComments;
 

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SaveLineListingAggData.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SaveLineListingAggData.java	2010-06-15 11:26:37 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SaveLineListingAggData.java	2011-04-27 17:15:13 +0000
@@ -27,16 +27,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
@@ -50,12 +46,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.user.CurrentUserService;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
 
 import com.opensymphony.xwork2.Action;
 

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SectionFormAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SectionFormAction.java	2011-03-22 10:30:57 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SectionFormAction.java	2011-04-27 17:15:13 +0000
@@ -34,12 +34,9 @@
 import java.util.List;
 import java.util.Map;
 
-import org.hisp.dhis.dataelement.CalculatedDataElement;
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.Section;
-import org.hisp.dhis.dataset.SectionService;
 import org.hisp.dhis.dataset.comparator.SectionOrderComparator;
 import org.hisp.dhis.datavalue.DataValue;
 import org.hisp.dhis.datavalue.DataValueService;
@@ -65,13 +62,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private SectionService sectionService;
-
-    public void setSectionService( SectionService sectionService )
-    {
-        this.sectionService = sectionService;
-    }
-
     private DataValueService dataValueService;
 
     public void setDataValueService( DataValueService dataValueService )
@@ -79,13 +69,6 @@
         this.dataValueService = dataValueService;
     }
 
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
     private StandardCommentsManager standardCommentsManager;
 
     public void setStandardCommentsManager( StandardCommentsManager standardCommentsManager )
@@ -132,13 +115,6 @@
         return dataValueMap;
     }
 
-    private Map<CalculatedDataElement, Integer> calculatedValueMap;
-
-    public Map<CalculatedDataElement, Integer> getCalculatedValueMap()
-    {
-        return calculatedValueMap;
-    }
-
     private List<String> standardComments;
 
     public List<String> getStandardComments()
@@ -252,53 +228,6 @@
         }
 
         // ---------------------------------------------------------------------
-        // Prepare values for unsaved CalculatedDataElements
-        // ---------------------------------------------------------------------
-
-        CalculatedDataElement cde;
-
-        calculatedValueMap = new HashMap<CalculatedDataElement, Integer>();
-
-        Map<DataElement, Double> factorMap;
-
-        DataValue dataValue;
-        Double factor;
-        int value = 0;
-
-        for ( DataElement dataElement : dataElements )
-        {
-            if ( !(dataElement instanceof CalculatedDataElement) )
-            {
-                continue;
-            }
-
-            cde = (CalculatedDataElement) dataElement;
-
-            if ( cde.isSaved() )
-            {
-                continue;
-            }
-
-            factorMap = dataElementService.getDataElementFactors( cde );
-
-            for ( DataElement cdeElement : cde.getExpression().getDataElementsInExpression() )
-            {
-                factor = factorMap.get( cdeElement );
-                dataValue = dataValueMap.get( cdeElement.getId() );
-
-                if ( dataValue != null )
-                {
-                    value += Integer.parseInt( dataValue.getValue() ) * factor;
-                }
-
-            }
-
-            calculatedValueMap.put( cde, value );
-
-            value = 0;
-        }
-
-        // ---------------------------------------------------------------------
         // Make the standard comments available
         // ---------------------------------------------------------------------
 

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java	2011-04-15 11:53:12 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java	2011-04-27 17:15:13 +0000
@@ -27,21 +27,16 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 
-import org.hisp.dhis.dataelement.CalculatedDataElement;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategory;
-import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.Section;
@@ -54,7 +49,6 @@
 import org.hisp.dhis.period.Period;
 
 import com.opensymphony.xwork2.ActionSupport;
-import java.text.SimpleDateFormat;
 
 /**
  * @author Torgeir Lorange Ostby
@@ -101,20 +95,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
-    private DataEntryFormService dataEntryFormService;
-
-    public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -223,20 +203,6 @@
         return useShortName;
     }
 
-    private Collection<Integer> calculatedDataElementIds;
-
-    public Collection<Integer> getCalculatedDataElementIds()
-    {
-        return calculatedDataElementIds;
-    }
-
-    private HashMap<CalculatedDataElement, Map<DataElement, Double>> calculatedDataElementMap;
-
-    public Map<CalculatedDataElement, Map<DataElement, Double>> getCalculatedDataElementMap()
-    {
-        return calculatedDataElementMap;
-    }
-
     private String selStartDate;
 
     public String getSelStartDate()
@@ -281,8 +247,7 @@
 
         dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
         //dataSets = new ArrayList<DataSet>( dataSetService.getDataSetsBySource( organisationUnit ) );
-System.out.println("\n\n\n +++++++++++++ \n organisationUnit : " + organisationUnit);
-System.out.println("\n  dataSets : " + dataSets);
+        
         // ---------------------------------------------------------------------
         // Remove DataSets which don't have a CalendarPeriodType or are locked
         // ---------------------------------------------------------------------
@@ -402,31 +367,6 @@
         }
 
         // ---------------------------------------------------------------------
-        // Prepare CalculatedDataElementInformation
-        // ---------------------------------------------------------------------
-
-        calculatedDataElementIds = new HashSet<Integer>();
-        calculatedDataElementMap = new HashMap<CalculatedDataElement, Map<DataElement, Double>>();
-        CalculatedDataElement cde;
-
-        for ( DataElement dataElement : selectedDataSet.getDataElements() )
-        {
-            if ( dataElement instanceof CalculatedDataElement )
-            {
-                cde = (CalculatedDataElement) dataElement;
-                calculatedDataElementIds.add( cde.getId() );
-
-                if ( cde.isSaved() )
-                {
-                    continue;
-                }
-
-                calculatedDataElementMap.put( cde, dataElementService.getDataElementFactors( cde ) );
-
-            }
-        }
-
-        // ---------------------------------------------------------------------
         // Get the custom data entry form (if any)
         // ---------------------------------------------------------------------
 

=== removed file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/multidimensional/SelectAction.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/multidimensional/SelectAction.java	2011-03-22 10:30:57 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/multidimensional/SelectAction.java	1970-01-01 00:00:00 +0000
@@ -1,350 +0,0 @@
-package org.hisp.dhis.den.action.multidimensional;
-
-/*
- * Copyright (c) 2004-2007, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import org.hisp.dhis.dataelement.CalculatedDataElement;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
-import org.hisp.dhis.den.state.SelectedStateManager;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.CalendarPeriodType;
-import org.hisp.dhis.period.Period;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-/**
- * @author Abyot Asalefew, abyota@xxxxxxxxx
- * @version $Id$
- */
-
-@SuppressWarnings( "serial" )
-public class SelectAction
-    extends ActionSupport
-{
-
-    private static final String DEFAULT_FORM = "defaultform";
-
-    private static final String MULTI_DIMENSIONAL_FORM = "multidimensionalform";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private SelectedStateManager selectedStateManager;
-
-    public void setSelectedStateManager( SelectedStateManager selectedStateManager )
-    {
-        this.selectedStateManager = selectedStateManager;
-    }
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnit organisationUnit;
-
-    public OrganisationUnit getOrganisationUnit()
-    {
-        return organisationUnit;
-    }
-
-    private List<DataSet> dataSets = new ArrayList<DataSet>();
-
-    public Collection<DataSet> getDataSets()
-    {
-        return dataSets;
-    }
-
-    private List<Period> periods = new ArrayList<Period>();
-
-    public Collection<Period> getPeriods()
-    {
-        return periods;
-    }
-
-    public SelectedStateManager getSelectedStateManager()
-    {
-        return selectedStateManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/output
-    // -------------------------------------------------------------------------
-
-    private Integer selectedDataSetId;
-
-    public void setSelectedDataSetId( Integer selectedDataSetId )
-    {
-        this.selectedDataSetId = selectedDataSetId;
-    }
-
-    public Integer getSelectedDataSetId()
-    {
-        return selectedDataSetId;
-    }
-
-    private Integer selectedPeriodIndex;
-
-    public void setSelectedPeriodIndex( Integer selectedPeriodIndex )
-    {
-        this.selectedPeriodIndex = selectedPeriodIndex;
-    }
-
-    public Integer getSelectedPeriodIndex()
-    {
-        return selectedPeriodIndex;
-    }
-
-    private String useShortName;
-
-    public void setUseShortName( String useShortName )
-    {
-        this.useShortName = useShortName;
-    }
-
-    public String getUseShortName()
-    {
-        return useShortName;
-    }
-
-    private Collection<Integer> calculatedDataElementIds;
-
-    public Collection<Integer> getCalculatedDataElementIds()
-    {
-        return calculatedDataElementIds;
-    }
-
-    private Map<CalculatedDataElement, Map<DataElement, Double>> calculatedDataElementMap;
-
-    public Map<CalculatedDataElement, Map<DataElement, Double>> getCalculatedDataElementMap()
-    {
-        return calculatedDataElementMap;
-    }
-
-    private String multiDimensionalEntry;
-
-    public void setMultiDimensionalEntry( String multiDimensionalEntry )
-    {
-        this.multiDimensionalEntry = multiDimensionalEntry;
-    }
-
-    public String getMultiDimensionalEntry()
-    {
-        return multiDimensionalEntry;
-    }
-
-    private Integer isMultiDimensional;
-
-    public Integer getIsMultiDimensional()
-    {
-        return isMultiDimensional;
-    }
-
-    public void setIsMultiDimensional( Integer isMultiDimensional )
-    {
-        this.isMultiDimensional = isMultiDimensional;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        // ---------------------------------------------------------------------
-        // Validate selected OrganisationUnit
-        // ---------------------------------------------------------------------
-
-        isMultiDimensional = 0;
-
-        organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
-
-        if ( organisationUnit == null )
-        {
-            selectedDataSetId = null;
-            selectedPeriodIndex = null;
-
-            selectedStateManager.clearSelectedDataSet();
-            selectedStateManager.clearSelectedPeriod();
-
-            return SUCCESS;
-        }
-
-        // ---------------------------------------------------------------------
-        // Load DataSets
-        // ---------------------------------------------------------------------
-
-        dataSets = new ArrayList<DataSet>();
-
-        for ( DataSet dataSet : dataSetService.getAllDataSets() )
-        {
-            if ( dataSet.getSources().contains( organisationUnit )
-                && dataSet.getPeriodType() instanceof CalendarPeriodType )
-            {
-                dataSets.add( dataSet );
-            }
-        }
-
-        Collections.sort( dataSets, new DataSetNameComparator() );
-
-        // ---------------------------------------------------------------------
-        // Validate selected DataSet
-        // ---------------------------------------------------------------------
-
-        DataSet selectedDataSet;
-
-        if ( selectedDataSetId != null )
-        {
-            selectedDataSet = dataSetService.getDataSet( selectedDataSetId );
-        }
-        else
-        {
-            selectedDataSet = selectedStateManager.getSelectedDataSet();
-        }
-
-        if ( selectedDataSet != null && dataSets.contains( selectedDataSet ) )
-        {
-            selectedDataSetId = selectedDataSet.getId();
-            selectedStateManager.setSelectedDataSet( selectedDataSet );
-        }
-        else
-        {
-            selectedDataSetId = null;
-            selectedPeriodIndex = null;
-
-            selectedStateManager.clearSelectedDataSet();
-            selectedStateManager.clearSelectedPeriod();
-
-            return SUCCESS;
-        }
-
-        // ---------------------------------------------------------------------
-        // Prepare for multidimensional dataentry
-        // ---------------------------------------------------------------------
-        Collection<DataElementCategoryCombo> decbo = new ArrayList<DataElementCategoryCombo>();
-        DataSet dataSet = selectedStateManager.getSelectedDataSet();
-
-        for ( DataElement de : dataSet.getDataElements() )
-        {
-            if ( de.getCategoryCombo() != null )
-            {
-                decbo.add( de.getCategoryCombo() );
-            }
-        }
-        if ( decbo.size() > 0 )
-        {
-            isMultiDimensional = 1;
-        }
-
-        // ---------------------------------------------------------------------
-        // Generate Periods
-        // ---------------------------------------------------------------------
-
-        periods = selectedStateManager.getPeriodList();
-
-        // ---------------------------------------------------------------------
-        // Validate selected Period
-        // ---------------------------------------------------------------------
-
-        if ( selectedPeriodIndex == null )
-        {
-            selectedPeriodIndex = selectedStateManager.getSelectedPeriodIndex();
-        }
-
-        if ( selectedPeriodIndex != null && selectedPeriodIndex >= 0 && selectedPeriodIndex < periods.size() )
-        {
-            selectedStateManager.setSelectedPeriodIndex( selectedPeriodIndex );
-        }
-        else
-        {
-            selectedPeriodIndex = null;
-            selectedStateManager.clearSelectedPeriod();
-
-            return SUCCESS;
-        }
-
-        // ---------------------------------------------------------------------
-        // Prepare CalculatedDataElementInformation
-        // ---------------------------------------------------------------------
-
-        calculatedDataElementIds = new HashSet<Integer>();
-        calculatedDataElementMap = new HashMap<CalculatedDataElement, Map<DataElement, Double>>();
-        CalculatedDataElement cde;
-
-        for ( DataElement dataElement : selectedDataSet.getDataElements() )
-        {
-            if ( dataElement instanceof CalculatedDataElement )
-            {
-                cde = (CalculatedDataElement) dataElement;
-                calculatedDataElementIds.add( cde.getId() );
-
-                if ( cde.isSaved() )
-                {
-                    continue;
-                }
-
-                calculatedDataElementMap.put( cde, dataElementService.getDataElementFactors( cde ) );
-            }
-        }
-
-        if ( multiDimensionalEntry != null )
-        {
-            return MULTI_DIMENSIONAL_FORM;
-        }
-        else
-
-            return DEFAULT_FORM;
-    }
-}

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValue.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValue.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValue.java	2011-04-27 17:15:13 +0000
@@ -33,8 +33,8 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.datavalue.DataValue;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 @SuppressWarnings("serial")
 public class LLDataValue implements Serializable
@@ -52,7 +52,7 @@
     /**
      * Part of the DataValue's composite ID
      */
-    private Source source;
+    private OrganisationUnit source;
 
     private String value;
 
@@ -74,39 +74,39 @@
     {
     }
 
-    public LLDataValue( DataElement dataElement, Period period, Source source )
-    {
-        this.dataElement = dataElement;
-        this.period = period;
-        this.source = source;
-    }
-
-    public LLDataValue( DataElement dataElement, Period period, Source source, DataElementCategoryOptionCombo optionCombo )
-    {
-        this.dataElement = dataElement;
-        this.period = period;
-        this.source = source;
-        this.optionCombo = optionCombo;
-    }
-
-    public LLDataValue( DataElement dataElement, Period period, Source source, String value )
-    {
-        this.dataElement = dataElement;
-        this.period = period;
-        this.source = source;
-        this.value = value;
-    }
-
-    public LLDataValue( DataElement dataElement, Period period, Source source, String value, DataElementCategoryOptionCombo optionCombo )
-    {
-        this.dataElement = dataElement;
-        this.period = period;
-        this.source = source;
-        this.value = value;
-        this.optionCombo = optionCombo;
-    }
-
-    public LLDataValue( DataElement dataElement, Period period, Source source, String value, String storedBy,
+    public LLDataValue( DataElement dataElement, Period period, OrganisationUnit source )
+    {
+        this.dataElement = dataElement;
+        this.period = period;
+        this.source = source;
+    }
+
+    public LLDataValue( DataElement dataElement, Period period, OrganisationUnit source, DataElementCategoryOptionCombo optionCombo )
+    {
+        this.dataElement = dataElement;
+        this.period = period;
+        this.source = source;
+        this.optionCombo = optionCombo;
+    }
+
+    public LLDataValue( DataElement dataElement, Period period, OrganisationUnit source, String value )
+    {
+        this.dataElement = dataElement;
+        this.period = period;
+        this.source = source;
+        this.value = value;
+    }
+
+    public LLDataValue( DataElement dataElement, Period period, OrganisationUnit source, String value, DataElementCategoryOptionCombo optionCombo )
+    {
+        this.dataElement = dataElement;
+        this.period = period;
+        this.source = source;
+        this.value = value;
+        this.optionCombo = optionCombo;
+    }
+
+    public LLDataValue( DataElement dataElement, Period period, OrganisationUnit source, String value, String storedBy,
         Date timestamp, String comment )
     {
         this.dataElement = dataElement;
@@ -118,7 +118,7 @@
         this.comment = comment;
     }
     
-    public LLDataValue( DataElement dataElement, Period period, Source source, String value, String storedBy,
+    public LLDataValue( DataElement dataElement, Period period, OrganisationUnit source, String value, String storedBy,
             Date timestamp, String comment, DataElementCategoryOptionCombo optionCombo, Integer recordNo )
     {
             this.dataElement = dataElement;
@@ -198,12 +198,12 @@
         this.period = period;
     }
 
-    public Source getSource()
+    public OrganisationUnit getSource()
     {
         return source;
     }
 
-    public void setSource( Source source )
+    public void setSource( OrganisationUnit source )
     {
         this.source = source;
     }

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueService.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueService.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueService.java	2011-04-27 17:15:13 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 public interface LLDataValueService
 {
@@ -77,7 +76,7 @@
      * @param source the Source for which the DataValues should be deleted.
      * @return the number of deleted DataValues.
      */
-    int deleteDataValuesBySource( Source source );
+    int deleteDataValuesBySource( OrganisationUnit source );
 
     /**
      * Deletes all DataValues registered for the given DataElemt.
@@ -87,29 +86,29 @@
      */
     int deleteDataValuesByDataElement( DataElement dataElement );
 
-    LLDataValue getDataValue(  Source source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo, int recordNo);
-    
-    /**
-     * Returns a List of DataValues.
-     * 
-     * @param source the Source of the DataValue.
-     * @param dataElement the DataElement of the DataValue.
-     * @param period the Period of the DataValue.
-     * @return the DataValue which corresponds to the given parameters, or null
-     *         if no match.
-     */
-    Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period );
-    
-    /**
-     * Returns a List of DataValues.
-     * 
-     * @param source the Source of the DataValue.
-     * @param dataElement the DataElement of the DataValue.
-     * @param period the Period of the DataValue.
-     * @return the DataValue which corresponds to the given parameters, or null
-     *         if no match.
-     */
-    Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo );
+    LLDataValue getDataValue( OrganisationUnit source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo, int recordNo);
+    
+    /**
+     * Returns a List of DataValues.
+     * 
+     * @param source the Source of the DataValue.
+     * @param dataElement the DataElement of the DataValue.
+     * @param period the Period of the DataValue.
+     * @return the DataValue which corresponds to the given parameters, or null
+     *         if no match.
+     */
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period );
+    
+    /**
+     * Returns a List of DataValues.
+     * 
+     * @param source the Source of the DataValue.
+     * @param dataElement the DataElement of the DataValue.
+     * @param period the Period of the DataValue.
+     * @return the DataValue which corresponds to the given parameters, or null
+     *         if no match.
+     */
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo );
 
     // -------------------------------------------------------------------------
     // Collections of DataValues
@@ -130,7 +129,7 @@
      * @return a collection of all DataValues which match the given Source and
      *         Period, or an empty collection if no values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, Period period );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period );
 
     /**
      * Returns all DataValues for a given Source and DataElement.
@@ -140,7 +139,7 @@
      * @return a collection of all DataValues which match the given Source and
      *         DataElement, or an empty collection if no values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, DataElement dataElement );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement );
 
     /**
      * Returns all DataValues for a given collection of Sources and a
@@ -152,7 +151,7 @@
      *         Sources and the DataElement, or an empty collection if no values
      *         match.
      */
-    Collection<LLDataValue> getDataValues( Collection<Source> sources, DataElement dataElement );
+    Collection<LLDataValue> getDataValues( Collection<OrganisationUnit> sources, DataElement dataElement );
     
     /**
      * Returns all DataValues for a given Source, Period, collection of
@@ -165,7 +164,7 @@
      *         Period, and any of the DataElements, or an empty collection if no
      *         values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements, Collection<DataElementCategoryOptionCombo> optionCombos );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements, Collection<DataElementCategoryOptionCombo> optionCombos );
 
     /**
      * Returns all DataValues for a given Source, Period, and collection of
@@ -178,7 +177,7 @@
      *         Period, and any of the DataElements, or an empty collection if no
      *         values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements );
     
     /**
      * Returns all DataValues for a given DataElement, collection of Periods, and 
@@ -190,7 +189,7 @@
      *         Periods, and Sources.
      */
     Collection<LLDataValue> getDataValues( DataElement dataElement, Collection<Period> periods, 
-        Collection<? extends Source> sources );
+        Collection<OrganisationUnit> sources );
 
     /**
      * Returns all DataValues for a given DataElement, DataElementCategoryOptionCombo,
@@ -204,7 +203,7 @@
      *         Periods, and Sources.
      */
     Collection<LLDataValue> getDataValues( DataElement dataElement, DataElementCategoryOptionCombo optionCombo, 
-        Collection<Period> periods, Collection<? extends Source> sources );
+        Collection<Period> periods, Collection<OrganisationUnit> sources );
     
     /**
      * Returns all DataValues for a given collection of DataElements, collection of Periods, and
@@ -219,7 +218,7 @@
      *         Periods, and Sources, limited by the firstResult and maxResults property.
      */
     Collection<LLDataValue> getDataValues( Collection<DataElement> dataElements, Collection<Period> periods, 
-        Collection<? extends Source> sources, int firstResult, int maxResults );    
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults );    
     
     /**
      * Returns all DataValues for a given collection of DataElementCategoryOptionCombos.
@@ -240,11 +239,11 @@
     
     int getMaxRecordNo();
     
-    Map<String,String> processLineListBirths(OrganisationUnit organisationUnit, Period period);
-    
-    Map<String,String> processLineListDeaths(OrganisationUnit organisationUnit, Period periodL);
-    
-    Map<String,String> processLineListMaternalDeaths(OrganisationUnit organisationUnit, Period periodL);
+    Map<String,String> processLineListBirths( OrganisationUnit organisationUnit, Period period );
+    
+    Map<String,String> processLineListDeaths( OrganisationUnit organisationUnit, Period periodL );
+    
+    Map<String,String> processLineListMaternalDeaths( OrganisationUnit organisationUnit, Period periodL );
     
     List<String> getLLImportFiles();
     

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueStore.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueStore.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataValueStore.java	2011-04-27 17:15:13 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
 
 public interface LLDataValueStore
 {
@@ -68,7 +67,7 @@
      * @param source the Source for which the DataValues should be deleted.
      * @return the number of deleted DataValues.
      */
-    int deleteDataValuesBySource( Source source );
+    int deleteDataValuesBySource( OrganisationUnit source );
     
     /**
      * Deletes all DataValues registered for the given DataElemt.
@@ -78,29 +77,29 @@
      */
     int deleteDataValuesByDataElement( DataElement dataElement );
 
-    LLDataValue getDataValue(  Source source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo, int recordNo);
-    
-    /**
-     * Returns a DataValue.
-     * 
-     * @param source the Source of the DataValue.
-     * @param dataElement the DataElement of the DataValue.
-     * @param period the Period of the DataValue.
-     * @return the DataValue which corresponds to the given parameters, or null
-     *         if no match.
-     */
-    Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period );
-    
-    /**
-     * Returns a DataValue.
-     * 
-     * @param source the Source of the DataValue.
-     * @param dataElement the DataElement of the DataValue.
-     * @param period the Period of the DataValue.
-     * @return the DataValue which corresponds to the given parameters, or null
-     *         if no match.
-     */
-    Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo );
+    LLDataValue getDataValue(  OrganisationUnit source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo, int recordNo);
+    
+    /**
+     * Returns a DataValue.
+     * 
+     * @param source the Source of the DataValue.
+     * @param dataElement the DataElement of the DataValue.
+     * @param period the Period of the DataValue.
+     * @return the DataValue which corresponds to the given parameters, or null
+     *         if no match.
+     */
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period );
+    
+    /**
+     * Returns a DataValue.
+     * 
+     * @param source the Source of the DataValue.
+     * @param dataElement the DataElement of the DataValue.
+     * @param period the Period of the DataValue.
+     * @return the DataValue which corresponds to the given parameters, or null
+     *         if no match.
+     */
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period, DataElementCategoryOptionCombo optionCombo );
 
     // -------------------------------------------------------------------------
     // Collections of DataValues
@@ -121,7 +120,7 @@
      * @return a collection of all DataValues which match the given Source and
      *         Period, or an empty collection if no values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, Period period );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period );
     
     /**
      * Returns all DataValues for a given Source and DataElement.
@@ -131,7 +130,7 @@
      * @return a collection of all DataValues which match the given Source and
      *         DataElement, or an empty collection if no values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, DataElement dataElement );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement );
 
     /**
      * Returns all DataValues for a given collection of Sources and a
@@ -143,7 +142,7 @@
      *         Sources and the DataElement, or an empty collection if no values
      *         match.
      */
-    Collection<LLDataValue> getDataValues( Collection<? extends Source> sources, DataElement dataElement );
+    Collection<LLDataValue> getDataValues( Collection<OrganisationUnit> sources, DataElement dataElement );
 
     /**
      * Returns all DataValues for a given Source, Period, and collection of
@@ -156,7 +155,7 @@
      *         Period, and any of the DataElements, or an empty collection if no
      *         values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements );
     
     /**
      * Returns all DataValues for a given Source, Period, collection of
@@ -169,7 +168,7 @@
      *         Period, and any of the DataElements, or an empty collection if no
      *         values match.
      */
-    Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements, Collection<DataElementCategoryOptionCombo> optionCombos );
+    Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements, Collection<DataElementCategoryOptionCombo> optionCombos );
     
     /**
      * Returns all DataValues for a given DataElement, collection of Periods, and 
@@ -182,7 +181,7 @@
      *         Periods, and Sources.
      */
     Collection<LLDataValue> getDataValues( DataElement dataElement, Collection<Period> periods, 
-        Collection<? extends Source> sources );
+        Collection<OrganisationUnit> sources );
     
     /**
      * Returns all DataValues for a given DataElement, DataElementCategoryOptionCombo,
@@ -196,7 +195,7 @@
      *         Periods, and Sources.
      */
     Collection<LLDataValue> getDataValues( DataElement dataElement, DataElementCategoryOptionCombo optionCombo, 
-        Collection<Period> periods, Collection<? extends Source> sources );
+        Collection<Period> periods, Collection<OrganisationUnit> sources );
     
     /**
      * Returns all DataValues for a given collection of DataElements, collection of Periods, and
@@ -211,7 +210,7 @@
      *         Periods, and Sources, limited by the firstResult and maxResults property.
      */
     Collection<LLDataValue> getDataValues( Collection<DataElement> dataElements, Collection<Period> periods, 
-        Collection<? extends Source> sources, int firstResult, int maxResults );
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults );
     
     /**
      * Returns all DataValues for a given collection of DataElementCategoryOptionCombos.
@@ -232,11 +231,11 @@
     
     int getMaxRecordNo();
 
-    Map<String,String> processLineListBirths(OrganisationUnit organisationUnit, Period period);
-    
-    Map<String,String> processLineListDeaths(OrganisationUnit organisationUnit, Period periodL);
-    
-    Map<String,String> processLineListMaternalDeaths(OrganisationUnit organisationUnit, Period periodL);
+    Map<String,String> processLineListBirths( OrganisationUnit organisationUnit, Period period );
+    
+    Map<String,String> processLineListDeaths( OrganisationUnit organisationUnit, Period period );
+    
+    Map<String,String> processLineListMaternalDeaths( OrganisationUnit organisationUnit, Period period );
 
     void removeLLRecord( int recordNo );
     

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/comments/DefaultStandardCommentsManager.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/comments/DefaultStandardCommentsManager.java	2010-12-29 16:17:28 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/comments/DefaultStandardCommentsManager.java	2011-04-27 17:15:13 +0000
@@ -31,7 +31,6 @@
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
 import java.util.List;
 
 import com.thoughtworks.xstream.XStream;

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/DefaultLLDataValueService.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/DefaultLLDataValueService.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/DefaultLLDataValueService.java	2011-04-27 17:15:13 +0000
@@ -45,14 +45,13 @@
 import org.hisp.dhis.den.api.LLImportParameters;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
-import org.hisp.dhis.source.Source;
+import org.springframework.transaction.annotation.Transactional;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
-import org.springframework.transaction.annotation.Transactional;
 
 @Transactional
 public class DefaultLLDataValueService
@@ -98,7 +97,7 @@
         dataValueStore.deleteDataValue( dataValue );
     }
 
-    public int deleteDataValuesBySource( Source source )
+    public int deleteDataValuesBySource( OrganisationUnit source )
     {
         return dataValueStore.deleteDataValuesBySource( source );
     }
@@ -108,18 +107,18 @@
         return dataValueStore.deleteDataValuesByDataElement( dataElement );
     }
 
-    public LLDataValue getDataValue( Source source, DataElement dataElement, Period period,
+    public LLDataValue getDataValue( OrganisationUnit source, DataElement dataElement, Period period,
         DataElementCategoryOptionCombo optionCombo, int recordNo )
     {
         return dataValueStore.getDataValue( source, dataElement, period, optionCombo, recordNo );
     }
 
-    public Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period )
     {
         return dataValueStore.getDataValues( source, dataElement, period );
     }
 
-    public Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period,
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period,
         DataElementCategoryOptionCombo optionCombo )
     {
         return dataValueStore.getDataValues( source, dataElement, period, optionCombo );
@@ -134,46 +133,46 @@
         return dataValueStore.getAllDataValues();
     }
 
-    public Collection<LLDataValue> getDataValues( Source source, Period period )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period )
     {
         return dataValueStore.getDataValues( source, period );
     }
 
-    public Collection<LLDataValue> getDataValues( Source source, DataElement dataElement )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement )
     {
         return dataValueStore.getDataValues( source, dataElement );
     }
 
-    public Collection<LLDataValue> getDataValues( Collection<Source> sources, DataElement dataElement )
+    public Collection<LLDataValue> getDataValues( Collection<OrganisationUnit> sources, DataElement dataElement )
     {
         return dataValueStore.getDataValues( sources, dataElement );
     }
 
-    public Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements )
     {
         return dataValueStore.getDataValues( source, period, dataElements );
     }
 
-    public Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements,
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements,
         Collection<DataElementCategoryOptionCombo> optionCombos )
     {
         return dataValueStore.getDataValues( source, period, dataElements, optionCombos );
     }
 
     public Collection<LLDataValue> getDataValues( DataElement dataElement, Collection<Period> periods,
-        Collection<? extends Source> sources )
+        Collection<OrganisationUnit> sources )
     {
         return dataValueStore.getDataValues( dataElement, periods, sources );
     }
 
     public Collection<LLDataValue> getDataValues( DataElement dataElement, DataElementCategoryOptionCombo optionCombo,
-        Collection<Period> periods, Collection<? extends Source> sources )
+        Collection<Period> periods, Collection<OrganisationUnit> sources )
     {
         return dataValueStore.getDataValues( dataElement, optionCombo, periods, sources );
     }
 
     public Collection<LLDataValue> getDataValues( Collection<DataElement> dataElements, Collection<Period> periods,
-        Collection<? extends Source> sources, int firstResult, int maxResults )
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults )
     {
         return dataValueStore.getDataValues( dataElements, periods, sources, firstResult, maxResults );
     }

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java	2010-11-12 11:12:37 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/impl/HibernateLLDataValueStore.java	2011-04-27 17:15:13 +0000
@@ -49,7 +49,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.source.Source;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.support.rowset.SqlRowSet;
 
@@ -154,7 +153,7 @@
         session.delete( dataValue );
     }
 
-    public int deleteDataValuesBySource( Source source )
+    public int deleteDataValuesBySource( OrganisationUnit source )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -174,7 +173,7 @@
         return query.executeUpdate();
     }
 
-    public LLDataValue getDataValue( Source source, DataElement dataElement, Period period,
+    public LLDataValue getDataValue( OrganisationUnit source, DataElement dataElement, Period period,
         DataElementCategoryOptionCombo optionCombo, int recordNo )
     {
         Session session = sessionFactory.getCurrentSession();
@@ -198,7 +197,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -218,7 +217,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Source source, DataElement dataElement, Period period,
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement, Period period,
         DataElementCategoryOptionCombo optionCombo )
     {
         Session session = sessionFactory.getCurrentSession();
@@ -254,7 +253,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Source source, Period period )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period )
     {
         Period storedPeriod = reloadPeriod( period );
 
@@ -273,7 +272,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Source source, DataElement dataElement )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, DataElement dataElement )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -285,7 +284,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Collection<? extends Source> sources, DataElement dataElement )
+    public Collection<LLDataValue> getDataValues( Collection<OrganisationUnit> sources, DataElement dataElement )
     {
         Session session = sessionFactory.getCurrentSession();
 
@@ -297,7 +296,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements )
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements )
     {
         Period storedPeriod = reloadPeriod( period );
 
@@ -317,7 +316,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<LLDataValue> getDataValues( Source source, Period period, Collection<DataElement> dataElements,
+    public Collection<LLDataValue> getDataValues( OrganisationUnit source, Period period, Collection<DataElement> dataElements,
         Collection<DataElementCategoryOptionCombo> optionCombos )
     {
         Period storedPeriod = reloadPeriod( period );
@@ -340,7 +339,7 @@
 
     @SuppressWarnings( "unchecked" )
     public Collection<LLDataValue> getDataValues( DataElement dataElement, Collection<Period> periods,
-        Collection<? extends Source> sources )
+        Collection<OrganisationUnit> sources )
     {
         Collection<Period> storedPeriods = new ArrayList<Period>();
 
@@ -366,7 +365,7 @@
 
     @SuppressWarnings( "unchecked" )
     public Collection<LLDataValue> getDataValues( DataElement dataElement, DataElementCategoryOptionCombo optionCombo,
-        Collection<Period> periods, Collection<? extends Source> sources )
+        Collection<Period> periods, Collection<OrganisationUnit> sources )
     {
         Collection<Period> storedPeriods = new ArrayList<Period>();
 
@@ -393,7 +392,7 @@
 
     @SuppressWarnings( "unchecked" )
     public Collection<LLDataValue> getDataValues( Collection<DataElement> dataElements, Collection<Period> periods,
-        Collection<? extends Source> sources, int firstResult, int maxResults )
+        Collection<OrganisationUnit> sources, int firstResult, int maxResults )
     {
         Collection<Period> storedPeriods = new ArrayList<Period>();
 
@@ -2383,7 +2382,7 @@
 
         //PreparedStatement pst = null;
 
-        String query = "DELETE from lldatavalue WHERE recordno = " + recordNo;
+        //String query = "DELETE from lldatavalue WHERE recordno = " + recordNo;
 
         try
         {
@@ -2392,7 +2391,7 @@
             //pst = con.prepareStatement( query );
 
             //pst.executeUpdate();
-            int sqlResult = jdbcTemplate.update( query );
+            //int sqlResult = jdbcTemplate.update( query );
         }
         catch ( Exception e )
         {

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/state/DefaultSelectedStateManager.java'
--- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/state/DefaultSelectedStateManager.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/state/DefaultSelectedStateManager.java	2011-04-27 17:15:13 +0000
@@ -255,8 +255,7 @@
         return basePeriod;
     }
 
-    @SuppressWarnings("unchecked")
-	private static final Map getSession()
+    private static final Map getSession()
     {
         return ActionContext.getContext().getSession();
     }

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml	2010-11-12 11:12:37 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/resources/META-INF/dhis/beans.xml	2011-04-27 17:15:13 +0000
@@ -69,11 +69,7 @@
     <property name="selectedStateManager"
       ref="org.hisp.dhis.den.state.SelectedStateManager"/>
     <property name="dataSetService"
-      ref="org.hisp.dhis.dataset.DataSetService"/>
-    <property name="dataElementService"
-      ref="org.hisp.dhis.dataelement.DataElementService"/>
-    <property name="dataEntryFormService"
-      ref="org.hisp.dhis.dataentryform.DataEntryFormService"/>     
+      ref="org.hisp.dhis.dataset.DataSetService"/>   
       <property name="sectionService"
       ref="org.hisp.dhis.dataset.SectionService"/>    
   </bean>
@@ -136,16 +132,12 @@
     class="org.hisp.dhis.den.action.SectionFormAction" scope="prototype">    
     <property name="dataValueService"
       ref="org.hisp.dhis.datavalue.DataValueService"/>
-    <property name="dataElementService"
-      ref="org.hisp.dhis.dataelement.DataElementService"/>
     <property name="standardCommentsManager"
       ref="org.hisp.dhis.den.comments.StandardCommentsManager"/>
     <property name="minMaxDataElementService"
       ref="org.hisp.dhis.minmax.MinMaxDataElementService"/>
     <property name="selectedStateManager"
       ref="org.hisp.dhis.den.state.SelectedStateManager"/>
-     <property name="sectionService"
-      ref="org.hisp.dhis.dataset.SectionService"/>    
   </bean>
 	
   
@@ -227,22 +219,7 @@
     <property name="dataElementService"
       ref="org.hisp.dhis.dataelement.DataElementService"/>
   </bean>
-  
-  <bean id="org.hisp.dhis.den.action.CalculateCDEsAction"
-    class="org.hisp.dhis.den.action.CalculateCDEsAction"
-    scope="prototype">
-    <property name="expressionService"
-      ref="org.hisp.dhis.expression.ExpressionService"/>
-    <property name="dataElementService"
-      ref="org.hisp.dhis.dataelement.DataElementService"/>
-    <property name="selectedStateManager"
-      ref="org.hisp.dhis.den.state.SelectedStateManager"/>
-    <property name="statefulDataValueSaver"
-      ref="org.hisp.dhis.den.state.StatefulDataValueSaver"/>
-	<property name="dataElementCategoryComboService"
-      ref="org.hisp.dhis.dataelement.DataElementCategoryComboService"/>      
-  </bean>
-    
+      
   <bean id="org.hisp.dhis.den.action.HistoryAction"
     class="org.hisp.dhis.den.action.HistoryAction" scope="prototype">
     <property name="historyRetriever">

=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml'
--- local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml	2011-01-25 09:06:55 +0000
+++ local/in/dhis-web-dataentry-linelisting/src/main/resources/struts.xml	2011-04-27 17:15:13 +0000
@@ -120,15 +120,7 @@
       <param name="onExceptionReturn">plainTextError</param>
       <param name="requiredAuthorities">F_DATAELEMENT_MINMAX_DELETE</param>
     </action>
-    
-    <action name="calculateCDEs"
-      class="org.hisp.dhis.den.action.CalculateCDEsAction">
-      <!--<interceptor-ref name="transactionStack"/>-->
-      <result name="success" type="velocity">responseCalculateCDEs.vm</result>
-      <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_DATAVALUE_ADD,F_DATAVALUE_UPDATE,F_DATAVALUE_DELETE</param>
-    </action>
-        
+            
     <action name="viewHistory" class="org.hisp.dhis.den.action.HistoryAction">
       <!--<interceptor-ref name="transactionStack"/>-->
       <result name="success" type="velocity">/popup.vm</result>

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/TwentyPoint/action/GenerateTwentyPointReportsFromAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/TwentyPoint/action/GenerateTwentyPointReportsFromAction.java	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/TwentyPoint/action/GenerateTwentyPointReportsFromAction.java	2011-04-27 17:15:13 +0000
@@ -18,7 +18,6 @@
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.period.comparator.PeriodComparator;
-import org.hisp.dhis.report.Report;
 import org.hisp.dhis.reports.Report_in;
 import org.hisp.dhis.reports.util.ReportService;
 import org.w3c.dom.Document;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddMultipleUserAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddMultipleUserAction.java	2011-04-15 11:39:32 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddMultipleUserAction.java	2011-04-27 17:15:13 +0000
@@ -89,7 +89,7 @@
             Set<OrganisationUnit> orgUnits = new HashSet<OrganisationUnit>();
             orgUnits.add( orgUId );
             
-            Collection<User> tempUserList = userStore.getUsersByOrganisationUnit( orgUId );
+            Collection<User> tempUserList = orgUId.getUsers();
             
             int flag = 0;
             if ( tempUserList != null )

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java	2010-12-22 07:29:08 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java	2011-04-27 17:15:13 +0000
@@ -85,7 +85,7 @@
 
                 username = username.trim();
 
-                Collection<User> tempUserList = userStore.getUsersByOrganisationUnit( orgU );
+                Collection<User> tempUserList = orgU.getUsers();
 
                 int flag = 0;
                 if ( tempUserList != null )

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetNationalIndicatorReportsAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetNationalIndicatorReportsAction.java	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetNationalIndicatorReportsAction.java	2011-04-27 17:15:13 +0000
@@ -1,13 +1,11 @@
 package org.hisp.dhis.reports.action;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.hisp.dhis.report.Report;
 import org.hisp.dhis.reports.Report_in;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetProgressReportsAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetProgressReportsAction.java	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetProgressReportsAction.java	2011-04-27 17:15:13 +0000
@@ -1,13 +1,11 @@
 package org.hisp.dhis.reports.action;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.hisp.dhis.report.Report;
 import org.hisp.dhis.reports.Report_in;
 import org.hisp.dhis.reports.util.ReportService;
 import org.w3c.dom.Document;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportResultAction.java	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportResultAction.java	2011-04-27 17:15:13 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.reports.ReportService;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.util.comparator.PeriodStartDateComparator;
 
 import com.opensymphony.xwork2.Action;
@@ -131,7 +130,7 @@
 
     private DataSet dataSet;
 
-    private Set<Source> dSetSource;
+    private Set<OrganisationUnit> dSetSource;
 
     private List<Period> periods;
 
@@ -310,7 +309,7 @@
                 for ( Period periodElement : periods )
                 {
                     DataSetLock dataSetLock = dataSetLockService.getDataSetLockByDataSetPeriodAndSource( dataSet,
-                        periodElement, (Source) organisationUnit );
+                        periodElement, organisationUnit );
                     if ( dataSetLock != null )
                     {
                         sheet0.addCell( new Number( colStart
@@ -383,7 +382,7 @@
                 for ( Period periodElement : periods )
                 {
                     DataSetLock dataSetLock = dataSetLockService.getDataSetLockByDataSetPeriodAndSource( dataSet,
-                        periodElement, (Source) organisationUnit );
+                        periodElement, organisationUnit );
                     if ( dataSetLock != null )
                     {
                         sheet0.addCell( new Number( colStart

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsFormAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsFormAction.java	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsFormAction.java	2011-04-27 17:15:13 +0000
@@ -41,7 +41,6 @@
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.report.Report;
 import org.hisp.dhis.reports.Report_in;
 import org.hisp.dhis.reports.util.ReportService;
 import org.w3c.dom.Document;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsResultAction.java	2010-12-29 16:17:28 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/orgunitgroupsetreport/action/GenerateOrgunitGroupsetReportsResultAction.java	2011-04-27 17:15:13 +0000
@@ -26,7 +26,6 @@
  */
 package org.hisp.dhis.reports.orgunitgroupsetreport.action;
 
-
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java	2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java	2011-04-27 17:15:13 +0000
@@ -8,19 +8,19 @@
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
 import org.hisp.dhis.reports.ReportService;
 import org.hisp.dhis.reports.Report_in;
-import org.hisp.dhis.source.Source;
 
 import com.opensymphony.xwork2.Action;
 
 /**
  * @author Kristian
- * @version $Id: DefineReportAssociationsAction.java 3648 2007-10-15 22:47:45Z larshelg $
+ * @version $Id: DefineReportAssociationsAction.java 3648 2007-10-15 22:47:45Z
+ *          larshelg $
  */
 public class DefineReportAssociationsAction
     implements Action
 {
 
-        // -------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
 
@@ -33,21 +33,21 @@
 
     private ReportService reportService;
 
-        public void setReportService(ReportService reportService) 
-        {
-                this.reportService = reportService;
-        }
- 
-    // -------------------------------------------------------------------------
-    //  Input/Output Getters & setters
-    // -------------------------------------------------------------------------
-
-        private int reportId;
-    
-        public void setReportId(int reportId) 
-        {
-                this.reportId = reportId;
-        }
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input/Output Getters & setters
+    // -------------------------------------------------------------------------
+
+    private int reportId;
+
+    public void setReportId( int reportId )
+    {
+        this.reportId = reportId;
+    }
 
     // -------------------------------------------------------------------------
     // ActionSupport implementation
@@ -56,27 +56,26 @@
     public String execute()
         throws Exception
     {
-        
-        Collection<OrganisationUnit> rootUnits = selectionTreeManager.getRootOrganisationUnits(); 
-        
-        Set<OrganisationUnit> unitsInTheTree = new HashSet<OrganisationUnit>();        
-        
-        getUnitsInTheTree( rootUnits, unitsInTheTree );          
-        
-        Report_in report = reportService.getReport( reportId );         
-        
-        Set<Source> assignedSources = report.getSources();
-        
-        assignedSources.removeAll( convert( unitsInTheTree ) );        
+        Collection<OrganisationUnit> rootUnits = selectionTreeManager.getRootOrganisationUnits();
+
+        Set<OrganisationUnit> unitsInTheTree = new HashSet<OrganisationUnit>();
+
+        getUnitsInTheTree( rootUnits, unitsInTheTree );
+
+        Report_in report = reportService.getReport( reportId );
+
+        Set<OrganisationUnit> assignedSources = report.getSources();
+
+        assignedSources.removeAll( unitsInTheTree );
 
         Collection<OrganisationUnit> selectedOrganisationUnits = selectionTreeManager.getSelectedOrganisationUnits();
-        
-        assignedSources.addAll( convert( selectedOrganisationUnits ) );         
-        
+
+        assignedSources.addAll( selectedOrganisationUnits );
+
         report.setSources( assignedSources );
-        
+
         reportService.updateReport( report );
-        
+
         return SUCCESS;
     }
 
@@ -84,22 +83,12 @@
     // Supportive methods
     // -------------------------------------------------------------------------
 
-    private Set<Source> convert( Collection<OrganisationUnit> organisationUnits )
-    {
-        Set<Source> sources = new HashSet<Source>();
-        
-        sources.addAll( organisationUnits );
-        
-        return sources;
-    }   
-    
     private void getUnitsInTheTree( Collection<OrganisationUnit> rootUnits, Set<OrganisationUnit> unitsInTheTree )
     {
-        for( OrganisationUnit root : rootUnits )
+        for ( OrganisationUnit root : rootUnits )
         {
-                unitsInTheTree.add( root );
-                getUnitsInTheTree( root.getChildren(), unitsInTheTree );                
+            unitsInTheTree.add( root );
+            getUnitsInTheTree( root.getChildren(), unitsInTheTree );
         }
     }
 }
-

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java	2010-08-19 10:40:50 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java	2011-04-27 17:15:13 +0000
@@ -8,7 +8,6 @@
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
 import org.hisp.dhis.reports.ReportService;
 import org.hisp.dhis.reports.Report_in;
-import org.hisp.dhis.source.Source;
 
 import com.opensymphony.xwork2.Action;
 
@@ -66,25 +65,9 @@
     {
         report = reportService.getReport( reportId );
 
-        selectionTreeManager.setSelectedOrganisationUnits( convert( report.getSources() ) );
+        selectionTreeManager.setSelectedOrganisationUnits( report.getSources() );
 
         return SUCCESS;
     }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private Set<OrganisationUnit> convert( Collection<Source> sources )
-    {
-        Set<OrganisationUnit> organisationUnits = new HashSet<OrganisationUnit>();
-
-        for ( Source source : sources )
-        {
-            organisationUnits.add( (OrganisationUnit) source );
-        }
-
-        return organisationUnits;
-    }
 }
 

=== modified file 'local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/DefineDeTargetAssociationsAction.java'
--- local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/DefineDeTargetAssociationsAction.java	2011-01-17 07:45:29 +0000
+++ local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/DefineDeTargetAssociationsAction.java	2011-04-27 17:15:13 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.source.Source;
 
 import com.opensymphony.xwork2.Action;
 
@@ -96,19 +95,17 @@
         
         Set<OrganisationUnit> unitsInTheTree = new HashSet<OrganisationUnit>();        
         
-        organisationUnitService.getUnitsInTheTree( rootUnits, unitsInTheTree );          
-        
         DeTarget deTarget = deTargetService.getDeTarget( deTargetId );            
         
         System.out.println( " DeTarget Id : "  + deTarget.getId() + " DETarget Name "  + deTarget.getName() );
         
-        Set<Source> assignedSources = deTarget.getSources();
+        Set<OrganisationUnit> assignedSources = deTarget.getSources();
         
-        assignedSources.removeAll( convert( unitsInTheTree ) );        
+        assignedSources.removeAll( unitsInTheTree );        
 
         Collection<OrganisationUnit> selectedOrganisationUnits = selectionTreeManager.getReloadedSelectedOrganisationUnits();
         
-        assignedSources.addAll( organisationUnitService.convert( selectedOrganisationUnits ) );         
+        assignedSources.addAll( selectedOrganisationUnits );         
         
         deTarget.setSources( assignedSources );
         
@@ -118,27 +115,5 @@
         
         return SUCCESS;
     }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private Set<Source> convert( Collection<OrganisationUnit> organisationUnits )
-    {
-        Set<Source> sources = new HashSet<Source>();
-        
-        sources.addAll( organisationUnits );
-        
-        return sources;
-    }   
- /*   
-    private void getUnitsInTheTree( Collection<OrganisationUnit> rootUnits, Set<OrganisationUnit> unitsInTheTree )
-    {
-        for( OrganisationUnit root : rootUnits )
-        {
-                unitsInTheTree.add( root );
-                getUnitsInTheTree( root.getChildren(), unitsInTheTree );                
-        }
-    }*/
 }
 

=== modified file 'local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/SetupAssociationsTreeAction.java'
--- local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/SetupAssociationsTreeAction.java	2011-01-17 07:45:29 +0000
+++ local/in/dhis-web-survey/src/main/java/org/hisp/dhis/detarget/action/SetupAssociationsTreeAction.java	2011-04-27 17:15:13 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.detarget.DeTargetService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.source.Source;
 
 import com.opensymphony.xwork2.Action;
 
@@ -100,31 +99,13 @@
     // Execute
     // -------------------------------------------------------------------------
 
-
-
     public String execute() throws Exception
     {
         deTarget = deTargetService.getDeTarget( deTargetId );
         
-        selectionTreeManager.setSelectedOrganisationUnits( convert( deTarget.getSources() ) );
+        selectionTreeManager.setSelectedOrganisationUnits( deTarget.getSources() );
 
         return SUCCESS;
     }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private Set<OrganisationUnit> convert( Collection<Source> sources )
-    {
-        Set<OrganisationUnit> organisationUnits = new HashSet<OrganisationUnit>();
-        
-        for ( Source source : sources )
-        {               
-            organisationUnits.add( (OrganisationUnit) source );
-        }       
-        
-        return organisationUnits;
-    }
 }
 

=== modified file 'local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/DefineSurveyAssociationsAction.java'
--- local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/DefineSurveyAssociationsAction.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/DefineSurveyAssociationsAction.java	2011-04-27 17:15:13 +0000
@@ -33,7 +33,6 @@
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.survey.Survey;
 import org.hisp.dhis.survey.SurveyService;
 
@@ -91,13 +90,13 @@
 	
         Survey survey = surveyService.getSurvey( surveyId );    	
     	
-    	Set<Source> assignedSources = survey.getSources();
+    	Set<OrganisationUnit> assignedSources = survey.getSources();
     	
-    	assignedSources.removeAll( convert( unitsInTheTree ) );        
+    	assignedSources.removeAll( unitsInTheTree );        
 
     	Collection<OrganisationUnit> selectedOrganisationUnits = selectionTreeManager.getSelectedOrganisationUnits();
     	
-    	assignedSources.addAll( convert( selectedOrganisationUnits ) );  	
+    	assignedSources.addAll( selectedOrganisationUnits );  	
     	
     	survey.setSources( assignedSources );
     	
@@ -109,15 +108,6 @@
     // -------------------------------------------------------------------------
     // Supportive methods
     // -------------------------------------------------------------------------
-
-    private Set<Source> convert( Collection<OrganisationUnit> organisationUnits )
-    {
-        Set<Source> sources = new HashSet<Source>();
-        
-        sources.addAll( organisationUnits );
-        
-        return sources;
-    }   
     
     private void getUnitsInTheTree( Collection<OrganisationUnit> rootUnits, Set<OrganisationUnit> unitsInTheTree )
     {

=== modified file 'local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/SetupAssociationsTreeAction.java'
--- local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/SetupAssociationsTreeAction.java	2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-survey/src/main/java/org/hisp/dhis/survey/action/SetupAssociationsTreeAction.java	2011-04-27 17:15:13 +0000
@@ -27,13 +27,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.source.Source;
 import org.hisp.dhis.survey.Survey;
 import org.hisp.dhis.survey.SurveyService;
 
@@ -96,24 +90,8 @@
     {
     	survey = surveyService.getSurvey( surveyId );
         
-        selectionTreeManager.setSelectedOrganisationUnits( convert( survey.getSources() ) );
+        selectionTreeManager.setSelectedOrganisationUnits( survey.getSources() );
 
         return SUCCESS;
     }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private Set<OrganisationUnit> convert( Collection<Source> sources )
-    {
-        Set<OrganisationUnit> organisationUnits = new HashSet<OrganisationUnit>();
-        
-        for ( Source source : sources )
-        {        	
-            organisationUnits.add( (OrganisationUnit) source );
-        }       
-        
-        return organisationUnits;
-    }
 }