← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1492: Changed MapView.zoom from int to Integer. Cannot add primitive properties to existing objects, ca...

 

------------------------------------------------------------
revno: 1492
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-02-24 18:50:17 +0100
message:
  Changed MapView.zoom from int to Integer. Cannot add primitive properties to existing objects, causes havoc from Hibernate when the application starts
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.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/MapView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java	2010-02-24 14:11:32 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java	2010-02-24 17:50:17 +0000
@@ -39,45 +39,48 @@
 public class MapView
 {
     public static final String MAP_SOURCE_TYPE_DATABASE = "database";
+
     public static final String MAP_SOURCE_TYPE_GEOJSON = "geojson";
+
     public static final String MAP_SOURCE_TYPE_SHAPEFILE = "shapefile";
 
     private int id;
 
     private String name;
-    
+
     private IndicatorGroup indicatorGroup;
-    
+
     private Indicator indicator;
-    
+
     private PeriodType periodType;
-    
+
     private Period period;
-    
+
     private String mapSourceType;
-    
+
     private String mapSource;
-    
+
     private int method;
-    
+
     private int classes;
-    
+
     private String colorLow;
-    
+
     private String colorHigh;
-    
+
     private String longitude;
-    
+
     private String latitude;
-    
-    private int zoom;
-    
+
+    private Integer zoom;
+
     public MapView()
     {
     }
 
-    public MapView( String name, IndicatorGroup indicatorGroup, Indicator indicator, PeriodType periodType, Period period, String mapSourceType, String mapSource,
-        int method, int classes, String colorLow, String colorHigh, String longitude, String latitude, int zoom )
+    public MapView( String name, IndicatorGroup indicatorGroup, Indicator indicator, PeriodType periodType,
+        Period period, String mapSourceType, String mapSource, int method, int classes, String colorLow,
+        String colorHigh, String longitude, String latitude, int zoom )
     {
         this.name = name;
         this.indicatorGroup = indicatorGroup;
@@ -93,13 +96,13 @@
         this.longitude = longitude;
         this.latitude = latitude;
         this.zoom = zoom;
-        
+
     }
-    
+
     // -------------------------------------------------------------------------
     // hashCode, equals and toString
     // -------------------------------------------------------------------------
-    
+
     @Override
     public int hashCode()
     {
@@ -113,22 +116,22 @@
         {
             return true;
         }
-        
+
         if ( object == null )
         {
             return false;
         }
-        
+
         if ( getClass() != object.getClass() )
         {
             return false;
         }
-        
+
         final MapView other = (MapView) object;
-        
+
         return name.equals( other.name );
     }
-    
+
     // -------------------------------------------------------------------------
     // Getters and setters
     // -------------------------------------------------------------------------
@@ -202,7 +205,7 @@
     {
         this.mapSourceType = mapSourceType;
     }
-    
+
     public String getMapSource()
     {
         return mapSource;
@@ -253,27 +256,33 @@
         this.colorHigh = colorHigh;
     }
 
-	public String getLongitude() {
-		return longitude;
-	}
-
-	public void setLongitude(String longitude) {
-		this.longitude = longitude;
-	}
-
-	public String getLatitude() {
-		return latitude;
-	}
-
-	public void setLatitude(String latitude) {
-		this.latitude = latitude;
-	}
-
-	public int getZoom() {
-		return zoom;
-	}
-
-	public void setZoom(int zoom) {
-		this.zoom = zoom;
-	}
-}
\ No newline at end of file
+    public String getLongitude()
+    {
+        return longitude;
+    }
+
+    public void setLongitude( String longitude )
+    {
+        this.longitude = longitude;
+    }
+
+    public String getLatitude()
+    {
+        return latitude;
+    }
+
+    public void setLatitude( String latitude )
+    {
+        this.latitude = latitude;
+    }
+
+    public Integer getZoom()
+    {
+        return zoom;
+    }
+
+    public void setZoom( Integer zoom )
+    {
+        this.zoom = zoom;
+    }
+}