public NodeAffiliate getAffiliate(JID jid) {
        NodeAffiliate result = null;
        for (NodeAffiliate affiliate : affiliates) {
            if (jid.equals(affiliate.getJID())) {
                result = affiliate;
                break;
            }
        }
        getLogger().trace("Found {} affiliate for '{}'", result == null ? "no" : result.getAffiliation(), jid);
        return result;
    }
Returns the {@link NodeAffiliate} of the specified {@link JID} or {@code null}
if none was found. Users that have a subscription with the node will ALWAYS
have an affiliation even if the affiliation is of type {@code none}.

@param jid the JID of the user to look his affiliation with this node.
@return the NodeAffiliate of the specified JID or {@code null} if none was found.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java