------------------------------------------------------------ revno: 18278 committer: Morten Olav Hansen <morte...@gmail.com> branch nick: dhis2 timestamp: Mon 2015-02-16 16:46:42 +0700 message: minor modified: dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/IdSchemes.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-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/IdSchemes.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/IdSchemes.java 2015-02-16 08:40:56 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/utils/IdSchemes.java 2015-02-16 09:46:42 +0000 @@ -126,6 +126,20 @@ public static String getValue( IdentifiableObject identifiableObject, IdentifiableProperty identifiableProperty ) { boolean idScheme = IdentifiableProperty.ID.equals( identifiableProperty ) || IdentifiableProperty.UID.equals( identifiableProperty ); - return idScheme ? identifiableObject.getUid() : identifiableObject.getCode(); + + if ( idScheme ) + { + return identifiableObject.getUid(); + } + else if ( IdentifiableProperty.CODE.equals( identifiableProperty ) ) + { + return identifiableObject.getCode(); + } + else if ( IdentifiableProperty.NAME.equals( identifiableProperty ) ) + { + return identifiableObject.getName(); + } + + return null; } }
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp