public ArrayList<Specialty> listSpecialties(Specialty filterLookup)
      throws DomainInterfaceException {
    if (filterLookup == null)
      throw new DomainInterfaceException("Can not search on null speciality filter");

    ArrayList<Specialty> specialtiesList = new ArrayList<Specialty>();

    ArrayList<String> searchWords = new ArrayList<String>();

    filterLookup.setText(filterLookup.getText().replaceAll(" ", "%"));
    String[] split = filterLookup.getText().split("%");

    for (int i = split.length - 1; i >= 0; i--) {
      if (!(split[i].equalsIgnoreCase(""))) searchWords.add(split[i]);
    }

    LookupService lookup = this.getLookupService();
    SpecialtyCollection collection =
        (SpecialtyCollection)
            lookup.getLookupCollection(
                Specialty.TYPE_ID, SpecialtyCollection.class, Specialty.class);

    for (int i = 0; i < collection.size(); i++) {
      Specialty specialty = collection.get(i);

      if (containsText(specialty, searchWords)) specialtiesList.add(specialty);
    }

    return specialtiesList;
  }
 protected final void bindcmbSpecialtyLookup() {
   this.form.lyrMappings().tabExternal().cmbSpecialty().clear();
   ims.core.vo.lookups.SpecialtyCollection lookupCollection =
       ims.core.vo.lookups.LookupHelper.getSpecialty(this.domain.getLookupService());
   for (int x = 0; x < lookupCollection.size(); x++) {
     this.form
         .lyrMappings()
         .tabExternal()
         .cmbSpecialty()
         .newRow(
             lookupCollection.get(x),
             lookupCollection.get(x).getText(),
             lookupCollection.get(x).getImage(),
             lookupCollection.get(x).getTextColor());
   }
 }