dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43680
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22141: Approval. Code style.
------------------------------------------------------------
revno: 22141
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-03-04 12:29:07 +0100
message:
Approval. Code style.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.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/dataapproval/hibernate/HibernateDataApprovalStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java 2016-02-16 17:04:32 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java 2016-03-04 11:29:07 +0000
@@ -365,23 +365,23 @@
approvedAboveSubquery + " as approved_above " +
"from categoryoptioncombo coc " +
"join categoryoptioncombos_categoryoptions cocco on cocco.categoryoptioncomboid = coc.categoryoptioncomboid " +
- ( attributeCombo == null ? "" : "join categorycombos_optioncombos ccoc on ccoc.categoryoptioncomboid = cocco.categoryoptioncomboid " +
- "and ccoc.categorycomboid = " + attributeCombo.getId() + " " ) +
- "join dataelementcategoryoption co on co.categoryoptionid = cocco.categoryoptionid " +
- "and (co.startdate is null or co.startdate <= '" + endDate + "') and (co.enddate is null or co.enddate >= '" + startDate + "') " +
- "join _orgunitstructure o on " + orgUnitJoinOn + " " +
- "left join categoryoption_organisationunits coo on coo.categoryoptionid = co.categoryoptionid " +
- "left join _orgunitstructure ous on ous.idlevel" + orgUnitLevel + " = o.organisationunitid and ous.organisationunitid = coo.organisationunitid " +
- joinAncestors +
- "where ( coo.categoryoptionid is null or ous.organisationunitid is not null " + testAncestors + ")" +
- ( attributeOptionCombos == null || attributeOptionCombos.isEmpty() ? "" : " and cocco.categoryoptioncomboid in (" +
- StringUtils.join( IdentifiableObjectUtils.getIdentifiers( attributeOptionCombos ), "," ) + ") " ) +
- ( isSuperUser || user == null ? "" :
- " and ( co.publicaccess is null or left(co.publicaccess, 1) = 'r' or co.userid is null or co.userid = " + user.getId() + " or exists ( " +
- "select 1 from dataelementcategoryoptionusergroupaccesses couga " +
- "left join usergroupaccess uga on uga.usergroupaccessid = couga.usergroupaccessid " +
- "left join usergroupmembers ugm on ugm.usergroupid = uga.usergroupid " +
- "where couga.categoryoptionid = cocco.categoryoptionid and ugm.userid = " + user.getId() + ") )" );
+ ( attributeCombo == null ? "" : "join categorycombos_optioncombos ccoc on ccoc.categoryoptioncomboid = cocco.categoryoptioncomboid " +
+ "and ccoc.categorycomboid = " + attributeCombo.getId() + " " ) +
+ "join dataelementcategoryoption co on co.categoryoptionid = cocco.categoryoptionid " +
+ "and (co.startdate is null or co.startdate <= '" + endDate + "') and (co.enddate is null or co.enddate >= '" + startDate + "') " +
+ "join _orgunitstructure o on " + orgUnitJoinOn + " " +
+ "left join categoryoption_organisationunits coo on coo.categoryoptionid = co.categoryoptionid " +
+ "left join _orgunitstructure ous on ous.idlevel" + orgUnitLevel + " = o.organisationunitid and ous.organisationunitid = coo.organisationunitid " +
+ joinAncestors +
+ "where ( coo.categoryoptionid is null or ous.organisationunitid is not null " + testAncestors + ")" +
+ ( attributeOptionCombos == null || attributeOptionCombos.isEmpty() ? "" : " and cocco.categoryoptioncomboid in (" +
+ StringUtils.join( IdentifiableObjectUtils.getIdentifiers( attributeOptionCombos ), "," ) + ") " ) +
+ ( isSuperUser || user == null ? "" :
+ " and ( co.publicaccess is null or left(co.publicaccess, 1) = 'r' or co.userid is null or co.userid = " + user.getId() + " or exists ( " +
+ "select 1 from dataelementcategoryoptionusergroupaccesses couga " +
+ "left join usergroupaccess uga on uga.usergroupaccessid = couga.usergroupaccessid " +
+ "left join usergroupmembers ugm on ugm.usergroupid = uga.usergroupid " +
+ "where couga.categoryoptionid = cocco.categoryoptionid and ugm.userid = " + user.getId() + ") )" );
log.debug( "Get approval SQL: " + sql );