dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24530
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12041: Removed equals/hashcode methods on most Identifiable and Nameable objects, falls back to the impl...
------------------------------------------------------------
revno: 12041
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-11 17:26:20 +0200
message:
Removed equals/hashcode methods on most Identifiable and Nameable objects, falls back to the implementations in the base classes.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/concept/Concept.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/constant/Constant.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOption.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.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/IndicatorGroup.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLayer.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegend.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegendSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/Message.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionSet.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/patient/Patient.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationCriteria.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
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboServiceTest.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/PatientAttribute.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java
dhis-2/dhis-services/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.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/caseaggregation/CaseAggregationCondition.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java 2013-09-11 15:26:20 +0000
@@ -160,7 +160,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java 2013-09-11 14:41:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java 2013-09-11 15:26:20 +0000
@@ -477,7 +477,6 @@
"', name='" + name +
"', created='" + created +
"', lastUpdated='" + lastUpdated +
- "', class='" + getClass().getSimpleName() +
"']";
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/concept/Concept.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/concept/Concept.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/concept/Concept.java 2013-09-11 15:26:20 +0000
@@ -65,39 +65,6 @@
this.name = name;
}
- // -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof Concept) )
- {
- return false;
- }
-
- final Concept other = (Concept) o;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
@Override
public boolean isAutoGenerated()
{
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/constant/Constant.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/constant/Constant.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/constant/Constant.java 2013-09-11 15:26:20 +0000
@@ -76,33 +76,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof Constant) )
- {
- return false;
- }
-
- final Constant other = (Constant) o;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Getter & Setter
// -------------------------------------------------------------------------
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datadictionary/DataDictionary.java 2013-09-11 15:26:20 +0000
@@ -84,39 +84,6 @@
}
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof DataDictionary) )
- {
- return false;
- }
-
- final DataDictionary other = (DataDictionary) o;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== 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 2013-09-06 09:34:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2013-09-11 15:26:20 +0000
@@ -208,45 +208,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof DataElement) )
- {
- return false;
- }
-
- final DataElement other = (DataElement) o;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java 2013-09-11 15:26:20 +0000
@@ -156,45 +156,6 @@
return new ArrayList<NameableObject>( categoryOptions );
}
- // -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( !(object instanceof DataElementCategory) )
- {
- return false;
- }
-
- final DataElementCategory other = (DataElementCategory) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
// ------------------------------------------------------------------------
// Logic
// ------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java 2013-09-11 15:26:20 +0000
@@ -223,41 +223,6 @@
return name != null && name.equals( DEFAULT_CATEGORY_COMBO_NAME );
}
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( !(object instanceof DataElementCategoryCombo) )
- {
- return false;
- }
-
- final DataElementCategoryCombo other = (DataElementCategoryCombo) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
// -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOption.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOption.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOption.java 2013-09-11 15:26:20 +0000
@@ -91,45 +91,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( !(object instanceof DataElementCategoryOption) )
- {
- return false;
- }
-
- final DataElementCategoryOption other = (DataElementCategoryOption) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java 2013-09-11 15:26:20 +0000
@@ -192,45 +192,6 @@
}
// -------------------------------------------------------------------------
- // equals and hashCode
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof DataElementGroupSet) )
- {
- return false;
- }
-
- final DataElementGroupSet other = (DataElementGroupSet) o;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java 2013-09-11 15:26:20 +0000
@@ -588,7 +588,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2013-09-11 15:26:20 +0000
@@ -139,33 +139,6 @@
}
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof Indicator) )
- {
- return false;
- }
-
- final Indicator other = (Indicator) o;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java 2013-09-11 15:26:20 +0000
@@ -113,39 +113,6 @@
}
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof IndicatorGroup) )
- {
- return false;
- }
-
- final IndicatorGroup other = (IndicatorGroup) o;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java 2013-09-11 15:26:20 +0000
@@ -154,39 +154,6 @@
}
// -------------------------------------------------------------------------
- // equals and hashCode
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof IndicatorGroupSet) )
- {
- return false;
- }
-
- final IndicatorGroupSet other = (IndicatorGroupSet) o;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
@@ -209,7 +176,6 @@
// Getters and setters
// -------------------------------------------------------------------------
-
@Override
public boolean haveUniqueNames()
{
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorType.java 2013-09-11 15:26:20 +0000
@@ -70,45 +70,6 @@
}
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof IndicatorType) )
- {
- return false;
- }
-
- final IndicatorType other = (IndicatorType) o;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLayer.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLayer.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLayer.java 2013-09-11 15:26:20 +0000
@@ -80,33 +80,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final MapLayer other = (MapLayer) object;
-
- return name.equals( other.name );
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegend.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegend.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegend.java 2013-09-11 15:26:20 +0000
@@ -67,33 +67,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- MapLegend other = (MapLegend) object;
-
- return name.equals( other.name );
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegendSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegendSet.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapLegendSet.java 2013-09-11 15:26:20 +0000
@@ -70,33 +70,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- MapLegendSet other = (MapLegendSet) object;
-
- return name.equals( other.name );
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/Message.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/Message.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/Message.java 2013-09-11 15:26:20 +0000
@@ -127,35 +127,6 @@
}
@Override
- public int hashCode()
- {
- return uid.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final Message other = (Message) object;
-
- return uid.equals( other.uid );
- }
-
- @Override
public String toString()
{
return "[" + text + "]";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java 2013-09-04 13:10:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java 2013-09-11 15:26:20 +0000
@@ -103,35 +103,6 @@
// --------------------------------------------------------------------------
@Override
- public int hashCode()
- {
- return uid.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final MessageConversation other = (MessageConversation) object;
-
- return uid.equals( other.uid );
- }
-
- @Override
public String toString()
{
return "[" + subject + "]";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionSet.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionSet.java 2013-09-11 15:26:20 +0000
@@ -69,29 +69,6 @@
this.name = name;
}
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof OptionSet) )
- {
- return false;
- }
-
- final OptionSet other = (OptionSet) o;
-
- return name.equals( other.getName() );
- }
-
public void removeAllOptions()
{
options.clear();
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroup.java 2013-09-11 15:26:20 +0000
@@ -174,33 +174,6 @@
}
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof OrganisationUnitGroup) )
- {
- return false;
- }
-
- final OrganisationUnitGroup other = (OrganisationUnitGroup) o;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java 2013-09-11 15:26:20 +0000
@@ -184,33 +184,6 @@
}
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof OrganisationUnitGroupSet) )
- {
- return false;
- }
-
- final OrganisationUnitGroupSet other = (OrganisationUnitGroupSet) o;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java 2013-09-11 15:26:20 +0000
@@ -93,7 +93,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2013-09-11 12:12:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2013-09-11 15:26:20 +0000
@@ -160,7 +160,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-09-11 15:26:20 +0000
@@ -89,45 +89,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final PatientAttribute other = (PatientAttribute) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java 2013-09-11 15:26:20 +0000
@@ -70,45 +70,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final PatientAttributeGroup other = (PatientAttributeGroup) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2013-09-11 15:26:20 +0000
@@ -82,39 +82,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final PatientIdentifierType other = (PatientIdentifierType) object;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2013-09-05 17:59:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2013-09-11 15:26:20 +0000
@@ -159,39 +159,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final Program other = (Program) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- // -------------------------------------------------------------------------
// Logic methods
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java 2013-09-11 15:26:20 +0000
@@ -81,39 +81,6 @@
}
// -------------------------------------------------------------------------
- // Logical
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final ProgramIndicator other = (ProgramIndicator) object;
-
- return name.equals( other.name );
- }
-
- // -------------------------------------------------------------------------
// Getters && Setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java 2013-09-10 04:51:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java 2013-09-11 15:26:20 +0000
@@ -111,14 +111,6 @@
// Getters and setters
// -------------------------------------------------------------------------
- /**
- * @return the id
- */
- public int getId()
- {
- return id;
- }
-
@Override
public int hashCode()
{
@@ -146,7 +138,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
@@ -205,6 +197,14 @@
}
/**
+ * @return the id
+ */
+ public int getId()
+ {
+ return id;
+ }
+
+ /**
* @param id the id to set
*/
public void setId( int id )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2013-09-06 09:06:36 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2013-09-11 15:26:20 +0000
@@ -117,45 +117,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final ProgramStage other = (ProgramStage) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2013-09-10 04:51:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2013-09-11 15:26:20 +0000
@@ -120,11 +120,13 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
+ // TODO include due date and execution date to make consistent with hashcode
+
final ProgramStageInstance other = (ProgramStageInstance) object;
return programInstance.equals( other.getProgramInstance() ) && programStage.equals( other.getProgramStage() );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java 2013-09-11 15:26:20 +0000
@@ -80,45 +80,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final ProgramStageSection other = (ProgramStageSection) object;
-
- return name.equals( other.getName() );
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java 2013-09-11 15:26:20 +0000
@@ -118,7 +118,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipType.java 2013-09-11 15:26:20 +0000
@@ -84,7 +84,7 @@
return false;
}
- if ( getClass() != object.getClass() )
+ if ( !getClass().isAssignableFrom( object.getClass() ) )
{
return false;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2013-09-11 15:26:20 +0000
@@ -132,45 +132,6 @@
}
// -------------------------------------------------------------------------
- // Equals and hashCode
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
-
- int result = 1;
-
- result = prime * result + ((name == null) ? 0 : name.hashCode());
-
- return result;
- }
-
- @Override
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
-
- if ( object == null )
- {
- return false;
- }
-
- if ( getClass() != object.getClass() )
- {
- return false;
- }
-
- final Report other = (Report) object;
-
- return this.name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlView.java 2013-09-11 15:26:20 +0000
@@ -80,37 +80,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
-
- final SqlView other = (SqlView) obj;
-
- return name.equals( other.name );
- }
-
- @Override
- public String toString()
- {
- return "[ Name: " + name + ", sql query: " + sqlQuery + " ]";
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java 2013-09-11 15:26:20 +0000
@@ -72,33 +72,6 @@
private Set<DataSet> dataSets = new HashSet<DataSet>();
// -------------------------------------------------------------------------
- // hashCode and equals
- // -------------------------------------------------------------------------
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( o == null )
- {
- return false;
- }
-
- if ( !(o instanceof UserAuthorityGroup) )
- {
- return false;
- }
-
- final UserAuthorityGroup other = (UserAuthorityGroup) o;
-
- return name.equals( other.getName() );
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java 2013-09-11 15:26:20 +0000
@@ -70,7 +70,6 @@
public UserGroup()
{
-
}
public UserGroup( String name )
@@ -85,30 +84,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
- else if ( object == null )
- {
- return false;
- }
- else if ( !(object instanceof UserGroup) )
- {
- return false;
- }
-
- final UserGroup userGroup = (UserGroup) object;
-
- return name.equals( userGroup.getName() );
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationCriteria.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationCriteria.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationCriteria.java 2013-09-11 15:26:20 +0000
@@ -73,34 +73,6 @@
}
// -------------------------------------------------------------------------
- // equals && hashCode
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + id;
- return result;
- }
-
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- return true;
- if ( obj == null )
- return false;
- if ( getClass() != obj.getClass() )
- return false;
- ValidationCriteria other = (ValidationCriteria) obj;
- if ( id != other.id )
- return false;
- return true;
- }
-
- // -------------------------------------------------------------------------
// Getters && Setters
// -------------------------------------------------------------------------
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRule.java 2013-09-11 15:26:20 +0000
@@ -98,41 +98,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
- else if ( object == null )
- {
- return false;
- }
- else if ( !(object instanceof ValidationRule) )
- {
- return false;
- }
-
- final ValidationRule validationRule = (ValidationRule) object;
-
- return name.equals( validationRule.getName() );
- }
-
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Logic
// -------------------------------------------------------------------------
=== 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 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRuleGroup.java 2013-09-11 15:26:20 +0000
@@ -98,41 +98,6 @@
}
// -------------------------------------------------------------------------
- // hashCode, equals and toString
- // -------------------------------------------------------------------------
-
- public boolean equals( Object object )
- {
- if ( this == object )
- {
- return true;
- }
- else if ( object == null )
- {
- return false;
- }
- else if ( !(object instanceof ValidationRuleGroup) )
- {
- return false;
- }
-
- final ValidationRuleGroup validationRuleGroup = (ValidationRuleGroup) object;
-
- return name.equals( validationRuleGroup.getName() );
- }
-
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public String toString()
- {
- return "[" + name + "]";
- }
-
- // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboServiceTest.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboServiceTest.java 2013-09-11 15:26:20 +0000
@@ -135,15 +135,12 @@
{
categoryService.generateOptionCombos( categoryComboA );
- DataElementCategoryOption catopt1 = new DataElementCategoryOption("Male");
- DataElementCategoryOption catopt2 = new DataElementCategoryOption("0-20");
-
Collection<DataElementCategoryOption> catopts = new LinkedList<DataElementCategoryOption>();
- catopts.add( catopt1 );
- catopts.add( catopt2 );
+ catopts.add( categoryOptionA );
+ catopts.add( categoryOptionC );
DataElementCategoryOptionCombo catoptcombo = categoryService.getDataElementCategoryOptionCombo( catopts );
- assertNotNull(catoptcombo);
+ assertNotNull( catoptcombo );
}
@Test
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/PatientAttribute.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/PatientAttribute.java 2013-09-10 07:22:13 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/PatientAttribute.java 2013-09-11 15:26:20 +0000
@@ -33,7 +33,6 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-09-11 14:28:23 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-09-11 15:26:20 +0000
@@ -905,7 +905,7 @@
if ( setting.getBirthdate() )
{
DateFormat dateFormat = new SimpleDateFormat( "dd-MM-yyyy" );
- patientModel.setBirthDate( dateFormat.format( patient.getBirthDate()) );
+ patientModel.setBirthDate( dateFormat.format( patient.getBirthDate() ) );
}
if ( setting.getRegistrationdate() )
{
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java 2013-09-08 08:36:32 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java 2013-09-11 15:26:20 +0000
@@ -41,11 +41,9 @@
import org.hisp.dhis.api.mobile.model.Program;
import org.hisp.dhis.api.mobile.model.ProgramStage;
import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.program.ProgramInstance;
import org.hisp.dhis.program.ProgramStageDataElement;
import org.hisp.dhis.program.ProgramStageSection;
-import org.hisp.dhis.user.CurrentUserService;
import org.springframework.beans.factory.annotation.Required;
public class DefaultProgramService
@@ -59,13 +57,6 @@
private org.hisp.dhis.mobile.service.ModelMapping modelMapping;
- private CurrentUserService currentUserService;
-
- public void setCurrentUserService( CurrentUserService currentUserService )
- {
- this.currentUserService = currentUserService;
- }
-
// -------------------------------------------------------------------------
// ProgramService
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml 2013-09-08 08:36:32 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml 2013-09-11 15:26:20 +0000
@@ -41,7 +41,6 @@
<bean id="org.hisp.dhis.mobile.api.IProgramService" class="org.hisp.dhis.mobile.service.DefaultProgramService">
<property name="programService" ref="org.hisp.dhis.program.ProgramService" />
<property name="modelMapping" ref="org.hisp.dhis.mobile.service.ModelMapping" />
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
</bean>
<bean id="org.hisp.dhis.mobile.service.ModelMapping" class="org.hisp.dhis.mobile.service.ModelMapping"/>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java 2013-09-11 15:26:20 +0000
@@ -130,5 +130,4 @@
{
return patientDataValueStore.get( programStageInstance, dataElement );
}
-
}