src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java
/**
     * Returns the Contact with the specified id or null if
     * no such id was found.
     *
     * @param id the id of the contact to find.
     * @return the <tt>Contact</tt> carrying the specified
     * <tt>screenName</tt> or <tt>null</tt> if no such contact exits.
     */
Returns the Contact with the specified id or null if
no such id was found.

@param id the id of the contact to find.
@return the Contact carrying the specified
screenName or null if no such contact exits.
Returns the Contact with the specified id or null if no such id was found . @param id the id of the contact to find . @return the Contact carrying the specified screenName or null if no such contact exits .
public ContactJabberImpl findContactById(Jid id)
    {
        Iterator<ContactGroup> contactGroups = rootGroup.subgroups();
        ContactJabberImpl result = null;
        BareJid userId = id.asBareJid();
        while(contactGroups.hasNext())
        {
            ContactGroupJabberImpl contactGroup
                = (ContactGroupJabberImpl)contactGroups.next();
            result = contactGroup.findContact(userId);
            if (result != null)
                return result;
        }
        ContactGroupJabberImpl volatileGroup
            = getNonPersistentGroup();
        if(volatileGroup != null)
        {
            result = volatileGroup.findContact(id);
            if (result != null)
                return result;
        }
        return rootGroup.findContact(userId);
    }
public ContactJabberImpl findContactById ( Jid id ) { Iterator < ContactGroup > contactGroups = rootGroup . subgroups ( ) ; ContactJabberImpl result = null ; BareJid userId = id . asBareJid ( ) ; while ( contactGroups . hasNext ( ) ) { ContactGroupJabberImpl contactGroup = ( ContactGroupJabberImpl ) contactGroups . next ( ) ; result = contactGroup . findContact ( userId ) ; if ( result != null ) return result ; } ContactGroupJabberImpl volatileGroup = getNonPersistentGroup ( ) ; if ( volatileGroup != null ) { result = volatileGroup . findContact ( id ) ; if ( result != null ) return result ; } return rootGroup . findContact ( userId ) ; }
Returns the Contact with the specified id or null if
 no such id was found.
Returns the Contact with the specified id or null if no such id was found .
//check for private contacts //try the root group now