← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 606: (GIS) Removed Map.uniqueColumn property.

 

------------------------------------------------------------
revno: 606
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Sun 2009-09-06 13:01:03 +0200
message:
  (GIS) Removed Map.uniqueColumn property.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Map.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java
  dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
  dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/Map.hbm.xml
  dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapSourceTypeUserSettingAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Map.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Map.java	2009-07-06 21:46:06 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Map.java	2009-09-06 11:01:03 +0000
@@ -50,8 +50,6 @@
 
     private OrganisationUnitLevel organisationUnitLevel;
 
-    private String uniqueColumn;
-
     private String nameColumn;
     
     private String longitude;
@@ -67,14 +65,13 @@
     }
 
     public Map( String name, String mapLayerPath, String type, OrganisationUnit organisationUnit, OrganisationUnitLevel organisationUnitLevel, 
-        String uniqueColumn, String nameColumn, String longitude, String latitude, int zoom, Set<String> staticMapLayerPaths )
+        String nameColumn, String longitude, String latitude, int zoom, Set<String> staticMapLayerPaths )
     {
         this.name = name;
         this.mapLayerPath = mapLayerPath;
         this.type = type;
         this.organisationUnit = organisationUnit;
         this.organisationUnitLevel = organisationUnitLevel;
-        this.uniqueColumn = uniqueColumn;
         this.nameColumn = nameColumn;
         this.longitude = longitude;
         this.latitude = latitude;
@@ -179,16 +176,6 @@
         this.organisationUnitLevel = organisationUnitLevel;
     }
 
