Exemple #1
0
  public Partner getLinkedPartner(PartnerRole partnerRole) {

    for (Partner linkedPartner : linkedPartners) {
      if (linkedPartner.isActsAs(partnerRole)) {
        return linkedPartner;
      }
    }

    return null;
  }
Exemple #2
0
  @NotNull
  public List<Partner> getLinkedPartners(PartnerRole partnerRole) {
    final List<Partner> result = new ArrayList<Partner>();

    for (Partner linkedPartner : linkedPartners) {
      if (linkedPartner.isActsAs(partnerRole)) {
        result.add(linkedPartner);
      }
    }

    return result;
  }