← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 937: Added periodType property to ExcelItemGroup to solve compilation error.

 

------------------------------------------------------------
revno: 937
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-10-30 14:04:40 +0100
message:
  Added periodType property to ExcelItemGroup to solve compilation error.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.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/reportexcel/excelitem/ExcelItemGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java	2009-10-29 05:21:01 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/excelitem/ExcelItemGroup.java	2009-10-30 13:04:40 +0000
@@ -32,152 +32,184 @@
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reportexcel.DataElementGroupOrder;
 
 /**
  * @author Chau Thu Tran
  * @version $Id$
  */
-public class ExcelItemGroup {
-	private int id;
-
-	private String name;
-
-	private Set<ExcelItem> excelItems;
-
-	private String excelTemplateFile;
-
-	private String type;
-
-	private Set<OrganisationUnit> organisationAssocitions;
-
-	private List<OrganisationUnitGroup> organisationUnitGroups;
-	
-	private List<DataElementGroupOrder> dataElementOrders;
-
-	// ----------------------------------------------------------------------
-	// Constructors
-	// ----------------------------------------------------------------------
-
-	public ExcelItemGroup() {
-
-	}
-
-	// -------------------------------------------------------------------------
-	// Internal classes
-	// -------------------------------------------------------------------------
-
-	public static class TYPE {
-		public static final String NORMAL = "NORMAL";
-
-		public static final String CATEGORY = "CATEGORY";
-
-		public static final String PERIOD_COLUMN_LISTING = "PERIOD_COLUMN_LISTING";
-
-		public static final String ORGANIZATION_GROUP_LISTING = "ORGANIZATION_GROUP_LISTING";
-	}
-
-	// -------------------------------------------------------------------------
-	// hashCode and equals
-	// -------------------------------------------------------------------------
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + name.hashCode();
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		ExcelItemGroup other = (ExcelItemGroup) obj;
-		if (name != other.name)
-			return false;
-		return true;
-	}
-
-	// ----------------------------------------------------------------------
-	// Getters and setters
-	// ----------------------------------------------------------------------
-
-	public int getId() {
-		return id;
-	}
-
-	public List<DataElementGroupOrder> getDataElementOrders() {
-		return dataElementOrders;
-	}
-
-	public void setDataElementOrders(List<DataElementGroupOrder> dataElementOrders) {
-		this.dataElementOrders = dataElementOrders;
-	}
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public void setId(int id) {
-		this.id = id;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public List<OrganisationUnitGroup> getOrganisationUnitGroups() {
-		return organisationUnitGroups;
-	}
-
-	public void setOrganisationUnitGroups(
-			List<OrganisationUnitGroup> organisationUnitGroups) {
-		this.organisationUnitGroups = organisationUnitGroups;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getExcelTemplateFile() {
-		return excelTemplateFile;
-	}
-
-	public void setExcelTemplateFile(String excelTemplateFile) {
-		this.excelTemplateFile = excelTemplateFile;
-	}
-
-	public Set<ExcelItem> getExcelItems() {
-		return excelItems;
-	}
-
-	public void setExcelItems(Set<ExcelItem> excelItems) {
-		this.excelItems = excelItems;
-	}
-
-	public Set<OrganisationUnit> getOrganisationAssocitions() {
-		return organisationAssocitions;
-	}
-
-	public void setOrganisationAssocitions(
-			Set<OrganisationUnit> organisationAssocitions) {
-		this.organisationAssocitions = organisationAssocitions;
-	}
-	
-	// ----------------------------------------------------------------------
-	// getType
-	// ----------------------------------------------------------------------
-
-	public boolean isCategory()
+public class ExcelItemGroup
+{
+    private int id;
+
+    private String name;
+
+    private Set<ExcelItem> excelItems;
+
+    private String excelTemplateFile;
+
+    private String type;
+
+    private Set<OrganisationUnit> organisationAssocitions;
+
+    private List<OrganisationUnitGroup> organisationUnitGroups;
+
+    private List<DataElementGroupOrder> dataElementOrders;
+    
+    private PeriodType periodType;
+
+    // ----------------------------------------------------------------------
+    // Constructors
+    // ----------------------------------------------------------------------
+
+    public ExcelItemGroup()
+    {
+
+    }
+
+    // -------------------------------------------------------------------------
+    // Internal classes
+    // -------------------------------------------------------------------------
+
+    public static class TYPE
+    {
+        public static final String NORMAL = "NORMAL";
+
+        public static final String CATEGORY = "CATEGORY";
+
+        public static final String PERIOD_COLUMN_LISTING = "PERIOD_COLUMN_LISTING";
+
+        public static final String ORGANIZATION_GROUP_LISTING = "ORGANIZATION_GROUP_LISTING";
+    }
+
+    // -------------------------------------------------------------------------
+    // hashCode and equals
+    // -------------------------------------------------------------------------
+
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + name.hashCode();
+        return result;
+    }
+
+    @Override
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+            return true;
+        if ( obj == null )
+            return false;
+        if ( getClass() != obj.getClass() )
+            return false;
+        ExcelItemGroup other = (ExcelItemGroup) obj;
+        if ( name != other.name )
+            return false;
+        return true;
+    }
+
+    // ----------------------------------------------------------------------
+    // Getters and setters
+    // ----------------------------------------------------------------------
+
+    public int getId()
+    {
+        return id;
+    }
+
+    public List<DataElementGroupOrder> getDataElementOrders()
+    {
+        return dataElementOrders;
+    }
+
+    public void setDataElementOrders( List<DataElementGroupOrder> dataElementOrders )
+    {
+        this.dataElementOrders = dataElementOrders;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
+    public void setId( int id )
+    {
+        this.id = id;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public List<OrganisationUnitGroup> getOrganisationUnitGroups()
+    {
+        return organisationUnitGroups;
+    }
+
+    public void setOrganisationUnitGroups( List<OrganisationUnitGroup> organisationUnitGroups )
+    {
+        this.organisationUnitGroups = organisationUnitGroups;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getExcelTemplateFile()
+    {
+        return excelTemplateFile;
+    }
+
+    public void setExcelTemplateFile( String excelTemplateFile )
+    {
+        this.excelTemplateFile = excelTemplateFile;
+    }
+
+    public Set<ExcelItem> getExcelItems()
+    {
+        return excelItems;
+    }
+
+    public void setExcelItems( Set<ExcelItem> excelItems )
+    {
+        this.excelItems = excelItems;
+    }
+
+    public Set<OrganisationUnit> getOrganisationAssocitions()
+    {
+        return organisationAssocitions;
+    }
+
+    public void setOrganisationAssocitions( Set<OrganisationUnit> organisationAssocitions )
+    {
+        this.organisationAssocitions = organisationAssocitions;
+    }
+
+    public PeriodType getPeriodType()
+    {
+        return periodType;
+    }
+
+    public void setPeriodType( PeriodType periodType )
+    {
+        this.periodType = periodType;
+    }
+
+    // ----------------------------------------------------------------------
+    // getType
+    // ----------------------------------------------------------------------
+
+    public boolean isCategory()
     {
         return this.getType().equalsIgnoreCase( TYPE.CATEGORY );
     }
@@ -196,5 +228,4 @@
     {
         return this.getType().equalsIgnoreCase( TYPE.NORMAL );
     }
-
 }