← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1841: Core objects extending IdentifiableObject

 

------------------------------------------------------------
revno: 1841
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Wed 2010-05-12 14:01:42 +0200
message:
  Core objects extending IdentifiableObject
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/olap/OlapURL.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRule.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRuleGroup.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/datadictionary/DataDictionary.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java	2010-05-12 12:01:42 +0000
@@ -27,10 +27,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.indicator.Indicator;
 
@@ -39,12 +39,8 @@
  * @version $Id$
  */
 public class DataDictionary
-    implements Serializable
+    extends IdentifiableObject
 {
-    private int id;
-    
-    private String name;
-    
     private String description;
     
     private String region;
@@ -105,26 +101,6 @@
     // Set and get methods
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-    
     public String getDescription()
     {
         return description;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java	2010-05-12 12:01:42 +0000
@@ -27,22 +27,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
+import org.hisp.dhis.common.IdentifiableObject;
 
 /**
  * @author Lars Helge Overland
  * @version $Id: IndicatorType.java 5296 2008-05-29 16:06:14Z larshelg $
  */
 public class IndicatorType
-    implements Serializable
+    extends IdentifiableObject
 {
-    private int id;
-
-    /**
-     * Required and unique.
-     */
-    private String name;
-
     private int factor;
 
     // -------------------------------------------------------------------------
@@ -102,26 +95,6 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public int getFactor()
     {
         return factor;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/olap/OlapURL.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/olap/OlapURL.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/olap/OlapURL.java	2010-05-12 12:01:42 +0000
@@ -23,19 +23,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
+import org.hisp.dhis.common.IdentifiableObject;
 
 /**
  * @author Lars Helge Overland
  * @version $Id$
  */
 public class OlapURL
-    implements Serializable
+    extends IdentifiableObject
 {
-    private int id;
-
-    private String name;
-
     private String url;
 
     // -------------------------------------------------------------------------
@@ -119,26 +115,6 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public String getUrl()
     {
         return url;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java	2010-05-12 12:01:42 +0000
@@ -27,10 +27,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.dimension.Dimension;
 import org.hisp.dhis.dimension.DimensionOption;
 import org.hisp.dhis.dimension.DimensionOptionElement;
@@ -42,17 +42,8 @@
  */
 
 public class OrganisationUnitGroup
-    implements DimensionOption, Serializable
+    extends IdentifiableObject implements DimensionOption
 {
-    private int id;
-    
-    private String uuid;
-    
-    /**
-     * Required and unique.
-     */
-    private String name;
-
     private Set<OrganisationUnit> members = new HashSet<OrganisationUnit>();
     
     private OrganisationUnitGroupSet groupSet;
@@ -132,36 +123,6 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getUuid()
-    {
-        return uuid;
-    }
-
-    public void setUuid( String uuid )
-    {
-        this.uuid = uuid;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public Set<OrganisationUnit> getMembers()
     {
         return members;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java	2010-05-12 12:01:42 +0000
@@ -43,10 +43,6 @@
 public class OrganisationUnitGroupSet
     extends Dimension
 {
-    private int id;
-
-    private String name;
-
     private String description;
 
     private Set<OrganisationUnitGroup> organisationUnitGroups = new HashSet<OrganisationUnitGroup>();
@@ -154,26 +150,6 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public String getDescription()
     {
         return description;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java	2010-05-12 12:01:42 +0000
@@ -27,21 +27,17 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
+import org.hisp.dhis.common.IdentifiableObject;
 
 /**
  * @author Lars Helge Overland
  * @version $Id$
  */
 public class OrganisationUnitLevel
-    implements Serializable
+    extends IdentifiableObject
 {
-    private int id;
-    
     private int level;
     
-    private String name;
-
     // -------------------------------------------------------------------------
     // Constructors
     // -------------------------------------------------------------------------
@@ -100,16 +96,6 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
     public int getLevel()
     {
         return level;
@@ -119,14 +105,4 @@
     {
         this.level = level;
     }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2010-04-29 16:13:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2010-05-12 12:01:42 +0000
@@ -27,7 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -58,7 +57,7 @@
  * @version $Id$
  */
 public class ReportTable
-    implements Serializable
+    extends IdentifiableObject
 {
     public static final String DATAELEMENT_ID = "dataelementid";
     public static final String DATAELEMENT_NAME = "dataelementname";
@@ -98,16 +97,6 @@
     // -------------------------------------------------------------------------
 
     /**
-     * The internal identifier.
-     */
-    private int id;
-    
-    /**
-     * The name of the ReportTable object.
-     */
-    private String name;
-
-    /**
      * The name of the database table corresponding to the ReportTable object name.
      */
     private String tableName;
@@ -1057,26 +1046,6 @@
     // Get- and set-methods for persisted properties
     // -------------------------------------------------------------------------
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-    
-    public String getName()
-    {
-        return name;
-    }
-    
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public String getTableName()
     {
         return tableName;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRule.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRule.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRule.java	2010-05-12 12:01:42 +0000
@@ -27,12 +27,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
+import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.expression.Expression;
 
 /**
@@ -40,7 +40,7 @@
  * @version $Id: ValidationRule.java 5434 2008-06-18 18:57:59Z larshelg $
  */
 public class ValidationRule
-    implements Serializable
+    extends IdentifiableObject
 {
     public static final String TYPE_STATISTICAL = "statistical";
     public static final String TYPE_ABSOLUTE = "absolute";
@@ -54,10 +54,6 @@
     
     private static Map<String, String> operatorMap = new HashMap<String, String>();
     
-    private int id;
-    
-    private String name;
-    
     private String description;
     
     private String type;
@@ -134,26 +130,6 @@
     // Set and get methods
     // -------------------------------------------------------------------------  
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public String getDescription()
     {
         return description;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRuleGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRuleGroup.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRuleGroup.java	2010-05-12 12:01:42 +0000
@@ -27,21 +27,18 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.common.IdentifiableObject;
+
 /**
  * @author Lars Helge Overland
  * @version $Id$
  */
 public class ValidationRuleGroup
-    implements Serializable
+    extends IdentifiableObject
 {
-    private int id;
-    
-    private String name;
-    
     private String description;
     
     private Set<ValidationRule> members = new HashSet<ValidationRule>();
@@ -100,26 +97,6 @@
     // Getters and setters
     // -------------------------------------------------------------------------     
 
-    public int getId()
-    {
-        return id;
-    }
-
-    public void setId( int id )
-    {
-        this.id = id;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
     public String getDescription()
     {
         return description;