=== 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-28 10:36:18 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2010-04-29 16:13:46 +0000 @@ -37,6 +37,8 @@ import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementCategoryCombo; +import org.hisp.dhis.dataelement.DataElementGroupSet; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dimension.Dimension; import org.hisp.dhis.dimension.DimensionOption; @@ -158,12 +160,12 @@ /** * The DataElementCategoryCombo for the ReportTable. */ - private DimensionSet categoryCombo; + private DataElementCategoryCombo categoryCombo; /** * The DataElementGropSets for the ReportTable. */ - private List dataElementGroupSets = new ArrayList(); + private List dataElementGroupSets = new ArrayList(); /** * Whether to crosstabulate on the Indicator dimension, which also represents DataElements and DataSets. @@ -603,13 +605,14 @@ * Sets the appropriate dimension related properties depending on the dimension * set type. */ + @SuppressWarnings( "unchecked" ) public void setDimensionSet( DimensionSet dimensionSet ) { if ( dimensionSet != null ) { dimensionType = dimensionSet.getDimensionType().name(); - categoryCombo = dimensionType.equals( DimensionType.CATEGORY.name() ) ? dimensionSet : null; - dataElementGroupSets = dimensionType.equals( DimensionType.DATAELEMENTGROUPSET.name() ) ? dimensionSet.getDimensions() : null; + categoryCombo = dimensionType.equals( DimensionType.CATEGORY.name() ) ? (DataElementCategoryCombo)dimensionSet : null; + dataElementGroupSets = dimensionType.equals( DimensionType.DATAELEMENTGROUPSET.name() ) ? (List)dimensionSet.getDimensions() : null; verify( dimensionType != null, "Dimension type cannot be null" ); } @@ -1184,22 +1187,22 @@ this.dimensionType = dimensionType; } - public DimensionSet getCategoryCombo() + public DataElementCategoryCombo getCategoryCombo() { return categoryCombo; } - public void setCategoryCombo( DimensionSet categoryCombo ) + public void setCategoryCombo( DataElementCategoryCombo categoryCombo ) { this.categoryCombo = categoryCombo; } - public List getDataElementGroupSets() + public List getDataElementGroupSets() { return dataElementGroupSets; } - public void setDataElementGroupSets( List dataElementGroupSets ) + public void setDataElementGroupSets( List dataElementGroupSets ) { this.dataElementGroupSets = dataElementGroupSets; }