dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40137
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20326: Org unit search, minor optimization
------------------------------------------------------------
revno: 20326
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-23 19:42:53 +0200
message:
Org unit search, minor optimization
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/SpringDataValueSetStore.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/dataanalysis/jdbc/JdbcDataAnalysisStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2015-09-23 16:56:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2015-09-23 17:42:53 +0000
@@ -111,7 +111,7 @@
for ( OrganisationUnit parent : parents )
{
- sql += "ou.path like '%" + parent.getUid() + "%' or ";
+ sql += "ou.path like '" + parent.getPath() + "%' or ";
}
sql = TextUtils.removeLastOr( sql ) + ")";
@@ -155,7 +155,7 @@
for ( OrganisationUnit parent : parents )
{
- sql += "ou.path like '%" + parent.getUid() + "%' or ";
+ sql += "ou.path like '" + parent.getPath() + "%' or ";
}
sql = TextUtils.removeLastOr( sql ) + ")";
@@ -209,7 +209,7 @@
for ( OrganisationUnit parent : parents )
{
- sql += "ou.path like '%" + parent.getUid() + "%' or ";
+ sql += "ou.path like '" + parent.getPath() + "%' or ";
}
sql = TextUtils.removeLastOr( sql ) + ")";
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java 2015-09-23 12:23:52 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java 2015-09-23 17:42:53 +0000
@@ -214,7 +214,7 @@
{
for ( OrganisationUnit parent : params.getParents() )
{
- query.setString( parent.getUid(), "%" + parent.getUid() + "%" );
+ query.setString( parent.getUid(), parent.getPath() + "%" );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/SpringDataValueSetStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/SpringDataValueSetStore.java 2015-09-23 17:15:50 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/SpringDataValueSetStore.java 2015-09-23 17:42:53 +0000
@@ -201,7 +201,7 @@
for ( OrganisationUnit parent : params.getOrganisationUnits() )
{
- sql += "ou.path like '%" + parent.getUid() + "%' or ";
+ sql += "ou.path like '" + parent.getPath() + "%' or ";
}
sql = TextUtils.removeLastOr( sql ) + ")";