-    public String getUniqueColumn()
-    {
-        return uniqueColumn;
-    }
-
-    public void setUniqueColumn( String uniqueColumn )
-    {
-        this.uniqueColumn = uniqueColumn;
-    }
-
     public String getNameColumn()
     {
         return nameColumn;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java	2009-09-05 16:19:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingService.java	2009-09-06 11:01:03 +0000
@@ -76,7 +76,7 @@
      * @return a generated unique id of the added Map.
      */
     int addMap( String name, String mapLayerPath, String type, int organisationUnitId, int organisationUnitLevelId,
-        String uniqueColumn, String nameColumn, String longitude, String latitude, int zoom );
+        String nameColumn, String longitude, String latitude, int zoom );
 
     /**
      * Adds a map. If a map with the same mapLayerPath already exists, the map
@@ -88,8 +88,6 @@
      * @param organisationUnitId, the id of the organisation unit.
      * @param organisationUnitLevelId, the level of the organisation units into
      *        which the map is devided.
-     * @param uniqueColumn, the shapefile column which holds the unique
-     *        organisation unit value.
      * @param nameColumn, the shapefile column which holds the name of the
      *        organisation unit.
      * @param longitude
@@ -97,7 +95,7 @@
      * @param zoom
      */
     void addOrUpdateMap( String name, String mapLayerPath, String type, int organisationUnitId,
-        int organisationUnitLevelId, String uniqueColumn, String nameColumn, String longitude, String latitude, int zoom );
+        int organisationUnitLevelId, String nameColumn, String longitude, String latitude, int zoom );
 
     /**
      * Updates a Map.

=== modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2009-09-06 10:39:18 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2009-09-06 11:01:03 +0000
@@ -27,6 +27,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.system.util.MathUtils.isNumeric;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -48,8 +50,6 @@
 import org.hisp.dhis.user.UserSettingService;
 import org.springframework.transaction.annotation.Transactional;
 
-import static org.hisp.dhis.system.util.MathUtils.isNumeric;
-
 /**
  * @author Jan Henrik Overland
  * @version $Id$
@@ -116,7 +116,7 @@
     }
 
     public int addMap( String name, String mapLayerPath, String type, int organisationUnitId,
-        int organisationUnitLevelId, String uniqueColumn, String nameColumn, String longitude, String latitude, int zoom )
+        int organisationUnitLevelId, String nameColumn, String longitude, String latitude, int zoom )
     {
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
 
@@ -125,21 +125,20 @@
 
         Set<String> staticMapLayerPaths = null;
 
-        Map map = new Map( name, mapLayerPath, type, organisationUnit, organisationUnitLevel, uniqueColumn, nameColumn,
+        Map map = new Map( name, mapLayerPath, type, organisationUnit, organisationUnitLevel, nameColumn,
             longitude, latitude, zoom, staticMapLayerPaths );
 
         return addMap( map );
     }
 
     public void addOrUpdateMap( String name, String mapLayerPath, String type, int organisationUnitId,
-        int organisationUnitLevelId, String uniqueColumn, String nameColumn, String longitude, String latitude, int zoom )
+        int organisationUnitLevelId, String nameColumn, String longitude, String latitude, int zoom )
     {
         Map map = getMapByMapLayerPath( mapLayerPath );
 
         if ( map != null )
         {
             map.setName( name );
-            map.setUniqueColumn( uniqueColumn );
             map.setNameColumn( nameColumn );
             map.setLongitude( longitude );
             map.setLatitude( latitude );
@@ -154,7 +153,7 @@
             OrganisationUnitLevel organisationUnitLevel = organisationUnitService
                 .getOrganisationUnitLevel( organisationUnitLevelId );
 
-            map = new Map( name, mapLayerPath, type, organisationUnit, organisationUnitLevel, uniqueColumn, nameColumn,
+            map = new Map( name, mapLayerPath, type, organisationUnit, organisationUnitLevel, nameColumn,
                 longitude, latitude, zoom, null );
 
             addMap( map );

=== modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/Map.hbm.xml'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/Map.hbm.xml	2009-04-28 14:23:39 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/Map.hbm.xml	2009-09-06 11:01:03 +0000
@@ -23,8 +23,6 @@
 		<many-to-one name="organisationUnitLevel" class="org.hisp.dhis.organisationunit.OrganisationUnitLevel" 
 			column="organisationunitlevelid" not-null="true" foreign-key="fk_map_organisationunitlevelid"/>
 			
-		<property name="uniqueColumn" column="uniquecolumn"/>
-		
 		<property name="nameColumn" column="namecolumn"/>
 			
 		<property name="longitude" column="longitude"/>

=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2009-08-18 13:55:55 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2009-09-06 11:01:03 +0000
@@ -741,7 +741,6 @@
         map.setOrganisationUnit( unit );
         map.setOrganisationUnitLevel( level );
         map.setMapLayerPath( "MapLayerPath" + uniqueCharacter );
-        map.setUniqueColumn( "UniqueColumn" + uniqueCharacter );
         map.setNameColumn( "NameColumn" + uniqueCharacter );
         map.setLongitude( "Longitude" + uniqueCharacter );
         map.setLatitude( "Latitude" + uniqueCharacter );

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapAction.java	2009-08-21 08:34:37 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/AddOrUpdateMapAction.java	2009-09-06 11:01:03 +0000
@@ -88,13 +88,6 @@
         this.organisationUnitLevelId = organisationUnitLevelId;
     }
 
-    private String uniqueColumn;
-
-    public void setUniqueColumn( String uniqueColumn )
-    {
-        this.uniqueColumn = uniqueColumn;
-    }
-
     private String nameColumn;
 
     public void setNameColumn( String nameColumn )
@@ -131,7 +124,7 @@
         throws Exception
     {
         mappingService.addOrUpdateMap( name, mapLayerPath, type, organisationUnitId, 
-            organisationUnitLevelId, uniqueColumn, nameColumn, longitude, latitude, zoom );
+            organisationUnitLevelId, nameColumn, longitude, latitude, zoom );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapSourceTypeUserSettingAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapSourceTypeUserSettingAction.java	2009-08-31 15:37:16 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetMapSourceTypeUserSettingAction.java	2009-09-06 11:01:03 +0000
@@ -74,5 +74,4 @@
         
         return SUCCESS;
     }
-
 }