dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28876
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14498: Event report, dimensional view
------------------------------------------------------------
revno: 14498
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-03-27 16:40:52 +0100
message:
Event report, dimensional view
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeDimension.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityDataElementDimension.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/common/BaseAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java 2014-03-27 15:21:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java 2014-03-27 15:40:52 +0000
@@ -394,9 +394,9 @@
if ( attributes.containsKey( dimension ) )
{
- items.add( attributes.get( dimension ).getQueryFilter() );
+ TrackedEntityAttributeDimension tead = attributes.get( dimension );
- type = DimensionType.TRACKED_ENTITY_ATTRIBUTE;
+ return new BaseDimensionalObject( dimension, DimensionType.TRACKED_ENTITY_ATTRIBUTE, null, null, tead.getOperator(), tead.getFilter() );
}
// Tracked entity data element
@@ -410,9 +410,9 @@
if ( dataElements.containsKey( dimension ) )
{
- items.add( dataElements.get( dimension ).getQueryFilter() );
+ TrackedEntityDataElementDimension tedd = dataElements.get( dimension );
- type = DimensionType.TRACKED_ENTITY_DATAELEMENT;
+ return new BaseDimensionalObject( dimension, DimensionType.TRACKED_ENTITY_DATAELEMENT, null, null, tedd.getOperator(), tedd.getFilter() );
}
}
@@ -599,7 +599,9 @@
if ( attributes.containsKey( dimension ) )
{
- objects.add( new BaseDimensionalObject( dimension, DimensionType.TRACKED_ENTITY_ATTRIBUTE, attributes.get( dimension ).getQueryFilterAsList() ) );
+ TrackedEntityAttributeDimension tead = attributes.get( dimension );
+
+ objects.add( new BaseDimensionalObject( dimension, DimensionType.TRACKED_ENTITY_ATTRIBUTE, null, null, tead.getOperator(), tead.getFilter() ) );
}
// Tracked entity data element
@@ -613,7 +615,9 @@
if ( dataElements.containsKey( dimension ) )
{
- objects.add( new BaseDimensionalObject( dimension, DimensionType.TRACKED_ENTITY_DATAELEMENT, dataElements.get( dimension ).getQueryFilterAsList() ) );
+ TrackedEntityDataElementDimension tedd = dataElements.get( dimension );
+
+ objects.add( new BaseDimensionalObject( dimension, DimensionType.TRACKED_ENTITY_DATAELEMENT, null, null, tedd.getOperator(), tedd.getFilter() ) );
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java 2014-03-26 21:55:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java 2014-03-27 15:40:52 +0000
@@ -201,6 +201,7 @@
this.items = items;
}
+ @Override
@JsonProperty
@JsonView( {DimensionalView.class} )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
@@ -214,6 +215,7 @@
this.operator = operator;
}
+ @Override
@JsonProperty
@JsonView( {DimensionalView.class} )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java 2014-03-26 21:55:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java 1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
-package org.hisp.dhis.common;
-
-/*
- * Copyright (c) 2004-2014, 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.
- */
-
-/**
-* @author Lars Helge Overland
-*/
-public class QueryFilter
- extends BaseNameableObject
-{
- private String operator;
-
- private String filter;
-
- // -------------------------------------------------------------------------
- // Constructor
- // -------------------------------------------------------------------------
-
- public QueryFilter( String operator, String filter )
- {
- this.operator = operator;
- this.filter = filter;
- }
-
- // -------------------------------------------------------------------------
- // Getters and setters
- // -------------------------------------------------------------------------
-
- public String getOperator()
- {
- return operator;
- }
-
- public void setOperator( String operator )
- {
- this.operator = operator;
- }
-
- public String getFilter()
- {
- return filter;
- }
-
- public void setFilter( String filter )
- {
- this.filter = filter;
- }
-}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java 2014-03-27 15:21:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java 2014-03-27 15:40:52 +0000
@@ -155,7 +155,7 @@
// -------------------------------------------------------------------------
@JsonProperty
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+ @JsonSerialize( as = BaseIdentifiableObject.class )
@JsonView( {DetailedView.class, ExportView.class, DimensionalView.class} )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
public Program getProgram()
@@ -169,7 +169,7 @@
}
@JsonProperty
- @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+ @JsonSerialize( as = BaseIdentifiableObject.class )
@JsonView( {DetailedView.class, ExportView.class, DimensionalView.class} )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
public ProgramStage getProgramStage()
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeDimension.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeDimension.java 2014-03-26 21:55:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeDimension.java 2014-03-27 15:40:52 +0000
@@ -28,11 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.common.QueryFilter;
-
/**
* @author Lars Helge Overland
*/
@@ -62,19 +57,7 @@
{
return attribute != null ? attribute.getUid() : null;
}
-
- public QueryFilter getQueryFilter()
- {
- return new QueryFilter( operator, filter );
- }
-
- public List<QueryFilter> getQueryFilterAsList()
- {
- List<QueryFilter> list = new ArrayList<QueryFilter>();
- list.add( getQueryFilter() );
- return list;
- }
-
+
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityDataElementDimension.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityDataElementDimension.java 2014-03-26 21:55:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityDataElementDimension.java 2014-03-27 15:40:52 +0000
@@ -27,11 +27,6 @@
* (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 java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.common.QueryFilter;
import org.hisp.dhis.dataelement.DataElement;
/**
@@ -64,18 +59,6 @@
return dataElement != null ? dataElement.getUid() : null;
}
- public QueryFilter getQueryFilter()
- {
- return new QueryFilter( operator, filter );
- }
-
- public List<QueryFilter> getQueryFilterAsList()
- {
- List<QueryFilter> list = new ArrayList<QueryFilter>();
- list.add( getQueryFilter() );
- return list;
- }
-
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------