dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02921
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 964: Added lastUpdated property to DataElement, Indicator, OrganisationUnit.
------------------------------------------------------------
revno: 964
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-11-03 12:04:45 +0100
message:
Added lastUpdated property to DataElement, Indicator, OrganisationUnit.
added:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.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/dataelement/DefaultDataElementService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java
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/indicator/hibernate/Indicator.hbm.xml
dhis-2/dhis-services/dhis-service-organisationunit/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java
dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2009-10-27 18:39:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2009-11-03 11:04:45 +0000
@@ -30,6 +30,7 @@
// import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -115,6 +116,11 @@
private String url;
/**
+ * The date this data element was last updated.
+ */
+ private Date lastUpdated;
+
+ /**
* The data sets which this data element is a member of.
*/
private Set<DataSet> dataSets = new HashSet<DataSet>();
@@ -416,6 +422,16 @@
this.url = url;
}
+ public Date getLastUpdated()
+ {
+ return lastUpdated;
+ }
+
+ public void setLastUpdated( Date lastUpdated )
+ {
+ this.lastUpdated = lastUpdated;
+ }
+
public Set<DataSet> getDataSets()
{
return dataSets;
=== 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 2009-11-02 15:55:44 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2009-11-03 11:04:45 +0000
@@ -28,6 +28,7 @@
*/
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import org.hisp.dhis.common.IdentifiableObject;
@@ -63,7 +64,9 @@
private Integer sortOrder;
private String url;
-
+
+ private Date lastUpdated;
+
private List<IndicatorGroupSet> groupSets = new ArrayList<IndicatorGroupSet>();
// -------------------------------------------------------------------------
@@ -259,6 +262,16 @@
this.sortOrder = sortOrder;
}
+ public Date getLastUpdated()
+ {
+ return lastUpdated;
+ }
+
+ public void setLastUpdated( Date lastUpdated )
+ {
+ this.lastUpdated = lastUpdated;
+ }
+
public String getUrl()
{
return url;
=== 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 2009-10-15 17:28:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2009-11-03 11:04:45 +0000
@@ -63,6 +63,8 @@
private String longitude;
private String url;
+
+ private Date lastUpdated;
private transient int level;
@@ -330,6 +332,16 @@
this.url = url;
}
+ public Date getLastUpdated()
+ {
+ return lastUpdated;
+ }
+
+ public void setLastUpdated( Date lastUpdated )
+ {
+ this.lastUpdated = lastUpdated;
+ }
+
public int getLevel()
{
return level;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2009-11-01 20:57:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2009-11-03 11:04:45 +0000
@@ -29,6 +29,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -93,6 +94,8 @@
dataElement.setUuid( UUIdUtils.getUUId() );
}
+ dataElement.setLastUpdated( new Date() );
+
int id = dataElementStore.addDataElement( dataElement );
i18nService.addObject( dataElement );
@@ -102,6 +105,8 @@
public void updateDataElement( DataElement dataElement )
{
+ dataElement.setLastUpdated( new Date() );
+
dataElementStore.updateDataElement( dataElement );
i18nService.verify( dataElement );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java 2009-11-01 20:57:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java 2009-11-03 11:04:45 +0000
@@ -29,6 +29,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.Iterator;
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
@@ -94,6 +95,8 @@
indicator.setUuid( UUIdUtils.getUUId() );
}
+ indicator.setLastUpdated( new Date() );
+
int id = indicatorStore.addIndicator( indicator );
i18nService.addObject( indicator );
@@ -103,6 +106,8 @@
public void updateIndicator( Indicator indicator )
{
+ indicator.setLastUpdated( new Date() );
+
indicatorStore.updateIndicator( indicator );
i18nService.verify( indicator );
=== 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 2009-08-31 15:37:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2009-11-03 11:04:45 +0000
@@ -49,6 +49,8 @@
<property name="sortOrder"/>
<property name="url"/>
+
+ <property name="lastUpdated"/>
<set name="dataSets" table="datasetmembers" inverse="true">
<key column="dataelementid"/>
=== 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 2009-08-31 15:37:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2009-11-03 11:04:45 +0000
@@ -58,5 +58,7 @@
<property name="url"/>
+ <property name="lastUpdated"/>
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-organisationunit/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java'
--- dhis-2/dhis-services/dhis-service-organisationunit/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2009-10-01 09:24:46 +0000
+++ dhis-2/dhis-services/dhis-service-organisationunit/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java 2009-11-03 11:04:45 +0000
@@ -92,6 +92,8 @@
organisationUnit.setUuid( UUIdUtils.getUUId() );
}
+ organisationUnit.setLastUpdated( new Date() );
+
int id = sourceStore.addSource( organisationUnit );
i18nService.addObject( organisationUnit );
@@ -103,6 +105,8 @@
public void updateOrganisationUnit( OrganisationUnit organisationUnit )
{
+ organisationUnit.setLastUpdated( new Date() );
+
sourceStore.updateSource( organisationUnit );
i18nService.verify( organisationUnit );
=== modified file 'dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2009-08-31 15:37:16 +0000
+++ dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2009-11-03 11:04:45 +0000
@@ -53,5 +53,7 @@
<property name="url"/>
+ <property name="lastUpdated"/>
+
</joined-subclass>
</hibernate-mapping>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/index.vm 2009-11-03 11:04:45 +0000
@@ -0,0 +1,10 @@
+
+<h3>$i18n.getString( "dhis-web-maintenance-organisationunit" )</h3>
+
+<ul class="introList">
+ #introListItem( "organisationUnit.action" "org_unit" )
+ #introListItem( "organisationUnitGroup.action" "org_unit_group" )
+ #introListItem( "organisationUnitGroupSet.action" "org_unit_group_set" )
+ #introListItem( "organisationUnitLevel.action" "org_unit_level" )
+ #introListItem( "hierarchyOperations.action" "hierarchy_operations_menu" )
+</ul>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm 2009-11-03 11:04:45 +0000
@@ -0,0 +1,9 @@
+
+<h3>$i18n.getString( "dhis-web-maintenance-user" )</h3>
+
+<ul class="introList">
+ #introListItem( "alluser.action" "user" )
+ #introListItem( "user.action" "user_by_orgunit" )
+ #introListItem( "allRole.action" "user_role" )
+ #introListItem( "changePassword.action" "change_password" )
+</ul>
=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm 2009-11-03 11:04:45 +0000
@@ -0,0 +1,13 @@
+
+<h3>$i18n.getString( "dhis-web-reporting" )</h3>
+
+<ul class="introList">
+ #introListItem( "displayViewReportFormVerifyConfiguration.action" "standard_report" )
+ #introListItem( "dataSetReport.action" "dataset_report" )
+ #introListItem( "displayViewDocumentForm.action" "static_report" )
+ #introListItem( "tallySheetGenerator.action" "tally_sheet_generator" )
+ #introListItem( "displayViewChartForm.action" "chart" )
+ #introListItem( "displayPivotTableForm.action" "pivot_table" )
+ #introListItem( "displayManageTableForm.action" "report_table" )
+ #introListItem( "displayViewDataCompletenessForm.action" "data_completeness" )
+</ul>
=== added file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm 2009-11-03 11:04:45 +0000
@@ -0,0 +1,9 @@
+
+<h3>$i18n.getString( "dhis-web-validationrule" )</h3>
+
+<ul class="introList">
+ #introListItem( "showValidationRuleForm.action" "validation_rule" )
+ #introListItem( "showValidationRuleGroupForm.action" "validation_rule_group" )
+ #introListItem( "showRunValidationForm.action" "run_validation" )
+ #introListItem( "outlierAnalysisForm.action" "outlier_analysis" )
+</ul>
\ No newline at end of file