dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36139
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18502: minor change, propertyByRole instead
------------------------------------------------------------
revno: 18502
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-03-06 14:00:14 +0700
message:
minor change, propertyByRole instead
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Schema.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-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;
+ }
}
}