------------------------------------------------------------ revno: 13127 committer: Lars Helge Ă˜verland <larshe...@gmail.com> branch nick: dhis2 timestamp: Tue 2013-12-03 16:16:58 +0100 message: Applied patch from Pooben. Includes UIDs in 1.4 file import. modified: dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/dataElement.sqlmap.xml dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicator.sqlmap.xml dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicatorType.sqlmap.xml dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnit.sqlmap.xml dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnitGroup.sqlmap.xml dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/routineDataValue.sqlmap.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 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/importer/DefaultDhis14FileImportService.java 2013-12-03 15:16:58 +0000 @@ -796,6 +796,16 @@ return false; } + count = (Integer) queryManager.queryForObject( "getRoutineDataArchiveValuesOutOfRange", null ); + + if ( count != null && count > 0 ) + { + state.setMessage( "routine_data_archive_contains_values_out_of_range" ); + log.error( "Table RoutineDataArchive contains values larger than 2^31 which is out of range" ); + + return false; + } + count = (Integer) queryManager.queryForObject( "getSemiPermanentDataValuesOutOfRange", null ); if ( count != null && count > 0 ) === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/RoutineDataValueRowHandler.java 2013-12-03 15:16:58 +0000 @@ -133,6 +133,7 @@ value.setPeriod( period ); value.setSource( source ); value.setStoredBy( dhis14Value.getStoredBy() ); + value.setComment( dhis14Value.getComment() ); if ( dhis14Value.getValue() != null ) { === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/dataElement.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/dataElement.sqlmap.xml 2013-02-04 20:56:45 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/dataElement.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -23,6 +23,7 @@ <result property="aggregationOperator" column="AggregateOperator" typeHandler="aggregationOperatorTypeHandler"/> <result property="sortOrder" column="SortOrder"/> <result property="lastUpdated" column="LastUpdated"/> + <result property="uid" column="UID"/> </resultMap> <!-- Statement --> === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml 2010-03-04 12:22:49 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -18,6 +18,7 @@ <result property="name" column="OrgUnitGroupSetName"/> <result property="description" column="OrgUnitGroupSetDescription"/> <result property="compulsory" column="OrgUnitGroupSetCompulsory" typeHandler="booleanTypeHandler"/> + <result property="uid" column="UID"/> </resultMap> <!-- Statement --> === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicator.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicator.sqlmap.xml 2012-11-27 13:52:28 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicator.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -27,6 +27,7 @@ <result property="denominatorDescription" column="IndicatorDenominatorDescription"/> <result property="sortOrder" column="SortOrder"/> <result property="lastUpdated" column="LastUpdated"/> + <result property="uid" column="UID"/> </resultMap> <!-- Statement --> === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicatorType.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicatorType.sqlmap.xml 2009-11-03 13:58:21 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/indicatorType.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -16,6 +16,7 @@ <result property="id" column="IndicatorTypeID"/> <result property="name" column="IndicatorTypeName"/> <result property="factor" column="Factor"/> + <result property="uid" column="UID"/> </resultMap> <!-- Statement --> === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnit.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnit.sqlmap.xml 2011-11-22 12:46:08 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnit.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -22,6 +22,7 @@ <result property="active" column="Active" typeHandler="booleanTypeHandler"/> <result property="comment" column="Comment"/> <result property="lastUpdated" column="LastUpdated"/> + <result property="uid" column="UID"/> </resultMap> <!-- Statement --> === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnitGroup.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnitGroup.sqlmap.xml 2009-03-03 16:46:36 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/organisationUnitGroup.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -15,6 +15,7 @@ <resultMap class="organisationUnitGroup" id="organisationUnitGroupResultMap"> <result property="id" column="OrgUnitGroupID"/> <result property="name" column="OrgUnitGroupName"/> + <result property="uid" column="UID"/> </resultMap> <!-- Statement --> === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/routineDataValue.sqlmap.xml' --- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/routineDataValue.sqlmap.xml 2013-07-26 06:22:55 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/routineDataValue.sqlmap.xml 2013-12-03 15:16:58 +0000 @@ -19,18 +19,19 @@ <result property="value" column="EntryNumber"/> <result property="yesNo" column="EntryYesNo"/> <result property="storedBy" column="LastUserID"/> + <result property="comment" column="Comment"/> </resultMap> <!-- Statement --> <select id="getRoutineDataValues" resultMap="routineDataValueResultMap"> - SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID FROM RoutineData UNION - SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID FROM RoutineDataArchive + SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID, Comment FROM RoutineData UNION + SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID, Comment FROM RoutineDataArchive </select> <select id="getRoutineDataValuesLastUpdated" parameterClass="java.util.Date" resultMap="routineDataValueResultMap"> - SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID FROM RoutineData WHERE LastUpdated > #value# UNION - SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID FROM RoutineDataArchive WHERE LastUpdated > #value# + SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID, Comment FROM RoutineData WHERE LastUpdated > #value# UNION + SELECT DataElementID, DataPeriodID, OrgUnitID, EntryNumber, EntryYesNo, LastUserID, Comment FROM RoutineDataArchive WHERE LastUpdated > #value# </select> <select id="getDistinctPeriodIdentifiers" resultClass="java.lang.Integer"> @@ -41,5 +42,9 @@ <select id="getRoutineDataValuesOutOfRange" resultClass="java.lang.Integer"> SELECT COUNT(*) FROM RoutineData WHERE EntryNumber > 2147483647 </select> + + <select id="getRoutineDataArchiveValuesOutOfRange" resultClass="java.lang.Integer"> + SELECT COUNT(*) FROM RoutineDataArchive WHERE EntryNumber > 2147483647 + </select> </sqlMap>
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp