dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33726
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17268: Event analytics, using option set uid instead of boolean in header
------------------------------------------------------------
revno: 17268
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-10-25 09:31:44 +0200
message:
Event analytics, using option set uid instead of boolean in header
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.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/GridHeader.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java 2014-10-16 12:28:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java 2014-10-25 07:31:44 +0000
@@ -53,7 +53,7 @@
private boolean meta;
- private boolean optionSet;
+ private String optionSet;
// -------------------------------------------------------------------------
// Constructors
@@ -128,7 +128,7 @@
* @param meta meta
* @param optionSet optionSet
*/
- public GridHeader( String name, String column, String type, boolean hidden, boolean meta, boolean optionSet )
+ public GridHeader( String name, String column, String type, boolean hidden, boolean meta, String optionSet )
{
this.name = name;
this.column = column;
@@ -213,12 +213,12 @@
@JsonProperty
@JsonView( {DetailedView.class} )
- public boolean isOptionSet()
+ public String getOptionSet()
{
return optionSet;
}
- public void setOptionSet( boolean optionSet )
+ public void setOptionSet( String optionSet )
{
this.optionSet = optionSet;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java 2014-10-16 12:28:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java 2014-10-25 07:31:44 +0000
@@ -46,7 +46,7 @@
private boolean numeric;
- private boolean optionSet;
+ private String optionSet;
// -------------------------------------------------------------------------
// Constructors
@@ -57,14 +57,14 @@
this.item = item;
}
- public QueryItem( NameableObject item, boolean numeric, boolean optionSet )
+ public QueryItem( NameableObject item, boolean numeric, String optionSet )
{
this.item = item;
this.numeric = numeric;
this.optionSet = optionSet;
}
- public QueryItem( NameableObject item, QueryOperator operator, String filter, boolean numeric, boolean optionSet )
+ public QueryItem( NameableObject item, QueryOperator operator, String filter, boolean numeric, String optionSet )
{
this.item = item;
this.numeric = numeric;
@@ -76,7 +76,7 @@
}
}
- public QueryItem( NameableObject item, List<QueryFilter> filters, boolean numeric, boolean optionSet )
+ public QueryItem( NameableObject item, List<QueryFilter> filters, boolean numeric, String optionSet )
{
this.item = item;
this.filters = filters;
@@ -109,7 +109,7 @@
for ( NameableObject object : objects )
{
- queryItems.add( new QueryItem( object, false, false ) );
+ queryItems.add( new QueryItem( object, false, null ) );
}
return queryItems;
@@ -188,12 +188,12 @@
this.numeric = numeric;
}
- public boolean isOptionSet()
+ public String getOptionSet()
{
return optionSet;
}
- public void setOptionSet( boolean optionSet )
+ public void setOptionSet( String optionSet )
{
this.optionSet = optionSet;
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2014-10-23 13:55:37 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java 2014-10-25 07:31:44 +0000
@@ -165,7 +165,7 @@
for ( QueryItem item : params.getItems() )
{
- grid.addHeader( new GridHeader( item.getItem().getUid(), item.getItem().getName(), item.getTypeAsString(), false, true, item.isOptionSet() ) );
+ grid.addHeader( new GridHeader( item.getItem().getUid(), item.getItem().getName(), item.getTypeAsString(), false, true, item.getOptionSet() ) );
}
grid.addHeader( new GridHeader( "value", "Value", Double.class.getName(), false, false ) );
@@ -270,7 +270,7 @@
for ( QueryItem item : params.getItems() )
{
- grid.addHeader( new GridHeader( item.getItem().getUid(), item.getItem().getName(), item.getTypeAsString(), false, true, item.isOptionSet() ) );
+ grid.addHeader( new GridHeader( item.getItem().getUid(), item.getItem().getName(), item.getTypeAsString(), false, true, item.getOptionSet() ) );
}
// ---------------------------------------------------------------------
@@ -643,14 +643,14 @@
if ( de != null ) //TODO check if part of program
{
- return new QueryItem( de, de.isNumericType(), de.hasOptionSet() );
+ return new QueryItem( de, de.isNumericType(), de.hasOptionSet() ? de.getOptionSet().getUid() : null );
}
TrackedEntityAttribute at = attributeService.getTrackedEntityAttribute( item );
if ( at != null )
{
- return new QueryItem( at, at.isNumericType(), at.hasOptionSet() );
+ return new QueryItem( at, at.isNumericType(), at.hasOptionSet() ? at.getOptionSet().getUid() : null );
}
throw new IllegalQueryException( "Item identifier does not reference any item part of the program: " + item );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2014-10-20 16:24:09 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java 2014-10-25 07:31:44 +0000
@@ -581,7 +581,7 @@
TrackedEntityInstanceQueryParams params = new TrackedEntityInstanceQueryParams();
- QueryItem queryItem = new QueryItem( attribute, QueryOperator.EQ, value, attribute.isNumericType(), attribute.hasOptionSet() );
+ QueryItem queryItem = new QueryItem( attribute, QueryOperator.EQ, value, attribute.isNumericType(), null );
params.addAttribute( queryItem );
if ( attribute.getOrgunitScope() && attribute.getProgramScope() )
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2014-10-16 12:28:42 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2014-10-25 07:31:44 +0000
@@ -352,7 +352,7 @@
TrackedEntityInstanceQueryParams params = new TrackedEntityInstanceQueryParams();
- QueryItem queryItem = new QueryItem( attribute, QueryOperator.EQ, value, attribute.isNumericType(), attribute.hasOptionSet() );
+ QueryItem queryItem = new QueryItem( attribute, QueryOperator.EQ, value, attribute.isNumericType(), null );
params.addAttribute( queryItem );
if ( attribute.getOrgunitScope() )
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-10-16 12:28:42 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2014-10-25 07:31:44 +0000
@@ -1576,7 +1576,7 @@
else
{
TrackedEntityAttribute at = attributeService.getTrackedEntityAttributeByName( split[0] );
- QueryItem queryItem = new QueryItem( at, at.isNumericType(), at.hasOptionSet() );
+ QueryItem queryItem = new QueryItem( at, at.isNumericType(), null );
QueryOperator operator = QueryOperator.fromString( split[1] );
queryItem.getFilters().add( new QueryFilter( operator, split[2] ) );
param.getFilters().add( queryItem );
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2014-10-16 12:28:42 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2014-10-25 07:31:44 +0000
@@ -492,7 +492,7 @@
throw new IllegalQueryException( "Attribute does not exist: " + item );
}
- return new QueryItem( at, at.isNumericType(), at.hasOptionSet() );
+ return new QueryItem( at, at.isNumericType(), at.hasOptionSet() ? at.getOptionSet().getUid() : null );
}
/**