private Object [ ] getPersonGroupMemberKeys ( IGroupMember gm ) { Object [ ] keys = null ; EntityIdentifier ei = gm . getUnderlyingEntityIdentifier ( ) ; IPersonAttributes attr = personAttributeDao . getPerson ( ei . getKey ( ) ) ; if ( attr != null && attr . getAttributes ( ) != null && ! attr . getAttributes ( ) . isEmpty ( ) ) { IPerson p = PersonFactory . createPerson ( ) ; p . setAttributes ( attr . getAttributes ( ) ) ; keys = p . getAttributeValues ( memberOfAttributeName ) ; log . debug ( "Groups for person {} is: {}" , p . getUserName ( ) , Arrays . toString ( keys ) ) ; } return keys != null ? keys : new Object [ ] { } ; }
gm should already be determined to be reference to person