dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15130
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5342: Minor fix
------------------------------------------------------------
revno: 5342
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-12-09 19:42:26 +0100
message:
Minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Charts.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Maps.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Charts.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Charts.java 2011-12-06 10:52:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Charts.java 2011-12-09 18:42:26 +0000
@@ -27,15 +27,16 @@
package org.hisp.dhis.chart;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.hisp.dhis.common.BaseLinkableObject;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.hisp.dhis.common.BaseLinkableObject;
import org.hisp.dhis.common.Dxf2Namespace;
/**
@@ -47,8 +48,6 @@
{
private List<Chart> charts = new ArrayList<Chart>();
- private String link;
-
@XmlElement( name = "chart" )
@JsonProperty( value = "charts" )
public List<Chart> getCharts()
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java 2011-12-09 18:08:05 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java 2011-12-09 18:42:26 +0000
@@ -27,16 +27,24 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.codehaus.jackson.map.annotate.JsonSerialize;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.CombinationGenerator;
import org.hisp.dhis.common.Dxf2Namespace;
import org.hisp.dhis.common.adapter.BaseIdentifiableObjectXmlAdapter;
-import org.hisp.dhis.common.adapter.JsonIdentifiableObjectCollectionSerializer;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.util.*;
/**
* @author Abyot Aselefew
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingStore.java 2011-12-05 12:21:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MappingStore.java 2011-12-09 18:42:26 +0000
@@ -29,7 +29,6 @@
import java.util.Collection;
-import org.hisp.dhis.chart.Chart;
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
import org.hisp.dhis.user.User;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Maps.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Maps.java 2011-12-05 12:21:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/Maps.java 2011-12-09 18:42:26 +0000
@@ -9,7 +9,6 @@
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.hisp.dhis.chart.Chart;
import org.hisp.dhis.common.BaseLinkableObject;
import org.hisp.dhis.common.Dxf2Namespace;
@@ -44,11 +43,8 @@
@XmlAccessorType( value = XmlAccessType.NONE )
public class Maps extends BaseLinkableObject
{
-
private List<MapView> maps = new ArrayList<MapView>();
- private String link;
-
@XmlElement( name = "map" )
@JsonProperty( value = "maps" )
public List<MapView> getMaps()
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2011-12-09 18:42:26 +0000
@@ -41,12 +41,12 @@
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
+import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.dataelement.DataElementOperand;
import org.hisp.dhis.dataelement.DataElementStore;
import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
import org.hisp.dhis.system.objectmapper.DataElementOperandMapper;
import org.hisp.dhis.system.util.ConversionUtils;
import org.hisp.dhis.system.util.TextUtils;
@@ -58,7 +58,7 @@
* larshelg $
*/
public class HibernateDataElementStore
- extends HibernateGenericStore<DataElement>
+ extends HibernateIdentifiableObjectStore<DataElement>
implements DataElementStore
{
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2011-12-09 18:42:26 +0000
@@ -76,6 +76,14 @@
int idB = dataElementService.addDataElement( dataElementB );
int idC = dataElementService.addDataElement( dataElementC );
+ assertNotNull( dataElementA.getUid() );
+ assertNotNull( dataElementB.getUid() );
+ assertNotNull( dataElementC.getUid() );
+
+ assertNotNull( dataElementA.getLastUpdated() );
+ assertNotNull( dataElementB.getLastUpdated() );
+ assertNotNull( dataElementC.getLastUpdated() );
+
dataElementA = dataElementService.getDataElement( idA );
assertNotNull( dataElementA );
assertEquals( idA, dataElementA.getId() );
@@ -97,7 +105,11 @@
throws Exception
{
DataElement dataElementA = createDataElement( 'A' );
+
int idA = dataElementService.addDataElement( dataElementA );
+ assertNotNull( dataElementA.getUid() );
+ assertNotNull( dataElementA.getLastUpdated() );
+
dataElementA = dataElementService.getDataElement( idA );
assertEquals( DataElement.VALUE_TYPE_INT, dataElementA.getType() );