=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/callable/IdentifiableObjectCallable.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/callable/IdentifiableObjectCallable.java 2015-02-24 10:39:18 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/callable/IdentifiableObjectCallable.java 2015-03-03 09:13:20 +0000 @@ -33,6 +33,7 @@ import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.common.IdentifiableProperty; /** * @author Lars Helge Overland @@ -42,6 +43,7 @@ { private IdentifiableObjectManager manager; private Class clazz; + private IdentifiableProperty property; private String uid; public IdentifiableObjectCallable( IdentifiableObjectManager manager, Class clazz, String uid ) @@ -50,12 +52,27 @@ this.clazz = clazz; this.uid = uid; } + + public IdentifiableObjectCallable( IdentifiableObjectManager manager, Class clazz, IdentifiableProperty property, String uid ) + { + this.manager = manager; + this.clazz = clazz; + this.property = property; + this.uid = uid; + } @Override public T call() throws ExecutionException { - return manager.get( clazz, uid ); + if ( property == null ) + { + return manager.get( clazz, uid ); + } + else + { + return manager.getObject( clazz, property, uid ); + } } public IdentifiableObjectCallable setUid( String uid )