dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24867
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12234: local/in Bug fixed in CCEM
------------------------------------------------------------
revno: 12234
committer: Mithilesh Kumar Thakur <mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-25 10:45:36 +0100
message:
local/in Bug fixed in CCEM
modified:
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/Equipment.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentDataValue.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStatus.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentTypeAttributeOption.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelAttributeValue.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelTypeAttributeGroupStore.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportOrgSpecificDataService.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/StateDistrictFeedbackReportService.java
local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentDataValueService.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentAttributeValueStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentTypeAttributeOptionStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/DefaultModelDataEntryService.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelAttributeValueStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeGroupStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeOptionStore.java
local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java
local/in/dhis-web-maintenance-in/pom.xml
local/in/pom.xml
--
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 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/Equipment.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/Equipment.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/Equipment.java 2013-09-25 09:45:36 +0000
@@ -8,7 +8,11 @@
public class Equipment implements Serializable
{
-
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -6551567526188061690L;
+
private int id;
private EquipmentType equipmentType;
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentDataValue.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentDataValue.java 2013-09-25 09:45:36 +0000
@@ -8,6 +8,11 @@
public class EquipmentDataValue implements Serializable
{
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -6551567526188061690L;
+
private Equipment equipment;
private DataElement dataElement;
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStatus.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStatus.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStatus.java 2013-09-25 09:45:36 +0000
@@ -6,6 +6,11 @@
public class EquipmentStatus
implements Serializable
{
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -6551567526188061690L;
+
public static final String STATUS_WORKING = "WORKING";
public static final String STATUS_NOTWORKING = "NOTWORKING";
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentTypeAttributeOption.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentTypeAttributeOption.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentTypeAttributeOption.java 2013-09-25 09:45:36 +0000
@@ -4,6 +4,12 @@
public class EquipmentTypeAttributeOption implements Serializable
{
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+
+ private static final long serialVersionUID = -6551567526188061690L;
+
private int id;
private String name;
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelAttributeValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelAttributeValue.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelAttributeValue.java 2013-09-25 09:45:36 +0000
@@ -4,7 +4,11 @@
public class ModelAttributeValue implements Serializable
{
-
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -6551567526188061690L;
+
private Model model;
private ModelTypeAttribute modelTypeAttribute;
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelTypeAttributeGroupStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelTypeAttributeGroupStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/ModelTypeAttributeGroupStore.java 2013-09-25 09:45:36 +0000
@@ -36,5 +36,4 @@
Collection<ModelTypeAttributeGroup> getModelTypeAttributeGroupsByModelType( ModelType modelType );
-
}
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportOrgSpecificDataService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportOrgSpecificDataService.java 2012-07-26 09:20:56 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/ReportOrgSpecificDataService.java 2013-09-25 09:45:36 +0000
@@ -1,17 +1,16 @@
package org.hisp.dhis.reports;
+import java.util.Date;
+import java.util.Map;
+
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.PeriodType;
-import java.io.File;
-import java.util.Date;
-import java.util.Map;
-
/**
* <gaurav>,Date: 7/10/12, Time: 5:24 PM
*/
-public interface ReportOrgSpecificDataService {
-
+public interface ReportOrgSpecificDataService
+{
public Map<String, String> getOrgSpecificData(OrganisationUnit District, Date sDate, Date eDate, Date aggSDate, PeriodType periodType, String XmlFileName);
}
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/StateDistrictFeedbackReportService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/StateDistrictFeedbackReportService.java 2012-07-26 09:20:56 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/reports/StateDistrictFeedbackReportService.java 2013-09-25 09:45:36 +0000
@@ -1,18 +1,18 @@
package org.hisp.dhis.reports;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-import java.io.File;
import java.util.Date;
import java.util.Map;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+
/**
* <gaurav>,Date: 7/4/12, Time: 12:44 PM
*/
-public interface StateDistrictFeedbackReportService {
-
+public interface StateDistrictFeedbackReportService
+{
String ID = StateDistrictFeedbackReportService.class.getName();
- public Map<String, String> getDistrictFeedbackData(OrganisationUnit District, Date sDate, Date eDate, String XmlFileName);
+ public Map<String, String> getDistrictFeedbackData( OrganisationUnit District, Date sDate, Date eDate,
+ String XmlFileName );
}
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java 2011-04-27 17:15:13 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/surveydatavalue/SurveyDataValue.java 2013-09-25 09:45:36 +0000
@@ -41,6 +41,12 @@
public class SurveyDataValue implements Serializable
{
/**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -6551567526188061690L;
+
+
+ /**
* Part of the SurveyDataValue's composite ID
*/
private Survey survey;
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentDataValueService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentDataValueService.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentDataValueService.java 2013-09-25 09:45:36 +0000
@@ -15,6 +15,7 @@
@Transactional
public class DefaultEquipmentDataValueService implements EquipmentDataValueService
{
+ @SuppressWarnings( "unused" )
private static final Log log = LogFactory.getLog( DefaultEquipmentDataValueService.class );
// -------------------------------------------------------------------------
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentAttributeValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentAttributeValueStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentAttributeValueStore.java 2013-09-25 09:45:36 +0000
@@ -44,6 +44,7 @@
session.delete( equipmentAttributeValue );
}
+ @SuppressWarnings( "unchecked" )
@Override
public Collection<EquipmentAttributeValue> getAllEquipmentAttributeValues()
{
@@ -61,6 +62,7 @@
}
+ @SuppressWarnings( "unchecked" )
public Collection<EquipmentAttributeValue> getEquipmentAttributeValues( Equipment equipment )
{
Session session = sessionFactory.getCurrentSession();
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentTypeAttributeOptionStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentTypeAttributeOptionStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentTypeAttributeOptionStore.java 2013-09-25 09:45:36 +0000
@@ -43,6 +43,7 @@
session.delete( equipmentTypeAttributeOption );
}
+ @SuppressWarnings( "unchecked" )
@Override
public Collection<EquipmentTypeAttributeOption> getAllEquipmentTypeAttributeOptions()
{
@@ -66,6 +67,7 @@
return (EquipmentTypeAttributeOption) session.get( EquipmentTypeAttributeOption.class, id );
}
+ @SuppressWarnings( "unchecked" )
public Collection<EquipmentTypeAttributeOption> get( EquipmentTypeAttribute equipmentTypeAttribute )
{
Session session = sessionFactory.getCurrentSession();
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/DefaultModelDataEntryService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/DefaultModelDataEntryService.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/DefaultModelDataEntryService.java 2013-09-25 09:45:36 +0000
@@ -1296,6 +1296,7 @@
* Returns a Map of all DataElements in the given ProgramStage where the key
* is the DataElement identifier and the value is the DataElement.
*/
+ @SuppressWarnings( "unused" )
private Map<Integer, ModelTypeAttribute> getModelTypeAttributeMap( ModelType modelType )
{
Collection<ModelTypeAttribute> modelTypeAttributes = modelType.getModelTypeAttributes();
@@ -1313,8 +1314,4 @@
return map;
}
-
-
-
-
}
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelAttributeValueStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelAttributeValueStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelAttributeValueStore.java 2013-09-25 09:45:36 +0000
@@ -75,7 +75,6 @@
}
@Override
- @SuppressWarnings( "unchecked" )
public ModelAttributeValue modelAttributeValue( Model model ,ModelTypeAttribute modelTypeAttribute )
{
Session session = sessionFactory.getCurrentSession();
@@ -88,7 +87,6 @@
}
@Override
- @SuppressWarnings( "unchecked" )
public ModelAttributeValue modelAttributeValue( Model model ,ModelTypeAttribute modelTypeAttribute, ModelTypeAttributeOption modelTypeAttributeOption )
{
Session session = sessionFactory.getCurrentSession();
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelStore.java 2013-09-25 09:45:36 +0000
@@ -9,9 +9,9 @@
import org.hisp.dhis.coldchain.model.ModelStore;
import org.hisp.dhis.coldchain.model.ModelType;
import org.hisp.dhis.coldchain.model.ModelTypeAttribute;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-public class HibernateModelStore extends HibernateGenericStore<Model> implements ModelStore
+public class HibernateModelStore extends HibernateIdentifiableObjectStore<Model> implements ModelStore
{
// -------------------------------------------------------------------------
// Dependencies
@@ -22,12 +22,6 @@
// Model
// -------------------------------------------------------------------------
- @Override
- @SuppressWarnings( "unchecked" )
- public Collection<Model> getAllModels()
- {
- return sessionFactory.getCurrentSession().createCriteria( Model.class ).list();
- }
@Override
public Model getModel( int id )
@@ -43,6 +37,13 @@
@Override
@SuppressWarnings( "unchecked" )
+ public Collection<Model> getAllModels()
+ {
+ return sessionFactory.getCurrentSession().createCriteria( Model.class ).list();
+ }
+
+ @Override
+ @SuppressWarnings( "unchecked" )
public Collection<Model> getModels( ModelType modelType )
{
return getCriteria( Restrictions.eq( "modelType", modelType ) ).list();
@@ -61,6 +62,9 @@
return getCriteria( Restrictions.eq( "modelType", modelType ) ).setFirstResult( min ).setMaxResults( max ).list();
}
+
+
+
//public int getCountModel( ModelType modelType, ModelTypeAttribute modelTypeAttribute, String searchText )
public int getCountModel( ModelType modelType, ModelTypeAttribute modelTypeAttribute, String searchText, String searchBy )
{
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeGroupStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeGroupStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeGroupStore.java 2013-09-25 09:45:36 +0000
@@ -6,7 +6,7 @@
import org.hisp.dhis.coldchain.model.ModelType;
import org.hisp.dhis.coldchain.model.ModelTypeAttributeGroup;
import org.hisp.dhis.coldchain.model.ModelTypeAttributeGroupStore;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
/**
* @author Mithilesh Kumar Thakur
@@ -14,7 +14,7 @@
* @version HibernateModelTypeAttributeGroupStore.javaOct 9, 2012 3:56:11 PM
*/
-public class HibernateModelTypeAttributeGroupStore extends HibernateGenericStore<ModelTypeAttributeGroup> implements ModelTypeAttributeGroupStore
+public class HibernateModelTypeAttributeGroupStore extends HibernateIdentifiableObjectStore<ModelTypeAttributeGroup> implements ModelTypeAttributeGroupStore
{
// -------------------------------------------------------------------------
// Dependencies
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeOptionStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeOptionStore.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/model/hibernate/HibernateModelTypeAttributeOptionStore.java 2013-09-25 09:45:36 +0000
@@ -45,6 +45,7 @@
session.delete( modelTypeAttributeOption );
}
+ @SuppressWarnings( "unchecked" )
@Override
public Collection<ModelTypeAttributeOption> getAllModelTypeAttributeOptions()
{
=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java 2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/DefaultCCEMReportManager.java 2013-09-25 09:45:36 +0000
@@ -1397,11 +1397,12 @@
}
SqlRowSet rs = jdbcTemplate.queryForRowSet( query );
- Integer count = 1;
- String eValue = null;
+
+ //Integer count = 1;
+ //String eValue = null;
while ( rs.next() )
{
- String eqValue = rs.getString( 2 );
+ //String eqValue = rs.getString( 2 );
System.out.println( "EQUIPMENT VALUE IS: " + rs.getString( 1 ) );
}
}
@@ -1409,7 +1410,9 @@
{
throw new RuntimeException( "Exception: ", e );
}
+
System.out.println( "Size is: " + countMap.size() );
+
return countMap;
}
=== modified file 'local/in/dhis-web-maintenance-in/pom.xml'
--- local/in/dhis-web-maintenance-in/pom.xml 2013-03-25 05:08:43 +0000
+++ local/in/dhis-web-maintenance-in/pom.xml 2013-09-25 09:45:36 +0000
@@ -6,7 +6,7 @@
<parent>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-web</artifactId>
- <version>2.12-SNAPSHOT</version>
+ <version>2.13-SNAPSHOT</version>
</parent>
<artifactId>dhis-web-maintenance-in</artifactId>
=== modified file 'local/in/pom.xml'
--- local/in/pom.xml 2013-08-13 12:39:25 +0000
+++ local/in/pom.xml 2013-09-25 09:45:36 +0000
@@ -20,11 +20,11 @@
<!--<module>dhis-web-dashboard</module>
<module>dhis-web-dataentry-linelisting</module>
<module>dhis-web-excelimport</module>-->
- <!--<module>dhis-web-linelisting-in</module> -->
- <!--<module>dhis-web-maintenance-in</module>-->
-<!-- <module>dhis-web-mobile</module>
+ <!--<module>dhis-web-linelisting-in</module> -->
+ <module>dhis-web-maintenance-in</module>
+<!--<module>dhis-web-mobile</module>
<module>dhis-web-reports-in</module>-->
- <!--<module>dhis-web-reports-national</module>
+<!--<module>dhis-web-reports-national</module>
<module>dhis-web-survey</module>
<module>dhis-web-alert</module>-->
<!--<module>dhis-web-validationrule-in</module>-->