=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2010-01-22 03:15:07 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2010-01-22 09:23:03 +0000 @@ -163,7 +163,7 @@ * There is no point of saving 0's for this data element default is false * ,we don't want to store 0's if not set to true */ - private boolean zeroIsSignificant; + private Boolean zeroIsSignificant; // ------------------------------------------------------------------------- // Constructors @@ -237,14 +237,12 @@ public DimensionType getDimensionType() { - return null; // DataElement is DimensionOption for the static - // DataElement dimension + return null; // DataElement is DimensionOption for the static DataElement dimension } public Set getDimensionOptionElements() { - return null; // DataElement is DimensionOption for the static - // DataElement dimension + return null; // DataElement is DimensionOption for the static DataElement dimension } public List getDimensionOptions() @@ -258,6 +256,15 @@ } // ------------------------------------------------------------------------- + // Logic + // ------------------------------------------------------------------------- + + public boolean isZeroIsSignificantNullSafe() + { + return zeroIsSignificant != null && zeroIsSignificant; + } + + // ------------------------------------------------------------------------- // hashCode, equals and toString // ------------------------------------------------------------------------- @@ -539,14 +546,13 @@ this.aggregationLevels = aggregationLevels; } - public boolean isZeroIsSignificant() + public Boolean isZeroIsSignificant() { return zeroIsSignificant; } - public void setZeroIsSignificant( boolean zeroIsSignificant ) + public void setZeroIsSignificant( Boolean zeroIsSignificant ) { this.zeroIsSignificant = zeroIsSignificant; } - }