dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42217
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21572: Performance improvement, expressions
------------------------------------------------------------
revno: 21572
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-04 12:15:14 +0100
message:
Performance improvement, expressions
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java
dhis-2/dhis-services/dhis-service-core/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-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java 2016-01-04 09:48:25 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java 2016-01-04 11:15:14 +0000
@@ -799,7 +799,7 @@
{
String co = matcher.group( 1 );
- Constant constant = idObjectManager.getNoAcl( Constant.class, co );
+ Constant constant = constants.get( co );
String replacement = constant != null ? String.valueOf( constant.getValue() ) : NULL_REPLACEMENT;
@@ -819,7 +819,7 @@
{
String oug = matcher.group( 1 );
- OrganisationUnitGroup group = idObjectManager.get( OrganisationUnitGroup.class, oug );
+ OrganisationUnitGroup group = orgUnitGroups.get( oug );
String replacement = group != null ? String.valueOf( group.getMembers().size() ) : NULL_REPLACEMENT;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2016-01-04 11:15:14 +0000
@@ -269,7 +269,7 @@
User user = currentUserService.getCurrentUser();
- if ( !params.hasOrganisationUnits() && !(params.isOrganisationUnitMode( ALL ) || params.isOrganisationUnitMode( ACCESSIBLE )) )
+ if ( !params.hasOrganisationUnits() && !( params.isOrganisationUnitMode( ALL ) || params.isOrganisationUnitMode( ACCESSIBLE ) ) )
{
violation = "At least one organisation unit must be specified";
}