=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java 2015-03-06 06:58:52 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.java 2015-03-06 07:00:14 +0000 @@ -43,7 +43,6 @@ import org.springframework.core.Ordered; import org.springframework.util.StringUtils; -import java.lang.reflect.Method; import java.util.List; import java.util.Map; @@ -329,36 +328,16 @@ return getPropertyMap().containsKey( propertyName ); } - public Method getterByRole( String role ) - { - if ( StringUtils.isEmpty( role ) ) - { - return null; - } - - for ( Property property : propertyMap.values() ) - { - if ( property.isCollection() && property.isManyToMany() && (role.equals( property.getOwningRole() ) || role.equals( property.getInverseRole() )) ) - { - return property.getGetterMethod(); - } - } - - return null; - } - - public Method setterByRole( String role ) - { - if ( StringUtils.isEmpty( role ) ) - { - return null; - } - - for ( Property property : propertyMap.values() ) - { - if ( property.isCollection() && property.isManyToMany() && (role.equals( property.getOwningRole() ) || role.equals( property.getInverseRole() )) ) - { - return property.getSetterMethod(); + public Property propertyByRole( String role ) + { + if ( !StringUtils.isEmpty( role ) ) + { + for ( Property property : propertyMap.values() ) + { + if ( property.isCollection() && property.isManyToMany() && (role.equals( property.getOwningRole() ) || role.equals( property.getInverseRole() )) ) + { + return property; + } } }