dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14929
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5205: Changed from object type Booleans to primitive type booleans in the domain model. Object types we...
------------------------------------------------------------
revno: 5205
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-11-23 19:07:35 +0100
message:
Changed from object type Booleans to primitive type booleans in the domain model. Object types were used when adding new properties to existing objects to avoid not-null db errors on startup.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/Attribute.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/datavalue/hibernate/DataValue.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/indicator/DefaultIndicatorDataMart.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/hibernate/HibernateChartStore.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/UpdateLockedDataSets.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/chart/Chart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-11-12 18:43:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-11-23 18:07:35 +0000
@@ -101,17 +101,17 @@
private String dimension;
- private Boolean hideLegend;
-
- private Boolean verticalLabels;
-
- private Boolean horizontalPlotOrientation;
-
- private Boolean regression;
-
- private Boolean targetLine;
-
- private Boolean hideSubtitle;
+ private boolean hideLegend;
+
+ private boolean verticalLabels;
+
+ private boolean horizontalPlotOrientation;
+
+ private boolean regression;
+
+ private boolean targetLine;
+
+ private boolean hideSubtitle;
private Double targetLineValue;
@@ -131,7 +131,7 @@
private RelativePeriods relatives;
- private Boolean userOrganisationUnit;
+ private boolean userOrganisationUnit;
// -------------------------------------------------------------------------
// Transient properties
@@ -262,31 +262,6 @@
return this.dimension != null && this.dimension.equals( dimension );
}
- public boolean isHideLegend()
- {
- return hideLegend != null && hideLegend;
- }
-
- public boolean isVerticalLabels()
- {
- return verticalLabels != null && verticalLabels;
- }
-
- public boolean isHorizontalPlotOrientation()
- {
- return horizontalPlotOrientation != null && horizontalPlotOrientation;
- }
-
- public boolean isRegression()
- {
- return regression != null && regression;
- }
-
- public boolean isTargetLine()
- {
- return targetLine != null && targetLine;
- }
-
public int getWidth()
{
return isSize( SIZE_WIDE ) ? 1000 : 700;
@@ -297,11 +272,6 @@
return isSize( SIZE_TALL ) ? 800 : 500;
}
- public boolean isUserOrganisationUnit()
- {
- return userOrganisationUnit != null && userOrganisationUnit;
- }
-
// -------------------------------------------------------------------------
// Importable object
// -------------------------------------------------------------------------
@@ -380,54 +350,59 @@
this.dimension = dimension;
}
- public Boolean getHideLegend()
+ public boolean isHideLegend()
{
return hideLegend;
}
- public void setHideLegend( Boolean hideLegend )
+ public void setHideLegend( boolean hideLegend )
{
this.hideLegend = hideLegend;
}
- public Boolean getVerticalLabels()
+ public boolean isVerticalLabels()
{
return verticalLabels;
}
- public void setVerticalLabels( Boolean verticalLabels )
+ public void setVerticalLabels( boolean verticalLabels )
{
this.verticalLabels = verticalLabels;
}
- public Boolean getHorizontalPlotOrientation()
+ public boolean isHorizontalPlotOrientation()
{
return horizontalPlotOrientation;
}
- public void setHorizontalPlotOrientation( Boolean horizontalPlotOrientation )
+ public void setHorizontalPlotOrientation( boolean horizontalPlotOrientation )
{
this.horizontalPlotOrientation = horizontalPlotOrientation;
}
- public Boolean getRegression()
+ public boolean isRegression()
{
return regression;
}
- public void setRegression( Boolean regression )
+ public void setRegression( boolean regression )
{
this.regression = regression;
}
- public void setTargetLine( Boolean targetLine )
+ public boolean isTargetLine()
+ {
+ return targetLine;
+ }
+
+ public void setTargetLine( boolean targetLine )
{
this.targetLine = targetLine;
}
- public Boolean getTargetLine()
+ public Double getTargetLineValue()
{
- return targetLine;
+ return targetLineValue;
}
public void setTargetLineValue( Double targetLineValue )
@@ -435,11 +410,6 @@
this.targetLineValue = targetLineValue;
}
- public Double getTargetLineValue()
- {
- return targetLineValue;
- }
-
public void setTargetLineLabel( String targetLineLabel )
{
this.targetLineLabel = targetLineLabel;
@@ -447,29 +417,19 @@
public String getTargetLineLabel()
{
- if ( targetLineLabel == null || targetLineLabel.trim().length() == 0 )
- {
- targetLineLabel = "Target Line";
- }
-
return targetLineLabel;
}
- public void setHideSubtitle( Boolean hideSubtitle )
+ public boolean isHideSubtitle()
+ {
+ return hideSubtitle;
+ }
+
+ public void setHideSubtitle( boolean hideSubtitle )
{
this.hideSubtitle = hideSubtitle;
}
- public Boolean getHideSubtitle()
- {
- if ( hideSubtitle == null )
- {
- return Boolean.FALSE;
- }
-
- return hideSubtitle;
- }
-
public List<Indicator> getIndicators()
{
return indicators;
@@ -540,12 +500,12 @@
this.relatives = relatives;
}
- public Boolean getUserOrganisationUnit()
+ public boolean isUserOrganisationUnit()
{
return userOrganisationUnit;
}
- public void setUserOrganisationUnit( Boolean userOrganisationUnit )
+ public void setUserOrganisationUnit( boolean userOrganisationUnit )
{
this.userOrganisationUnit = userOrganisationUnit;
}
=== 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 2011-11-15 19:27:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2011-11-23 18:07:35 +0000
@@ -158,7 +158,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;
/**
* Set of the dynamic attributes values that belong to this dataElement.
@@ -260,15 +260,6 @@
}
/**
- * Null-safe check.
- */
- public boolean isZeroIsSignificant()
- {
- return zeroIsSignificant != null && zeroIsSignificant;
-
- }
-
- /**
* Returns the PeriodType of the DataElement, based on the PeriodType of the
* DataSet which the DataElement is registered for.
*/
@@ -487,12 +478,12 @@
this.aggregationLevels = aggregationLevels;
}
- public Boolean getZeroIsSignificant()
+ public boolean isZeroIsSignificant()
{
return zeroIsSignificant;
}
- public void setZeroIsSignificant( Boolean zeroIsSignificant )
+ public void setZeroIsSignificant( boolean zeroIsSignificant )
{
this.zeroIsSignificant = zeroIsSignificant;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2011-11-11 13:23:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2011-11-23 18:07:35 +0000
@@ -85,11 +85,6 @@
private Set<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
/**
- * Property indicating whether the DataSet is locked for data entry.
- */
- private Boolean locked = false;
-
- /**
* The Sections associated with the DataSet.
*/
private Set<Section> sections = new HashSet<Section>();
@@ -102,7 +97,7 @@
/**
* Property indicating if the dataset could be collected using mobile data entry.
*/
- private Boolean mobile = false;
+ private boolean mobile;
/**
* Indicating custom data entry form.
@@ -217,12 +212,7 @@
{
return sections != null && sections.size() > 0;
}
-
- public boolean isMobile()
- {
- return mobile != null && mobile;
- }
-
+
public String getDataSetType()
{
if ( hasDataEntryForm() )
@@ -347,16 +337,6 @@
this.sources = sources;
}
- public Boolean getLocked()
- {
- return locked;
- }
-
- public void setLocked( Boolean locked )
- {
- this.locked = locked;
- }
-
public Integer getSortOrder()
{
return sortOrder;
@@ -377,15 +357,15 @@
return sections;
}
- public void setMobile(Boolean mobile)
+ public boolean isMobile()
+ {
+ return mobile;
+ }
+
+ public void setMobile( boolean mobile )
{
this.mobile = mobile;
}
-
- public Boolean getMobile()
- {
- return mobile;
- }
public Integer getVersion()
{
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java 2011-11-23 18:07:35 +0000
@@ -79,7 +79,7 @@
private String comment;
- private Boolean followup;
+ private boolean followup;
// -------------------------------------------------------------------------
// Constructors
@@ -164,11 +164,6 @@
// Logic
// -------------------------------------------------------------------------
- public boolean isFollowup()
- {
- return followup != null && followup;
- }
-
public boolean isZero()
{
return dataElement != null && dataElement.getType().equals( DataElement.VALUE_TYPE_INT )
@@ -306,12 +301,12 @@
this.comment = comment;
}
- public Boolean getFollowup()
+ public boolean isFollowup()
{
return followup;
}
- public void setFollowup( Boolean followup )
+ public void setFollowup( boolean followup )
{
this.followup = followup;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2011-11-15 19:27:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2011-11-23 18:07:35 +0000
@@ -52,7 +52,7 @@
*/
private static final long serialVersionUID = -6551567526188061690L;
- private Boolean annualized;
+ private boolean annualized;
private IndicatorType indicatorType;
@@ -115,11 +115,6 @@
}
}
- public boolean isAnnualized()
- {
- return annualized != null && annualized;
- }
-
// -------------------------------------------------------------------------
// hashCode and equals
// -------------------------------------------------------------------------
@@ -163,12 +158,12 @@
// Getters and setters
// -------------------------------------------------------------------------
- public Boolean getAnnualized()
+ public boolean isAnnualized()
{
return annualized;
}
- public void setAnnualized( Boolean annualized )
+ public void setAnnualized( boolean annualized )
{
this.annualized = annualized;
}
=== 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 2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java 2011-11-23 18:07:35 +0000
@@ -43,7 +43,7 @@
private int factor;
- private Boolean number;
+ private boolean number;
// -------------------------------------------------------------------------
// Constructors
@@ -113,12 +113,12 @@
this.factor = factor;
}
- public Boolean getNumber()
+ public boolean isNumber()
{
- return number != null && number;
+ return number;
}
- public void setNumber( Boolean number )
+ public void setNumber( boolean number )
{
this.number = number;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2011-11-15 19:22:58 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2011-11-23 18:07:35 +0000
@@ -111,7 +111,7 @@
private String phoneNumber;
- private Boolean hasPatients;
+ private boolean hasPatients;
private transient int level;
@@ -410,11 +410,6 @@
return dataElements;
}
- public boolean isHasPatients()
- {
- return hasPatients != null && hasPatients;
- }
-
public void updateParent( OrganisationUnit newParent )
{
if ( this.parent != null && this.parent.getChildren() != null )
@@ -706,12 +701,12 @@
this.phoneNumber = phoneNumber;
}
- public Boolean getHasPatients()
+ public boolean isHasPatients()
{
return hasPatients;
}
- public void setHasPatients( Boolean hasPatients )
+ public void setHasPatients( boolean hasPatients )
{
this.hasPatients = hasPatients;
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2011-11-22 18:52:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2011-11-23 18:07:35 +0000
@@ -33,7 +33,6 @@
import java.sql.Statement;
import java.sql.Timestamp;
import java.util.Date;
-import java.util.UUID;
import org.amplecode.quick.StatementHolder;
import org.amplecode.quick.StatementManager;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-11-23 18:07:35 +0000
@@ -106,6 +106,7 @@
executeSql( "ALTER TABLE indicator DROP COLUMN extendeddataelementid" );
executeSql( "ALTER TABLE indicator DROP COLUMN numeratoraggregationtype" );
executeSql( "ALTER TABLE indicator DROP COLUMN denominatoraggregationtype" );
+ executeSql( "ALTER TABLE dataset DROP COLUMN locked" );
// remove relative period type
executeSql( "DELETE FROM period WHERE periodtypeid=(select periodtypeid from periodtype where name in ( 'Survey', 'OnChange', 'Relative' ))" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/Attribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/Attribute.hbm.xml 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/Attribute.hbm.xml 2011-11-23 18:07:35 +0000
@@ -17,15 +17,15 @@
<property name="valueType" not-null="true" />
- <property name="mandatory" />
-
- <property name="dataElementAttribute" />
-
- <property name="indicatorAttribute" />
-
- <property name="organisationUnitAttribute" />
-
- <property name="userAttribute" />
+ <property name="mandatory" not-null="true" />
+
+ <property name="dataElementAttribute" not-null="true" />
+
+ <property name="indicatorAttribute" not-null="true" />
+
+ <property name="organisationUnitAttribute" not-null="true" />
+
+ <property name="userAttribute" not-null="true" />
<property name="sortOrder" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2011-11-23 18:07:35 +0000
@@ -58,7 +58,7 @@
<element column="aggregationlevel" type="integer" />
</list>
- <property name="zeroIsSignificant" />
+ <property name="zeroIsSignificant" not-null="true" />
<!-- Dynamic attribute values -->
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2011-11-23 18:07:35 +0000
@@ -49,13 +49,11 @@
<one-to-many class="org.hisp.dhis.dataset.Section" />
</set>
- <property name="locked" />
-
<property name="sortOrder" />
<many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm" foreign-key="fk_dataset_dataentryform" cascade="all" />
- <property name="mobile" />
+ <property name="mobile" not-null="true" />
<property name="version" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/datavalue/hibernate/DataValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/datavalue/hibernate/DataValue.hbm.xml 2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/datavalue/hibernate/DataValue.hbm.xml 2011-11-23 18:07:35 +0000
@@ -21,7 +21,7 @@
<property name="comment" length="360" />
- <property name="followup" />
+ <property name="followup" not-null="true" />
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2011-11-23 18:07:35 +0000
@@ -21,7 +21,7 @@
<property name="description" type="text" />
- <property name="annualized" column="annualized" />
+ <property name="annualized" column="annualized" not-null="true" />
<many-to-one name="indicatorType" class="org.hisp.dhis.indicator.IndicatorType" column="indicatortypeid"
foreign-key="fk_indicator_indicatortypeid" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2011-11-23 18:07:35 +0000
@@ -42,6 +42,8 @@
<property name="url" />
+ <property name="hasPatients" not-null="true" />
+
<set name="dataSets" table="datasetsource" inverse="true">
<cache usage="read-write" />
<key column="sourceid" />
@@ -70,10 +72,6 @@
<property name="phoneNumber" length="150" />
- <!-- hasPatients -->
-
- <property name="hasPatients" />
-
<!-- Dynamic attribute values -->
<set name="attributeValues" table="organisationunitattributevalues">
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/indicator/DefaultIndicatorDataMart.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/indicator/DefaultIndicatorDataMart.java 2011-11-03 13:26:09 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/indicator/DefaultIndicatorDataMart.java 2011-11-23 18:07:35 +0000
@@ -177,7 +177,7 @@
indicatorValue.setPeriodTypeId( periodType.getId() );
indicatorValue.setOrganisationUnitId( unit.getId() );
indicatorValue.setLevel( level );
- indicatorValue.setAnnualized( getAnnualizationString( indicator.getAnnualized() ) );
+ indicatorValue.setAnnualized( getAnnualizationString( indicator.isAnnualized() ) );
indicatorValue.setFactor( annualizedFactor);
indicatorValue.setValue( getRounded( aggregatedValue, DECIMALS ) );
indicatorValue.setNumeratorValue( getRounded( numeratorValue, DECIMALS ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementGroupRowHandler.java 2011-11-23 18:07:35 +0000
@@ -33,7 +33,6 @@
import org.hisp.dhis.importexport.ImportObjectService;
import org.hisp.dhis.importexport.ImportParams;
import org.hisp.dhis.importexport.importer.DataElementGroupImporter;
-import org.hisp.dhis.system.util.UUIdUtils;
import com.ibatis.sqlmap.client.event.RowHandler;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/DataElementRowHandler.java 2011-11-23 18:07:35 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.importexport.ImportParams;
import org.hisp.dhis.importexport.analysis.ImportAnalyser;
import org.hisp.dhis.importexport.importer.DataElementImporter;
-import org.hisp.dhis.system.util.UUIdUtils;
import com.ibatis.sqlmap.client.event.RowHandler;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorGroupRowHandler.java 2011-11-23 18:07:35 +0000
@@ -33,7 +33,6 @@
import org.hisp.dhis.importexport.importer.IndicatorGroupImporter;
import org.hisp.dhis.indicator.IndicatorGroup;
import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.system.util.UUIdUtils;
import com.ibatis.sqlmap.client.event.RowHandler;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java 2011-11-23 18:07:35 +0000
@@ -39,7 +39,6 @@
import org.hisp.dhis.importexport.importer.IndicatorImporter;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.system.util.UUIdUtils;
import com.ibatis.sqlmap.client.event.RowHandler;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitGroupRowHandler.java 2011-11-23 18:07:35 +0000
@@ -33,7 +33,6 @@
import org.hisp.dhis.importexport.importer.OrganisationUnitGroupImporter;
import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.system.util.UUIdUtils;
import com.ibatis.sqlmap.client.event.RowHandler;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java 2011-11-23 18:07:35 +0000
@@ -34,7 +34,6 @@
import org.hisp.dhis.importexport.importer.OrganisationUnitImporter;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.system.util.UUIdUtils;
import com.ibatis.sqlmap.client.event.RowHandler;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-11-23 18:07:35 +0000
@@ -145,7 +145,7 @@
writer.writeElement( FIELD_SHORT_NAME, indicator.getShortName() );
writer.writeElement( FIELD_CODE, indicator.getCode() );
writer.writeElement( FIELD_DESCRIPTION, indicator.getDescription() );
- writer.writeElement( FIELD_ANNUALIZED, String.valueOf( indicator.getAnnualized() ) );
+ writer.writeElement( FIELD_ANNUALIZED, String.valueOf( indicator.isAnnualized() ) );
writer.writeElement( FIELD_INDICATOR_TYPE, String.valueOf( indicator.getIndicatorType().getId() ) );
writer.writeElement( FIELD_NUMERATOR, indicator.getNumerator() );
writer.writeElement( FIELD_NUMERATOR_DESCRIPTION, indicator.getNumeratorDescription() );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/hibernate/HibernateChartStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/hibernate/HibernateChartStore.java 2011-11-12 18:43:35 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/hibernate/HibernateChartStore.java 2011-11-23 18:07:35 +0000
@@ -36,7 +36,6 @@
import org.hisp.dhis.chart.Chart;
import org.hisp.dhis.chart.ChartStore;
import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
/**
* @author Lars Helge Overland
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-11-22 16:17:49 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-11-23 18:07:35 +0000
@@ -248,7 +248,7 @@
chart.setFormat( format );
chart.init();
- return getJFreeChart( chart, !chart.getHideSubtitle() );
+ return getJFreeChart( chart, !chart.isHideSubtitle() );
}
public JFreeChart getJFreePeriodChart( Indicator indicator, OrganisationUnit unit, boolean title, I18nFormat format )
@@ -786,12 +786,12 @@
if ( chart.isType( TYPE_PIE ) )
{
multiplePieChart = ChartFactory.createMultiplePieChart( chart.getName(), dataSets[0], TableOrder.BY_ROW,
- !chart.getHideLegend(), false, false );
+ !chart.isHideLegend(), false, false );
}
else
{
multiplePieChart = ChartFactory.createMultiplePieChart3D( chart.getName(), dataSets[0], TableOrder.BY_ROW,
- !chart.getHideLegend(), false, false );
+ !chart.isHideLegend(), false, false );
}
multiplePieChart.getTitle().setFont( titleFont );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-11-12 18:43:35 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-11-23 18:07:35 +0000
@@ -25,17 +25,17 @@
<property name="dimension" />
- <property name="hideLegend" />
-
- <property name="hideSubtitle" />
-
- <property name="verticalLabels" />
-
- <property name="horizontalPlotOrientation" />
-
- <property name="regression" />
-
- <property name="targetLine" />
+ <property name="hideLegend" not-null="true" />
+
+ <property name="verticalLabels" not-null="true" />
+
+ <property name="horizontalPlotOrientation" not-null="true" />
+
+ <property name="regression" not-null="true" />
+
+ <property name="targetLine" not-null="true" />
+
+ <property name="hideSubtitle" not-null="true" />
<property name="targetLineValue" />
@@ -93,7 +93,7 @@
<property name="lastYear" />
</component>
- <property name="userOrganisationUnit" />
+ <property name="userOrganisationUnit" not-null="true" />
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java 2011-11-23 18:07:35 +0000
@@ -103,6 +103,7 @@
statementBuilder.setColumn( "aggregationtype" );
statementBuilder.setColumn( "categorycomboid" );
statementBuilder.setColumn( "sortorder" );
+ statementBuilder.setColumn( "zeroissignificant" );
statementBuilder.setColumn( "lastupdated" );
}
@@ -119,6 +120,7 @@
statementBuilder.setValue( dataElement.getAggregationOperator() );
statementBuilder.setValue( dataElement.getCategoryCombo().getId() );
statementBuilder.setValue( dataElement.getSortOrder() );
+ statementBuilder.setValue( dataElement.isZeroIsSignificant() );
statementBuilder.setValue( dataElement.getLastUpdated() );
}
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java 2011-11-23 18:07:35 +0000
@@ -95,6 +95,7 @@
statementBuilder.setColumn( "code" );
statementBuilder.setColumn( "periodtypeid" );
statementBuilder.setColumn( "sortorder" );
+ statementBuilder.setColumn( "mobile" );
statementBuilder.setColumn( "dataEntryForm" );
}
@@ -105,6 +106,8 @@
statementBuilder.setValue( dataSet.getCode() );
statementBuilder.setValue( dataSet.getPeriodType().getId() );
statementBuilder.setValue( dataSet.getSortOrder() );
+ statementBuilder.setValue( dataSet.isMobile() );
statementBuilder.setValue( dataSet.getDataEntryForm() != null ? dataSet.getDataEntryForm().getId() : null );
+
}
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java 2010-11-23 16:12:57 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java 2011-11-23 18:07:35 +0000
@@ -100,6 +100,7 @@
statementBuilder.setColumn( "lastupdated" );
statementBuilder.setColumn( "comment" );
statementBuilder.setColumn( "categoryoptioncomboid" );
+ statementBuilder.setColumn( "followup" );
}
protected void setValues( DataValue value )
@@ -112,5 +113,6 @@
statementBuilder.setValue( value.getTimestamp() );
statementBuilder.setValue( value.getComment() );
statementBuilder.setValue( value.getOptionCombo().getId() );
+ statementBuilder.setValue( value.isFollowup() );
}
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java 2011-11-23 18:07:35 +0000
@@ -114,7 +114,7 @@
statementBuilder.setValue( indicator.getShortName() );
statementBuilder.setValue( indicator.getCode() );
statementBuilder.setValue( indicator.getDescription() );
- statementBuilder.setValue( indicator.getAnnualized() );
+ statementBuilder.setValue( indicator.isAnnualized() );
statementBuilder.setValue( indicator.getIndicatorType().getId() );
statementBuilder.setValue( indicator.getNumerator() );
statementBuilder.setValue( indicator.getNumeratorDescription() );
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java 2010-11-23 16:12:57 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java 2011-11-23 18:07:35 +0000
@@ -88,11 +88,14 @@
{
statementBuilder.setColumn( "name" );
statementBuilder.setColumn( "indicatorfactor" );
+ statementBuilder.setColumn( "indicatornumber" );
}
protected void setValues( IndicatorType type )
{
statementBuilder.setValue( type.getName() );
statementBuilder.setValue( type.getFactor() );
+ statementBuilder.setValue( type.isNumber() );
+
}
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java 2011-11-23 18:07:35 +0000
@@ -102,6 +102,7 @@
statementBuilder.setColumn( "featuretype" );
statementBuilder.setColumn( "coordinates" );
statementBuilder.setColumn( "lastupdated" );
+ statementBuilder.setColumn( "haspatients" );
}
protected void setValues( OrganisationUnit unit )
@@ -118,5 +119,6 @@
statementBuilder.setValue( unit.getFeatureType() );
statementBuilder.setValue( unit.getCoordinates() );
statementBuilder.setValue( unit.getLastUpdated() );
+ statementBuilder.setValue( unit.isHasPatients() );
}
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2011-09-24 11:35:11 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2011-11-23 18:07:35 +0000
@@ -139,7 +139,7 @@
sheet.addCell( new Label( column++, row, indicator.getShortName(), format ) );
sheet.addCell( new Label( column++, row, indicator.getCode(), format ) );
sheet.addCell( new Label( column++, row, indicator.getDescription(), format ) );
- sheet.addCell( new Label( column++, row, getBoolean().get( indicator.getAnnualized() ), format ) );
+ sheet.addCell( new Label( column++, row, getBoolean().get( indicator.isAnnualized() ), format ) );
sheet.addCell( new Label( column++, row, getType().get( indicator.getIndicatorType().getName() ), format ) );
sheet.addCell( new Label( column++, row, indicator.getNumeratorDescription(), format ) );
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2011-11-14 14:48:51 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2011-11-23 18:07:35 +0000
@@ -473,7 +473,7 @@
}
table.addCell( getItalicCell( i18n.getString( "annualized" ) ) );
- table.addCell( getTextCell( i18n.getString( getBoolean().get( indicator.getAnnualized() ) ) ) );
+ table.addCell( getTextCell( i18n.getString( getBoolean().get( indicator.isAnnualized() ) ) ) );
table.addCell( getItalicCell( i18n.getString( "indicator_type" ) ) );
table.addCell( getTextCell( indicator.getIndicatorType().getName() ) );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/UpdateLockedDataSets.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/UpdateLockedDataSets.java 2010-08-05 15:15:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/UpdateLockedDataSets.java 2011-11-23 18:07:35 +0000
@@ -130,7 +130,6 @@
if ( dataSetLock != null )
{
- dataSet.setLocked( false );
dataSetService.updateDataSet( dataSet );
dataSetLock.getSources().removeAll( dataSetLock.getSources() );
dataSetLockService.deleteDataSetLock( dataSetLock );