← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22313: moved hbms/stores from dhis-service-reporting to dhis-service-core

 

------------------------------------------------------------
revno: 22313
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-03-15 16:34:18 +0700
message:
  moved hbms/stores from dhis-service-reporting to dhis-service-core
removed:
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/interpretation/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml
added:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/hibernate/
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/ChartDeletionHandler.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportDeletionHandler.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.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
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java	2016-03-15 09:34:18 +0000
@@ -0,0 +1,101 @@
+package org.hisp.dhis.dashboard.hibernate;
+
+/*
+ * Copyright (c) 2004-2016, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hibernate.Query;
+import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.dashboard.Dashboard;
+import org.hisp.dhis.dashboard.DashboardItem;
+import org.hisp.dhis.dashboard.DashboardItemStore;
+import org.hisp.dhis.document.Document;
+import org.hisp.dhis.mapping.Map;
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.reporttable.ReportTable;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public class HibernateDashboardItemStore extends HibernateIdentifiableObjectStore<DashboardItem>
+    implements DashboardItemStore
+{
+    @Override
+    public int countMapDashboardItems( Map map )
+    {
+        Query query = getQuery( "select count(distinct c) from DashboardItem c where c.map=:map" );
+        query.setEntity( "map", map );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public int countChartDashboardItems( Chart chart )
+    {
+        Query query = getQuery( "select count(distinct c) from DashboardItem c where c.chart=:chart" );
+        query.setEntity( "chart", chart );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public int countReportTableDashboardItems( ReportTable reportTable )
+    {
+        Query query = getQuery( "select count(distinct c) from DashboardItem c where c.reportTable=:reportTable" );
+        query.setEntity( "reportTable", reportTable );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public int countReportDashboardItems( Report report )
+    {
+        Query query = getQuery( "select count(distinct c) from DashboardItem c where :report in elements(c.reports)" );
+        query.setEntity( "report", report );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public int countDocumentDashboardItems( Document document )
+    {
+        Query query = getQuery( "select count(distinct c) from DashboardItem c where :document in elements(c.resources)" );
+        query.setEntity( "document", document );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public Dashboard getDashboardFromDashboardItem( DashboardItem dashboardItem )
+    {
+        Query query = getQuery( "from Dashboard d where :item in elements(d.items)" );
+        query.setEntity( "item", dashboardItem );
+
+        return (Dashboard) query.uniqueResult();
+    }
+}

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java	2016-03-15 09:34:18 +0000
@@ -0,0 +1,110 @@
+package org.hisp.dhis.interpretation.hibernate;
+
+/*
+ * Copyright (c) 2004-2016, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hibernate.Query;
+import org.hisp.dhis.chart.Chart;
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.interpretation.Interpretation;
+import org.hisp.dhis.interpretation.InterpretationStore;
+import org.hisp.dhis.mapping.Map;
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.user.User;
+
+import java.util.List;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class HibernateInterpretationStore
+    extends HibernateIdentifiableObjectStore<Interpretation> implements InterpretationStore
+{
+    @SuppressWarnings("unchecked")
+    public List<Interpretation> getInterpretations( User user )
+    {
+        String hql = "select distinct i from Interpretation i left join i.comments c " +
+            "where i.user = :user or c.user = :user order by i.lastUpdated desc";
+
+        Query query = getQuery( hql );
+        query.setEntity( "user", user );
+
+        return query.list();
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<Interpretation> getInterpretations( User user, int first, int max )
+    {
+        String hql = "select distinct i from Interpretation i left join i.comments c " +
+            "where i.user = :user or c.user = :user order by i.lastUpdated desc";
+
+        Query query = getQuery( hql );
+        query.setEntity( "user", user );
+        query.setMaxResults( first );
+        query.setMaxResults( max );
+
+        return query.list();
+    }
+
+    @Override
+    public int countMapInterpretations( Map map )
+    {
+        Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where c.map=:map" );
+        query.setEntity( "map", map );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public int countChartInterpretations( Chart chart )
+    {
+        Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where c.chart=:chart" );
+        query.setEntity( "chart", chart );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public int countReportTableInterpretations( ReportTable reportTable )
+    {
+        Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where c.reportTable=:reportTable" );
+        query.setEntity( "reportTable", reportTable );
+
+        return ((Long) query.uniqueResult()).intValue();
+    }
+
+    @Override
+    public Interpretation getByChartId( int id )
+    {
+        String hql = "from Interpretation i where i.chart.id = " + id;
+        
+        Query query = sessionFactory.getCurrentSession().createQuery( hql );
+        
+        return (Interpretation) query.uniqueResult();
+    }
+}

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2016-03-14 17:47:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml	2016-03-15 09:34:18 +0000
@@ -81,6 +81,47 @@
 
   <!-- Store definitions -->
 
+  <bean id="org.hisp.dhis.report.ReportStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
+    <property name="clazz" value="org.hisp.dhis.report.Report" />
+    <property name="sessionFactory" ref="sessionFactory" />
+    <property name="cacheable" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.chart.ChartStore" class="org.hisp.dhis.common.hibernate.HibernateAnalyticalObjectStore">
+    <property name="clazz" value="org.hisp.dhis.chart.Chart" />
+    <property name="sessionFactory" ref="sessionFactory" />
+    <property name="cacheable" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.document.DocumentStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
+    <property name="clazz" value="org.hisp.dhis.document.Document" />
+    <property name="sessionFactory" ref="sessionFactory" />
+    <property name="cacheable" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.reporttable.ReportTableStore" class="org.hisp.dhis.common.hibernate.HibernateAnalyticalObjectStore">
+    <property name="clazz" value="org.hisp.dhis.reporttable.ReportTable" />
+    <property name="sessionFactory" ref="sessionFactory" />
+    <property name="cacheable" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.dashboard.DashboardStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
+    <property name="clazz" value="org.hisp.dhis.dashboard.Dashboard" />
+    <property name="sessionFactory" ref="sessionFactory" />
+    <property name="cacheable" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.dashboard.DashboardItemStore" class="org.hisp.dhis.dashboard.hibernate.HibernateDashboardItemStore">
+    <property name="clazz" value="org.hisp.dhis.dashboard.DashboardItem" />
+    <property name="sessionFactory" ref="sessionFactory" />
+    <property name="cacheable" value="true" />
+  </bean>
+
+  <bean id="org.hisp.dhis.interpretation.InterpretationStore" class="org.hisp.dhis.interpretation.hibernate.HibernateInterpretationStore">
+    <property name="clazz" value="org.hisp.dhis.interpretation.Interpretation" />
+    <property name="sessionFactory" ref="sessionFactory" />
+  </bean>
+
   <bean id="org.hisp.dhis.dataentryform.DataEntryFormStore" class="org.hisp.dhis.dataentryform.hibernate.HibernateDataEntryFormStore">
     <property name="clazz" value="org.hisp.dhis.dataentryform.DataEntryForm" />
     <property name="sessionFactory" ref="sessionFactory" />

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+  >
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.chart.Chart" table="chart">
+
+    <cache usage="read-write" />
+
+    <id name="id" column="chartid">
+      <generator class="native" />
+    </id>
+    &identifiableProperties;
+
+    <property name="name" column="name" not-null="true" length="230" />
+
+    <property name="domainAxisLabel" />
+
+    <property name="rangeAxisLabel" />
+
+    <property name="type" length="40" not-null="true">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.chart.ChartType</param>
+        <param name="type">12</param>
+      </type>
+	</property>
+	
+    <property name="series" />
+
+    <property name="category" />
+
+    <list name="filterDimensions" table="chart_filters">
+      <cache usage="read-write" />
+      <key column="chartid" />
+      <list-index column="sort_order" base="0" />
+      <element type="string" column="filter" />
+    </list>
+
+    <property name="hideLegend" />
+
+    <property name="regression" />
+
+    <property name="hideTitle" />
+
+    <property name="hideSubtitle" />
+    
+    <property name="title" />
+
+    <property name="targetLineValue" />
+
+    <property name="targetLineLabel" />
+
+    <property name="baseLineValue" />
+
+    <property name="baseLineLabel" />
+
+	<list name="dataDimensionItems" table="chart_datadimensionitems" cascade="all, delete-orphan">
+	  <cache usage="read-write" />
+	  <key column="chartid" foreign-key="fk_chart_datadimensionitems_chartid" />
+	  <list-index column="sort_order" base="0" />
+	  <many-to-many column="datadimensionitemid" class="org.hisp.dhis.common.DataDimensionItem"
+        foreign-key="fk_chart_datadimensionitems_datadimensionitemid" />
+	</list>
+	
+    <list name="organisationUnits" table="chart_organisationunits">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_organisationunits_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit"
+        foreign-key="fk_chart_organisationunits_organisationunitid" />
+    </list>
+
+    <list name="periods" table="chart_periods">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_periods_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="periodid" class="org.hisp.dhis.period.Period"
+        foreign-key="fk_chart_periods_periodid" />
+    </list>
+
+    <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
+      cascade="all-delete-orphan" foreign-key="fk_chart_relativeperiodsid" />
+
+    <list name="categoryDimensions" table="chart_categorydimensions" cascade="all-delete-orphan">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_categorydimensions_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="categorydimensionid" class="org.hisp.dhis.dataelement.DataElementCategoryDimension"
+        foreign-key="fk_chart_categorydimensions_categorydimensionid" />
+    </list>
+    
+    <list name="dataElementGroups" table="chart_dataelementgroups">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_dataelementgroups_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="dataelementgroupid" class="org.hisp.dhis.dataelement.DataElementGroup"
+        foreign-key="fk_chart_dataelementgroups_dataelementgroupid" />
+    </list>
+
+    <list name="organisationUnitGroups" table="chart_orgunitgroups">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_orgunitunitgroups_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
+        foreign-key="fk_chart_orgunitgroups_orgunitgroupid" />
+    </list>
+    
+    <list name="categoryOptionGroups" table="chart_categoryoptiongroups">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_categoryoptiongroups_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="categoryoptiongroupid" class="org.hisp.dhis.dataelement.CategoryOptionGroup"
+        foreign-key="fk_chart_categoryoptiongroups_categoryoptiongroupid" />
+    </list>
+    
+    <list name="organisationUnitLevels" table="chart_orgunitlevels">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_orgunitlevels_chartid" />
+      <list-index column="sort_order" base="0" />
+      <element column="orgunitlevel" type="integer" />
+    </list>
+    
+    <list name="itemOrganisationUnitGroups" table="chart_itemorgunitgroups">
+      <cache usage="read-write" />
+      <key column="chartid" foreign-key="fk_chart_itemorgunitunitgroups_chartid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
+        foreign-key="fk_chart_itemorgunitgroups_orgunitgroupid" />
+    </list>
+    
+    <property name="userOrganisationUnit" />
+
+    <property name="userOrganisationUnitChildren" />
+
+    <property name="userOrganisationUnitGrandChildren" />
+
+    <property name="aggregationType" length="40">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.analytics.AggregationType</param>
+        <param name="type">12</param>
+      </type> 
+	</property>
+	
+    <property name="completedOnly" column="completedonly" />
+	
+    <property name="showData" />
+
+    <property name="hideEmptyRows" />
+
+    <property name="rangeAxisMaxValue" />
+
+    <property name="rangeAxisMinValue" />
+
+    <property name="rangeAxisSteps" />
+
+    <property name="rangeAxisDecimals" />
+    
+    <property name="sortOrder" />
+
+    <!-- Access properties -->
+    <property name="externalAccess" />
+
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_chart_userid" />
+
+    <property name="publicAccess" length="8" />
+
+    <set name="userGroupAccesses" table="chartusergroupaccesses">
+      <cache usage="read-write" />
+      <key column="chartid" />
+      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
+    </set>
+
+  </class>
+</hibernate-mapping>

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+  >
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.dashboard.Dashboard" table="dashboard">
+
+    <cache usage="read-write" />
+
+    <id name="id" column="dashboardid">
+      <generator class="native" />
+    </id>
+    &identifiableProperties;
+
+    <property name="name" column="name" not-null="true" unique="false" length="230" />
+
+    <list name="items" table="dashboard_items" cascade="save-update">
+      <key column="dashboardid" foreign-key="fk_dashboard_items_dashboardid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="dashboarditemid" class="org.hisp.dhis.dashboard.DashboardItem"
+        foreign-key="fk_dashboard_items_dashboarditemid" />
+    </list>
+
+    <!-- Access properties -->
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_dashboard_userid" />
+
+    <property name="externalAccess" />
+
+    <property name="publicAccess" length="8" />
+
+    <set name="userGroupAccesses" table="dashboardusergroupaccesses">
+      <cache usage="read-write" />
+      <key column="dashboardid" />
+      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
+    </set>
+
+  </class>
+</hibernate-mapping>

=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+  >
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.dashboard.DashboardItem" table="dashboarditem">
+
+    <cache usage="read-write" />
+
+    <id name="id" column="dashboarditemid">
+      <generator class="native" />
+    </id>
+    &identifiableProperties;
+
+    <many-to-one name="chart" class="org.hisp.dhis.chart.Chart" column="chartid" foreign-key="fk_dashboarditem_chartid" />
+    
+    <many-to-one name="eventChart" class="org.hisp.dhis.eventchart.EventChart" column="eventchartid" foreign-key="fk_dashboarditem_eventchartid" />
+    
+    <many-to-one name="map" class="org.hisp.dhis.mapping.Map" column="mapid" foreign-key="fk_dashboarditem_mapid" />
+    
+    <many-to-one name="reportTable" class="org.hisp.dhis.reporttable.ReportTable" foreign-key="fk_dashboarditem_reporttableid" />
+    
+    <many-to-one name="eventReport" class="org.hisp.dhis.eventreport.EventReport" foreign-key="fk_dashboarditem_eventreportid" />
+    
+    <list name="users" table="dashboarditem_users">
+      <key column="dashboarditemid" foreign-key="fk_dashboarditem_users_dashboardid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="userid" class="org.hisp.dhis.user.User" foreign-key="fk_dashboarditem_users_userinfoid" />
+    </list>
+    
+    <list name="reports" table="dashboarditem_reports">
+      <key column="dashboarditemid" foreign-key="fk_dashboarditem_reports_dashboardid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="reportid" class="org.hisp.dhis.report.Report" foreign-key="fk_dashboarditem_reports_reportid" />
+    </list>
+ 	
+    <list name="resources" table="dashboarditem_resources">
+      <key column="dashboarditemid" foreign-key="fk_dashboarditem_resources_dashboardid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="resourceid" class="org.hisp.dhis.document.Document" foreign-key="fk_dashboarditem_resources_resourceid" />
+    </list>
+        
+    <property name="messages" />
+
+    <property name="shape" length="50">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.dashboard.DashboardItemShape</param>
+        <param name="type">12</param>
+      </type>
+    </property>
+
+  </class>
+</hibernate-mapping>
\ No newline at end of file

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+  >
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.document.Document" table="document">
+
+    <cache usage="read-write" />
+
+    <id name="id" column="documentid">
+      <generator class="native" />
+    </id>
+    &identifiableProperties;
+
+    <property name="name" column="name" not-null="true" unique="false" length="230" />
+
+    <property name="url" not-null="true" type="text" />
+
+    <property name="external" not-null="true" />
+
+    <property name="contentType" />
+
+    <property name="attachment" />
+
+    <!-- Dynamic attribute values -->
+    <set name="attributeValues" table="documentattributevalues" cascade="delete-orphan">
+      <cache usage="read-write" />
+      <key column="documentid" />
+      <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" unique="true" />
+    </set>
+
+    <!-- Access properties -->
+    <property name="externalAccess" />
+
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_document_userid" />
+
+    <property name="publicAccess" length="8" />
+
+    <set name="userGroupAccesses" table="documentusergroupaccesses">
+      <cache usage="read-write" />
+      <key column="documentid" />
+      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
+    </set>
+
+  </class>
+</hibernate-mapping>

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.interpretation.Interpretation" table="interpretation">
+
+    <id name="id" column="interpretationid">
+      <generator class="native" />
+    </id>
+
+    <property name="uid" column="uid" length="11" />
+    
+    <property name="lastUpdated" type="timestamp" index="interpretation_lastupdated" />
+
+    <many-to-one name="chart" class="org.hisp.dhis.chart.Chart" column="chartid"
+      foreign-key="fk_interpretation_chartid" />
+
+    <many-to-one name="map" class="org.hisp.dhis.mapping.Map" column="mapid"
+      foreign-key="fk_interpretation_mapid" />
+
+    <many-to-one name="reportTable" class="org.hisp.dhis.reporttable.ReportTable" column="reporttableid"
+      foreign-key="fk_interpretation_reporttableid" />
+
+    <many-to-one name="dataSet" class="org.hisp.dhis.dataset.DataSet" column="datasetid"
+      foreign-key="fk_interpretation_datasetid" />
+
+    <many-to-one name="period" class="org.hisp.dhis.period.Period" column="periodid"
+      foreign-key="fk_interpretation_periodid" />
+
+    <many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"
+      foreign-key="fk_interpretation_organisationunitid" />
+
+    <property name="text" column="interpretationtext" type="text" />
+
+    <property name="created" not-null="true" type="timestamp" />
+
+    <list name="comments" table="interpretation_comments" cascade="all,delete-orphan">
+      <key column="interpretationid" foreign-key="fk_interpretation_comments_interpretationid" />
+      <list-index column="sort_order" base="1" />
+      <many-to-many class="org.hisp.dhis.interpretation.InterpretationComment" column="interpretationcommentid"
+        unique="true" foreign-key="fk_interpretation_comments_interpretationcommentid" />
+    </list>
+
+    <!-- Access properties -->
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_interpretation_userid" />
+
+    <property name="publicAccess" length="8" />
+
+    <set name="userGroupAccesses" table="interpretationusergroupaccesses">
+      <cache usage="read-write" />
+      <key column="interpretationid" />
+      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
+    </set>
+
+  </class>
+</hibernate-mapping>
\ No newline at end of file

=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.interpretation.InterpretationComment" table="interpretationcomment">
+
+    <id name="id" column="interpretationcommentid">
+      <generator class="native" />
+    </id>
+	
+    <property name="uid" column="uid" length="11" />
+    <property name="lastUpdated" type="timestamp"/>
+	
+    <property name="text" column="commenttext" type="text" />
+
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid"
+		foreign-key="fk_interpretationcomment_userid" not-null="true" />
+		
+	<property name="created" not-null="true" type="timestamp" />
+
+  </class>
+</hibernate-mapping>
\ No newline at end of file

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+  >
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.report.Report" table="report">
+
+    <cache usage="read-write" />
+
+    <id name="id" column="reportid">
+      <generator class="native" />
+    </id>
+    &identifiableProperties;
+
+    <property name="name" column="name" not-null="true" unique="false" length="230" />
+
+    <property name="type" length="50">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.report.ReportType</param>
+        <param name="type">12</param>
+      </type>
+    </property>
+
+    <property name="designContent" type="text" />
+
+    <many-to-one name="reportTable" class="org.hisp.dhis.reporttable.ReportTable" column="reporttableid"
+      foreign-key="fk_report_reporttableid" />
+
+    <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
+      cascade="all-delete-orphan" foreign-key="fk_report_relativeperiodsid" />
+
+    <component name="reportParams">
+      <property name="paramReportingMonth" />
+      <property name="paramOrganisationUnit" />
+    </component>
+
+    <property name="cacheStrategy" length="40">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.common.cache.CacheStrategy</param>
+        <param name="type">12</param>
+      </type>
+    </property>
+
+    <!-- Access properties -->
+    <property name="externalAccess" />
+
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_report_userid" />
+
+    <property name="publicAccess" length="8" />
+
+    <set name="userGroupAccesses" table="reportusergroupaccesses">
+      <cache usage="read-write" />
+      <key column="reportid" />
+      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
+    </set>
+
+  </class>
+</hibernate-mapping>

=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable'
=== added directory 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/hibernate'
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2016-03-15 09:34:18 +0000
@@ -0,0 +1,199 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+  >
+
+<hibernate-mapping>
+  <class name="org.hisp.dhis.reporttable.ReportTable" table="reporttable">
+
+    <cache usage="read-write" />
+
+    <id name="id" column="reporttableid">
+      <generator class="native" />
+    </id>
+    &identifiableProperties;
+
+    <property name="name" column="name" not-null="true" unique="false" length="230" />
+
+    <property name="regression" />
+
+    <property name="cumulative" />
+
+	<list name="dataDimensionItems" table="reporttable_datadimensionitems" cascade="all, delete-orphan">
+	  <cache usage="read-write" />
+	  <key column="reporttableid" foreign-key="fk_reporttable_datadimensionitems_reporttableid" />
+	  <list-index column="sort_order" base="0" />
+	  <many-to-many column="datadimensionitemid" class="org.hisp.dhis.common.DataDimensionItem"
+        foreign-key="fk_reporttable_datadimensionitems_datadimensionitemid" />
+	</list>
+
+    <list name="organisationUnits" table="reporttable_organisationunits">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_organisationunits_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit"
+        foreign-key="fk_reporttable_organisationunits_organisationunitid" />
+    </list>
+
+    <list name="periods" table="reporttable_periods">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_periods_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="periodid" class="org.hisp.dhis.period.Period"
+        foreign-key="fk_reporttable_periods_periodid" />
+    </list>
+
+    <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
+      cascade="all-delete-orphan" foreign-key="fk_reporttable_relativeperiodsid" />
+
+    <list name="categoryDimensions" table="reporttable_categorydimensions" cascade="all-delete-orphan">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_categorydimensions_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="categorydimensionid" class="org.hisp.dhis.dataelement.DataElementCategoryDimension"
+        foreign-key="fk_reporttable_categorydimensions_categorydimensionid" />
+    </list>
+
+    <list name="dataElementGroups" table="reporttable_dataelementgroups">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_dataelementgroups_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="dataelementgroupid" class="org.hisp.dhis.dataelement.DataElementGroup"
+        foreign-key="fk_reporttable_dataelementgroups_dataelementgroupid" />
+    </list>
+
+    <list name="organisationUnitGroups" table="reporttable_orgunitgroups">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_orgunitunitgroups_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
+        foreign-key="fk_reporttable_orgunitgroups_orgunitgroupid" />
+    </list>
+
+    <list name="categoryOptionGroups" table="reporttable_categoryoptiongroups">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_categoryoptiongroups_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="categoryoptiongroupid" class="org.hisp.dhis.dataelement.CategoryOptionGroup"
+        foreign-key="fk_reporttable_categoryoptiongroups_categoryoptiongroupid" />
+    </list>
+    
+    <list name="organisationUnitLevels" table="reporttable_orgunitlevels">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_orgunitlevels_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <element column="orgunitlevel" type="integer" />
+    </list>
+
+    <list name="itemOrganisationUnitGroups" table="reporttable_itemorgunitgroups">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_itemorgunitunitgroups_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
+        foreign-key="fk_reporttable_itemorgunitgroups_orgunitgroupid" />
+    </list>
+
+    <list name="columnDimensions" table="reporttable_columns">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_columns_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <element type="string" column="dimension" />
+    </list>
+
+    <list name="rowDimensions" table="reporttable_rows">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_rows_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <element type="string" column="dimension" />
+    </list>
+
+    <list name="filterDimensions" table="reporttable_filters">
+      <cache usage="read-write" />
+      <key column="reporttableid" foreign-key="fk_reporttable_filters_reporttableid" />
+      <list-index column="sort_order" base="0" />
+      <element type="string" column="dimension" />
+    </list>
+    
+    <component name="reportParams">
+      <property name="paramReportingMonth" />
+      <property name="paramGrandParentOrganisationUnit" />
+      <property name="paramParentOrganisationUnit" />
+      <property name="paramOrganisationUnit" />
+    </component>
+
+    <property name="sortOrder" />
+
+    <property name="topLimit" />
+
+    <property name="rowTotals" />
+	  
+	<property name="colTotals" />
+
+    <property name="rowSubTotals" />
+	  
+	<property name="colSubTotals" />
+
+    <property name="hideEmptyRows" />
+    
+    <property name="aggregationType" length="40">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.analytics.AggregationType</param>
+        <param name="type">12</param>
+      </type> 
+    </property>
+
+    <property name="completedOnly" column="completedonly" />
+	
+    <property name="digitGroupSeparator" length="40">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.common.DigitGroupSeparator</param>
+        <param name="type">12</param>
+      </type> 
+    </property>
+
+    <property name="displayDensity" length="40">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.common.DisplayDensity</param>
+        <param name="type">12</param>
+      </type> 
+    </property>
+
+    <property name="fontSize" length="40">
+      <type name="org.hibernate.type.EnumType">
+        <param name="enumClass">org.hisp.dhis.common.FontSize</param>
+        <param name="type">12</param>
+      </type> 
+    </property>
+
+    <property name="userOrganisationUnit" />
+
+    <property name="userOrganisationUnitChildren" />
+
+    <property name="userOrganisationUnitGrandChildren" />
+
+    <many-to-one name="legendSet" class="org.hisp.dhis.legend.LegendSet" column="legendsetid"
+      foreign-key="fk_reporttable_legendsetid" />
+
+    <property name="showHierarchy" />
+
+    <property name="showDimensionLabels" />
+    
+    <property name="skipRounding" />
+
+    <!-- Access properties -->
+    <property name="externalAccess" />
+
+    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_reporttable_userid" />
+
+    <property name="publicAccess" length="8" />
+
+    <set name="userGroupAccesses" table="reporttableusergroupaccesses">
+      <cache usage="read-write" />
+      <key column="reporttableid" />
+      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
+    </set>
+
+  </class>
+</hibernate-mapping>

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/ChartDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/ChartDeletionHandler.java	2016-01-06 15:52:21 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/ChartDeletionHandler.java	2016-03-15 09:34:18 +0000
@@ -57,7 +57,7 @@
     {
         return chartService;
     }
-    
+
     @Override
     public String getClassName()
     {

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java	2016-01-26 08:55:27 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/hibernate/HibernateDashboardItemStore.java	1970-01-01 00:00:00 +0000
@@ -1,101 +0,0 @@
-package org.hisp.dhis.dashboard.hibernate;
-
-/*
- * Copyright (c) 2004-2016, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hibernate.Query;
-import org.hisp.dhis.chart.Chart;
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-import org.hisp.dhis.dashboard.Dashboard;
-import org.hisp.dhis.dashboard.DashboardItem;
-import org.hisp.dhis.dashboard.DashboardItemStore;
-import org.hisp.dhis.document.Document;
-import org.hisp.dhis.mapping.Map;
-import org.hisp.dhis.report.Report;
-import org.hisp.dhis.reporttable.ReportTable;
-
-/**
- * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
- */
-public class HibernateDashboardItemStore extends HibernateIdentifiableObjectStore<DashboardItem>
-    implements DashboardItemStore
-{
-    @Override
-    public int countMapDashboardItems( Map map )
-    {
-        Query query = getQuery( "select count(distinct c) from DashboardItem c where c.map=:map" );
-        query.setEntity( "map", map );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public int countChartDashboardItems( Chart chart )
-    {
-        Query query = getQuery( "select count(distinct c) from DashboardItem c where c.chart=:chart" );
-        query.setEntity( "chart", chart );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public int countReportTableDashboardItems( ReportTable reportTable )
-    {
-        Query query = getQuery( "select count(distinct c) from DashboardItem c where c.reportTable=:reportTable" );
-        query.setEntity( "reportTable", reportTable );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public int countReportDashboardItems( Report report )
-    {
-        Query query = getQuery( "select count(distinct c) from DashboardItem c where :report in elements(c.reports)" );
-        query.setEntity( "report", report );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public int countDocumentDashboardItems( Document document )
-    {
-        Query query = getQuery( "select count(distinct c) from DashboardItem c where :document in elements(c.resources)" );
-        query.setEntity( "document", document );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public Dashboard getDashboardFromDashboardItem( DashboardItem dashboardItem )
-    {
-        Query query = getQuery( "from Dashboard d where :item in elements(d.items)" );
-        query.setEntity( "item", dashboardItem );
-
-        return (Dashboard) query.uniqueResult();
-    }
-}

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/interpretation/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/interpretation/hibernate/HibernateInterpretationStore.java	1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-package org.hisp.dhis.interpretation.hibernate;
-
-/*
- * Copyright (c) 2004-2016, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hibernate.Query;
-import org.hisp.dhis.chart.Chart;
-import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-import org.hisp.dhis.interpretation.Interpretation;
-import org.hisp.dhis.interpretation.InterpretationStore;
-import org.hisp.dhis.mapping.Map;
-import org.hisp.dhis.reporttable.ReportTable;
-import org.hisp.dhis.user.User;
-
-import java.util.List;
-
-/**
- * @author Lars Helge Overland
- */
-public class HibernateInterpretationStore
-    extends HibernateIdentifiableObjectStore<Interpretation> implements InterpretationStore
-{
-    @SuppressWarnings("unchecked")
-    public List<Interpretation> getInterpretations( User user )
-    {
-        String hql = "select distinct i from Interpretation i left join i.comments c " +
-            "where i.user = :user or c.user = :user order by i.lastUpdated desc";
-
-        Query query = getQuery( hql );
-        query.setEntity( "user", user );
-
-        return query.list();
-    }
-
-    @SuppressWarnings("unchecked")
-    public List<Interpretation> getInterpretations( User user, int first, int max )
-    {
-        String hql = "select distinct i from Interpretation i left join i.comments c " +
-            "where i.user = :user or c.user = :user order by i.lastUpdated desc";
-
-        Query query = getQuery( hql );
-        query.setEntity( "user", user );
-        query.setMaxResults( first );
-        query.setMaxResults( max );
-
-        return query.list();
-    }
-
-    @Override
-    public int countMapInterpretations( Map map )
-    {
-        Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where c.map=:map" );
-        query.setEntity( "map", map );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public int countChartInterpretations( Chart chart )
-    {
-        Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where c.chart=:chart" );
-        query.setEntity( "chart", chart );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public int countReportTableInterpretations( ReportTable reportTable )
-    {
-        Query query = getQuery( "select count(distinct c) from " + clazz.getName() + " c where c.reportTable=:reportTable" );
-        query.setEntity( "reportTable", reportTable );
-
-        return ((Long) query.uniqueResult()).intValue();
-    }
-
-    @Override
-    public Interpretation getByChartId( int id )
-    {
-        String hql = "from Interpretation i where i.chart.id = " + id;
-        
-        Query query = sessionFactory.getCurrentSession().createQuery( hql );
-        
-        return (Interpretation) query.uniqueResult();
-    }
-}

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportDeletionHandler.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/ReportDeletionHandler.java	2016-03-15 09:34:18 +0000
@@ -58,7 +58,7 @@
     {
         return ReportTable.class.getSimpleName();
     }
-    
+
     @Override
     public String allowDeleteReportTable( ReportTable reportTable )
     {
@@ -69,7 +69,7 @@
                 return report.getName();
             }
         }
-        
+
         return null;
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java	2016-01-06 15:52:21 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableDeletionHandler.java	2016-03-15 09:34:18 +0000
@@ -57,7 +57,7 @@
     {
         return reportTableService;
     }
-    
+
     @Override
     public String getClassName()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2016-03-15 08:29:20 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2016-03-15 09:34:18 +0000
@@ -6,12 +6,6 @@
 
   <!-- ReportTable -->
 
-  <bean id="org.hisp.dhis.reporttable.ReportTableStore" class="org.hisp.dhis.common.hibernate.HibernateAnalyticalObjectStore">
-    <property name="clazz" value="org.hisp.dhis.reporttable.ReportTable" />
-    <property name="sessionFactory" ref="sessionFactory" />
-    <property name="cacheable" value="true" />
-  </bean>
-
   <bean id="org.hisp.dhis.reporttable.ReportTableService" class="org.hisp.dhis.reporttable.impl.DefaultReportTableService">
     <property name="analyticsService" ref="org.hisp.dhis.analytics.AnalyticsService" />
     <property name="reportTableStore" ref="org.hisp.dhis.reporttable.ReportTableStore" />
@@ -22,12 +16,6 @@
 
   <!-- Report -->
 
-  <bean id="org.hisp.dhis.report.ReportStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
-    <property name="clazz" value="org.hisp.dhis.report.Report" />
-    <property name="sessionFactory" ref="sessionFactory" />
-    <property name="cacheable" value="true" />
-  </bean>
-
   <bean id="org.hisp.dhis.report.ReportService" class="org.hisp.dhis.report.impl.DefaultReportService">
     <property name="reportStore" ref="org.hisp.dhis.report.ReportStore" />
     <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
@@ -39,12 +27,6 @@
 
   <!-- Chart -->
 
-  <bean id="org.hisp.dhis.chart.ChartStore" class="org.hisp.dhis.common.hibernate.HibernateAnalyticalObjectStore">
-    <property name="clazz" value="org.hisp.dhis.chart.Chart" />
-    <property name="sessionFactory" ref="sessionFactory" />
-    <property name="cacheable" value="true" />
-  </bean>
-
   <bean id="org.hisp.dhis.chart.ChartService" class="org.hisp.dhis.chart.impl.DefaultChartService">
     <property name="chartStore" ref="org.hisp.dhis.chart.ChartStore" />
     <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
@@ -58,12 +40,6 @@
 
   <!-- Document -->
 
-  <bean id="org.hisp.dhis.document.DocumentStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
-    <property name="clazz" value="org.hisp.dhis.document.Document" />
-    <property name="sessionFactory" ref="sessionFactory" />
-    <property name="cacheable" value="true" />
-  </bean>
-
   <bean id="org.hisp.dhis.document.DocumentService" class="org.hisp.dhis.document.impl.DefaultDocumentService">
     <property name="documentStore" ref="org.hisp.dhis.document.DocumentStore" />
   </bean>
@@ -107,24 +83,11 @@
 
   <!-- Dashboard -->
 
-  <bean id="org.hisp.dhis.dashboard.DashboardStore" class="org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore">
-    <property name="clazz" value="org.hisp.dhis.dashboard.Dashboard" />
-    <property name="sessionFactory" ref="sessionFactory" />
-    <property name="cacheable" value="true" />
-  </bean>
-
   <bean id="org.hisp.dhis.dashboard.DashboardService" class="org.hisp.dhis.dashboard.impl.DefaultDashboardService">
     <property name="dashboardStore" ref="org.hisp.dhis.dashboard.DashboardStore" />
   </bean>
 
-  <bean id="org.hisp.dhis.dashboard.impl.DashboardItemDeletionHandler" class="org.hisp.dhis.dashboard.DashboardItemDeletionHandler">
-  </bean>
-
-  <bean id="org.hisp.dhis.dashboard.DashboardItemStore" class="org.hisp.dhis.dashboard.hibernate.HibernateDashboardItemStore">
-    <property name="clazz" value="org.hisp.dhis.dashboard.DashboardItem" />
-    <property name="sessionFactory" ref="sessionFactory" />
-    <property name="cacheable" value="true" />
-  </bean>
+  <bean id="org.hisp.dhis.dashboard.impl.DashboardItemDeletionHandler" class="org.hisp.dhis.dashboard.DashboardItemDeletionHandler" />
 
   <!-- Organisation Unit Distribution -->
 
@@ -143,11 +106,6 @@
     <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
   </bean>
 
-  <bean id="org.hisp.dhis.interpretation.InterpretationStore" class="org.hisp.dhis.interpretation.hibernate.HibernateInterpretationStore">
-    <property name="clazz" value="org.hisp.dhis.interpretation.Interpretation" />
-    <property name="sessionFactory" ref="sessionFactory" />
-  </bean>
-
   <!-- Data element history -->
 
   <bean id="org.hisp.dhis.dataelementhistory.HistoryRetriever" class="org.hisp.dhis.dataelementhistory.DefaultHistoryRetriever">
@@ -178,9 +136,9 @@
         <entry key="analyticsLast3YearsTask" value-ref="analyticsLast3YearsTask" />
         <entry key="monitoringLastDayTask" value-ref="monitoringLastDayTask" />
         <entry key="dataSynchTask" value-ref="dataSynchTask" />
-        <entry key="smsSchedulerTask" value-ref="smsSchedulerTask" />    
-        <entry key="sendScheduledMessageTask" value-ref="sendScheduledMessageTask" />  
-        <entry key="sendScheduledMessageTaskNow" value-ref="sendScheduledMessageTaskNow" />  
+        <entry key="smsSchedulerTask" value-ref="smsSchedulerTask" />
+        <entry key="sendScheduledMessageTask" value-ref="sendScheduledMessageTask" />
+        <entry key="sendScheduledMessageTaskNow" value-ref="sendScheduledMessageTaskNow" />
       </map>
     </property>
   </bean>
@@ -210,7 +168,7 @@
       </list>
     </property>
   </bean>
-    
+
   <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
     <property name="targetObject" ref="org.hisp.dhis.system.startup.StartupRoutineExecutor" />
     <property name="targetMethod" value="addStartupRoutines" />
@@ -222,7 +180,7 @@
       </list>
     </property>
   </bean>
-  
+
   <!-- DeletionHandler -->
 
   <bean id="org.hisp.dhis.report.ReportDeletionHandler" class="org.hisp.dhis.report.ReportDeletionHandler">

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	2016-02-12 16:15:54 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,177 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.chart.Chart" table="chart">
-
-    <cache usage="read-write" />
-
-    <id name="id" column="chartid">
-      <generator class="native" />
-    </id>
-    &identifiableProperties;
-
-    <property name="name" column="name" not-null="true" length="230" />
-
-    <property name="domainAxisLabel" />
-
-    <property name="rangeAxisLabel" />
-
-    <property name="type" length="40" not-null="true">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.chart.ChartType</param>
-        <param name="type">12</param>
-      </type>
-	</property>
-	
-    <property name="series" />
-
-    <property name="category" />
-
-    <list name="filterDimensions" table="chart_filters">
-      <cache usage="read-write" />
-      <key column="chartid" />
-      <list-index column="sort_order" base="0" />
-      <element type="string" column="filter" />
-    </list>
-
-    <property name="hideLegend" />
-
-    <property name="regression" />
-
-    <property name="hideTitle" />
-
-    <property name="hideSubtitle" />
-    
-    <property name="title" />
-
-    <property name="targetLineValue" />
-
-    <property name="targetLineLabel" />
-
-    <property name="baseLineValue" />
-
-    <property name="baseLineLabel" />
-
-	<list name="dataDimensionItems" table="chart_datadimensionitems" cascade="all, delete-orphan">
-	  <cache usage="read-write" />
-	  <key column="chartid" foreign-key="fk_chart_datadimensionitems_chartid" />
-	  <list-index column="sort_order" base="0" />
-	  <many-to-many column="datadimensionitemid" class="org.hisp.dhis.common.DataDimensionItem"
-        foreign-key="fk_chart_datadimensionitems_datadimensionitemid" />
-	</list>
-	
-    <list name="organisationUnits" table="chart_organisationunits">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_organisationunits_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit"
-        foreign-key="fk_chart_organisationunits_organisationunitid" />
-    </list>
-
-    <list name="periods" table="chart_periods">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_periods_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="periodid" class="org.hisp.dhis.period.Period"
-        foreign-key="fk_chart_periods_periodid" />
-    </list>
-
-    <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
-      cascade="all-delete-orphan" foreign-key="fk_chart_relativeperiodsid" />
-
-    <list name="categoryDimensions" table="chart_categorydimensions" cascade="all-delete-orphan">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_categorydimensions_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="categorydimensionid" class="org.hisp.dhis.dataelement.DataElementCategoryDimension"
-        foreign-key="fk_chart_categorydimensions_categorydimensionid" />
-    </list>
-    
-    <list name="dataElementGroups" table="chart_dataelementgroups">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_dataelementgroups_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="dataelementgroupid" class="org.hisp.dhis.dataelement.DataElementGroup"
-        foreign-key="fk_chart_dataelementgroups_dataelementgroupid" />
-    </list>
-
-    <list name="organisationUnitGroups" table="chart_orgunitgroups">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_orgunitunitgroups_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
-        foreign-key="fk_chart_orgunitgroups_orgunitgroupid" />
-    </list>
-    
-    <list name="categoryOptionGroups" table="chart_categoryoptiongroups">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_categoryoptiongroups_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="categoryoptiongroupid" class="org.hisp.dhis.dataelement.CategoryOptionGroup"
-        foreign-key="fk_chart_categoryoptiongroups_categoryoptiongroupid" />
-    </list>
-    
-    <list name="organisationUnitLevels" table="chart_orgunitlevels">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_orgunitlevels_chartid" />
-      <list-index column="sort_order" base="0" />
-      <element column="orgunitlevel" type="integer" />
-    </list>
-    
-    <list name="itemOrganisationUnitGroups" table="chart_itemorgunitgroups">
-      <cache usage="read-write" />
-      <key column="chartid" foreign-key="fk_chart_itemorgunitunitgroups_chartid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
-        foreign-key="fk_chart_itemorgunitgroups_orgunitgroupid" />
-    </list>
-    
-    <property name="userOrganisationUnit" />
-
-    <property name="userOrganisationUnitChildren" />
-
-    <property name="userOrganisationUnitGrandChildren" />
-
-    <property name="aggregationType" length="40">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.analytics.AggregationType</param>
-        <param name="type">12</param>
-      </type> 
-	</property>
-	
-    <property name="completedOnly" column="completedonly" />
-	
-    <property name="showData" />
-
-    <property name="hideEmptyRows" />
-
-    <property name="rangeAxisMaxValue" />
-
-    <property name="rangeAxisMinValue" />
-
-    <property name="rangeAxisSteps" />
-
-    <property name="rangeAxisDecimals" />
-    
-    <property name="sortOrder" />
-
-    <!-- Access properties -->
-    <property name="externalAccess" />
-
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_chart_userid" />
-
-    <property name="publicAccess" length="8" />
-
-    <set name="userGroupAccesses" table="chartusergroupaccesses">
-      <cache usage="read-write" />
-      <key column="chartid" />
-      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
-    </set>
-
-  </class>
-</hibernate-mapping>

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml	2014-09-13 11:44:57 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/Dashboard.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.dashboard.Dashboard" table="dashboard">
-
-    <cache usage="read-write" />
-
-    <id name="id" column="dashboardid">
-      <generator class="native" />
-    </id>
-    &identifiableProperties;
-
-    <property name="name" column="name" not-null="true" unique="false" length="230" />
-
-    <list name="items" table="dashboard_items" cascade="save-update">
-      <key column="dashboardid" foreign-key="fk_dashboard_items_dashboardid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="dashboarditemid" class="org.hisp.dhis.dashboard.DashboardItem"
-        foreign-key="fk_dashboard_items_dashboarditemid" />
-    </list>
-
-    <!-- Access properties -->
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_dashboard_userid" />
-
-    <property name="externalAccess" />
-
-    <property name="publicAccess" length="8" />
-
-    <set name="userGroupAccesses" table="dashboardusergroupaccesses">
-      <cache usage="read-write" />
-      <key column="dashboardid" />
-      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
-    </set>
-
-  </class>
-</hibernate-mapping>

=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml	2015-09-15 10:26:47 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardItem.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.dashboard.DashboardItem" table="dashboarditem">
-
-    <cache usage="read-write" />
-
-    <id name="id" column="dashboarditemid">
-      <generator class="native" />
-    </id>
-    &identifiableProperties;
-
-    <many-to-one name="chart" class="org.hisp.dhis.chart.Chart" column="chartid" foreign-key="fk_dashboarditem_chartid" />
-    
-    <many-to-one name="eventChart" class="org.hisp.dhis.eventchart.EventChart" column="eventchartid" foreign-key="fk_dashboarditem_eventchartid" />
-    
-    <many-to-one name="map" class="org.hisp.dhis.mapping.Map" column="mapid" foreign-key="fk_dashboarditem_mapid" />
-    
-    <many-to-one name="reportTable" class="org.hisp.dhis.reporttable.ReportTable" foreign-key="fk_dashboarditem_reporttableid" />
-    
-    <many-to-one name="eventReport" class="org.hisp.dhis.eventreport.EventReport" foreign-key="fk_dashboarditem_eventreportid" />
-    
-    <list name="users" table="dashboarditem_users">
-      <key column="dashboarditemid" foreign-key="fk_dashboarditem_users_dashboardid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="userid" class="org.hisp.dhis.user.User" foreign-key="fk_dashboarditem_users_userinfoid" />
-    </list>
-    
-    <list name="reports" table="dashboarditem_reports">
-      <key column="dashboarditemid" foreign-key="fk_dashboarditem_reports_dashboardid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="reportid" class="org.hisp.dhis.report.Report" foreign-key="fk_dashboarditem_reports_reportid" />
-    </list>
- 	
-    <list name="resources" table="dashboarditem_resources">
-      <key column="dashboarditemid" foreign-key="fk_dashboarditem_resources_dashboardid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="resourceid" class="org.hisp.dhis.document.Document" foreign-key="fk_dashboarditem_resources_resourceid" />
-    </list>
-        
-    <property name="messages" />
-
-    <property name="shape" length="50">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.dashboard.DashboardItemShape</param>
-        <param name="type">12</param>
-      </type>
-    </property>
-
-  </class>
-</hibernate-mapping>
\ No newline at end of file

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml	2015-11-26 04:04:27 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/document/hibernate/Document.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.document.Document" table="document">
-
-    <cache usage="read-write" />
-
-    <id name="id" column="documentid">
-      <generator class="native" />
-    </id>
-    &identifiableProperties;
-
-    <property name="name" column="name" not-null="true" unique="false" length="230" />
-
-    <property name="url" not-null="true" type="text" />
-
-    <property name="external" not-null="true" />
-
-    <property name="contentType" />
-
-    <property name="attachment" />
-
-    <!-- Dynamic attribute values -->
-    <set name="attributeValues" table="documentattributevalues" cascade="delete-orphan">
-      <cache usage="read-write" />
-      <key column="documentid" />
-      <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" unique="true" />
-    </set>
-
-    <!-- Access properties -->
-    <property name="externalAccess" />
-
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_document_userid" />
-
-    <property name="publicAccess" length="8" />
-
-    <set name="userGroupAccesses" table="documentusergroupaccesses">
-      <cache usage="read-write" />
-      <key column="documentid" />
-      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
-    </set>
-
-  </class>
-</hibernate-mapping>

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml	2015-04-21 18:32:37 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/Interpretation.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.interpretation.Interpretation" table="interpretation">
-
-    <id name="id" column="interpretationid">
-      <generator class="native" />
-    </id>
-
-    <property name="uid" column="uid" length="11" />
-    
-    <property name="lastUpdated" type="timestamp" index="interpretation_lastupdated" />
-
-    <many-to-one name="chart" class="org.hisp.dhis.chart.Chart" column="chartid"
-      foreign-key="fk_interpretation_chartid" />
-
-    <many-to-one name="map" class="org.hisp.dhis.mapping.Map" column="mapid"
-      foreign-key="fk_interpretation_mapid" />
-
-    <many-to-one name="reportTable" class="org.hisp.dhis.reporttable.ReportTable" column="reporttableid"
-      foreign-key="fk_interpretation_reporttableid" />
-
-    <many-to-one name="dataSet" class="org.hisp.dhis.dataset.DataSet" column="datasetid"
-      foreign-key="fk_interpretation_datasetid" />
-
-    <many-to-one name="period" class="org.hisp.dhis.period.Period" column="periodid"
-      foreign-key="fk_interpretation_periodid" />
-
-    <many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"
-      foreign-key="fk_interpretation_organisationunitid" />
-
-    <property name="text" column="interpretationtext" type="text" />
-
-    <property name="created" not-null="true" type="timestamp" />
-
-    <list name="comments" table="interpretation_comments" cascade="all,delete-orphan">
-      <key column="interpretationid" foreign-key="fk_interpretation_comments_interpretationid" />
-      <list-index column="sort_order" base="1" />
-      <many-to-many class="org.hisp.dhis.interpretation.InterpretationComment" column="interpretationcommentid"
-        unique="true" foreign-key="fk_interpretation_comments_interpretationcommentid" />
-    </list>
-
-    <!-- Access properties -->
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_interpretation_userid" />
-
-    <property name="publicAccess" length="8" />
-
-    <set name="userGroupAccesses" table="interpretationusergroupaccesses">
-      <cache usage="read-write" />
-      <key column="interpretationid" />
-      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
-    </set>
-
-  </class>
-</hibernate-mapping>
\ No newline at end of file

=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml	2014-10-14 06:43:28 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/interpretation/hibernate/InterpretationComment.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";>
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.interpretation.InterpretationComment" table="interpretationcomment">
-
-    <id name="id" column="interpretationcommentid">
-      <generator class="native" />
-    </id>
-	
-    <property name="uid" column="uid" length="11" />
-    <property name="lastUpdated" type="timestamp"/>
-	
-    <property name="text" column="commenttext" type="text" />
-
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid"
-		foreign-key="fk_interpretationcomment_userid" not-null="true" />
-		
-	<property name="created" not-null="true" type="timestamp" />
-
-  </class>
-</hibernate-mapping>
\ No newline at end of file

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml	2015-09-14 10:33:55 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.report.Report" table="report">
-
-    <cache usage="read-write" />
-
-    <id name="id" column="reportid">
-      <generator class="native" />
-    </id>
-    &identifiableProperties;
-
-    <property name="name" column="name" not-null="true" unique="false" length="230" />
-
-    <property name="type" length="50">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.report.ReportType</param>
-        <param name="type">12</param>
-      </type>
-    </property>
-
-    <property name="designContent" type="text" />
-
-    <many-to-one name="reportTable" class="org.hisp.dhis.reporttable.ReportTable" column="reporttableid"
-      foreign-key="fk_report_reporttableid" />
-
-    <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
-      cascade="all-delete-orphan" foreign-key="fk_report_relativeperiodsid" />
-
-    <component name="reportParams">
-      <property name="paramReportingMonth" />
-      <property name="paramOrganisationUnit" />
-    </component>
-
-    <property name="cacheStrategy" length="40">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.common.cache.CacheStrategy</param>
-        <param name="type">12</param>
-      </type>
-    </property>
-
-    <!-- Access properties -->
-    <property name="externalAccess" />
-
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_report_userid" />
-
-    <property name="publicAccess" length="8" />
-
-    <set name="userGroupAccesses" table="reportusergroupaccesses">
-      <cache usage="read-write" />
-      <key column="reportid" />
-      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
-    </set>
-
-  </class>
-</hibernate-mapping>

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable'
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2016-02-12 16:15:54 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	1970-01-01 00:00:00 +0000
@@ -1,199 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
-
-<hibernate-mapping>
-  <class name="org.hisp.dhis.reporttable.ReportTable" table="reporttable">
-
-    <cache usage="read-write" />
-
-    <id name="id" column="reporttableid">
-      <generator class="native" />
-    </id>
-    &identifiableProperties;
-
-    <property name="name" column="name" not-null="true" unique="false" length="230" />
-
-    <property name="regression" />
-
-    <property name="cumulative" />
-
-	<list name="dataDimensionItems" table="reporttable_datadimensionitems" cascade="all, delete-orphan">
-	  <cache usage="read-write" />
-	  <key column="reporttableid" foreign-key="fk_reporttable_datadimensionitems_reporttableid" />
-	  <list-index column="sort_order" base="0" />
-	  <many-to-many column="datadimensionitemid" class="org.hisp.dhis.common.DataDimensionItem"
-        foreign-key="fk_reporttable_datadimensionitems_datadimensionitemid" />
-	</list>
-
-    <list name="organisationUnits" table="reporttable_organisationunits">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_organisationunits_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit"
-        foreign-key="fk_reporttable_organisationunits_organisationunitid" />
-    </list>
-
-    <list name="periods" table="reporttable_periods">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_periods_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="periodid" class="org.hisp.dhis.period.Period"
-        foreign-key="fk_reporttable_periods_periodid" />
-    </list>
-
-    <many-to-one name="relatives" unique="true" class="org.hisp.dhis.period.RelativePeriods" column="relativeperiodsid"
-      cascade="all-delete-orphan" foreign-key="fk_reporttable_relativeperiodsid" />
-
-    <list name="categoryDimensions" table="reporttable_categorydimensions" cascade="all-delete-orphan">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_categorydimensions_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="categorydimensionid" class="org.hisp.dhis.dataelement.DataElementCategoryDimension"
-        foreign-key="fk_reporttable_categorydimensions_categorydimensionid" />
-    </list>
-
-    <list name="dataElementGroups" table="reporttable_dataelementgroups">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_dataelementgroups_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="dataelementgroupid" class="org.hisp.dhis.dataelement.DataElementGroup"
-        foreign-key="fk_reporttable_dataelementgroups_dataelementgroupid" />
-    </list>
-
-    <list name="organisationUnitGroups" table="reporttable_orgunitgroups">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_orgunitunitgroups_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
-        foreign-key="fk_reporttable_orgunitgroups_orgunitgroupid" />
-    </list>
-
-    <list name="categoryOptionGroups" table="reporttable_categoryoptiongroups">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_categoryoptiongroups_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="categoryoptiongroupid" class="org.hisp.dhis.dataelement.CategoryOptionGroup"
-        foreign-key="fk_reporttable_categoryoptiongroups_categoryoptiongroupid" />
-    </list>
-    
-    <list name="organisationUnitLevels" table="reporttable_orgunitlevels">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_orgunitlevels_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <element column="orgunitlevel" type="integer" />
-    </list>
-
-    <list name="itemOrganisationUnitGroups" table="reporttable_itemorgunitgroups">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_itemorgunitunitgroups_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <many-to-many column="orgunitgroupid" class="org.hisp.dhis.organisationunit.OrganisationUnitGroup"
-        foreign-key="fk_reporttable_itemorgunitgroups_orgunitgroupid" />
-    </list>
-
-    <list name="columnDimensions" table="reporttable_columns">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_columns_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <element type="string" column="dimension" />
-    </list>
-
-    <list name="rowDimensions" table="reporttable_rows">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_rows_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <element type="string" column="dimension" />
-    </list>
-
-    <list name="filterDimensions" table="reporttable_filters">
-      <cache usage="read-write" />
-      <key column="reporttableid" foreign-key="fk_reporttable_filters_reporttableid" />
-      <list-index column="sort_order" base="0" />
-      <element type="string" column="dimension" />
-    </list>
-    
-    <component name="reportParams">
-      <property name="paramReportingMonth" />
-      <property name="paramGrandParentOrganisationUnit" />
-      <property name="paramParentOrganisationUnit" />
-      <property name="paramOrganisationUnit" />
-    </component>
-
-    <property name="sortOrder" />
-
-    <property name="topLimit" />
-
-    <property name="rowTotals" />
-	  
-	<property name="colTotals" />
-
-    <property name="rowSubTotals" />
-	  
-	<property name="colSubTotals" />
-
-    <property name="hideEmptyRows" />
-    
-    <property name="aggregationType" length="40">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.analytics.AggregationType</param>
-        <param name="type">12</param>
-      </type> 
-    </property>
-
-    <property name="completedOnly" column="completedonly" />
-	
-    <property name="digitGroupSeparator" length="40">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.common.DigitGroupSeparator</param>
-        <param name="type">12</param>
-      </type> 
-    </property>
-
-    <property name="displayDensity" length="40">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.common.DisplayDensity</param>
-        <param name="type">12</param>
-      </type> 
-    </property>
-
-    <property name="fontSize" length="40">
-      <type name="org.hibernate.type.EnumType">
-        <param name="enumClass">org.hisp.dhis.common.FontSize</param>
-        <param name="type">12</param>
-      </type> 
-    </property>
-
-    <property name="userOrganisationUnit" />
-
-    <property name="userOrganisationUnitChildren" />
-
-    <property name="userOrganisationUnitGrandChildren" />
-
-    <many-to-one name="legendSet" class="org.hisp.dhis.legend.LegendSet" column="legendsetid"
-      foreign-key="fk_reporttable_legendsetid" />
-
-    <property name="showHierarchy" />
-
-    <property name="showDimensionLabels" />
-    
-    <property name="skipRounding" />
-
-    <!-- Access properties -->
-    <property name="externalAccess" />
-
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_reporttable_userid" />
-
-    <property name="publicAccess" length="8" />
-
-    <set name="userGroupAccesses" table="reporttableusergroupaccesses">
-      <cache usage="read-write" />
-      <key column="reporttableid" />
-      <many-to-many class="org.hisp.dhis.user.UserGroupAccess" column="usergroupaccessid" unique="true" />
-    </set>
-
-  </class>
-</hibernate-mapping>