/**
   * @see de.willuhn.jameica.hbci.gui.parts.AbstractFromToList#getList(java.util.Date,
   *     java.util.Date, java.lang.String)
   */
  protected DBIterator getList(Date from, Date to, String text) throws RemoteException {
    HBCIDBService service = (HBCIDBService) Settings.getDBService();

    DBIterator list = service.createList(getObjectType());
    if (from != null)
      list.addFilter(
          "termin >= ?", new Object[] {new java.sql.Date(DateUtil.startOfDay(from).getTime())});
    if (to != null)
      list.addFilter(
          "termin <= ?", new Object[] {new java.sql.Date(DateUtil.endOfDay(to).getTime())});
    if (text != null && text.length() > 0) {
      list.addFilter("LOWER(bezeichnung) like ?", new Object[] {"%" + text.toLowerCase() + "%"});
    }
    list.setOrder("ORDER BY " + service.getSQLTimestamp("termin") + " DESC, id DESC");
    return list;
  }
  /** @see de.willuhn.jameica.search.SearchProvider#search(java.lang.String) */
  public List search(String search) throws RemoteException, ApplicationException {
    if (search == null || search.length() == 0) return null;

    String text = "%" + search.toLowerCase() + "%";
    HBCIDBService service = (HBCIDBService) Settings.getDBService();
    DBIterator list = service.createList(AuslandsUeberweisung.class);
    list.addFilter(
        "LOWER(zweck) LIKE ? OR "
            + "LOWER(empfaenger_name) LIKE ? OR "
            + "LOWER(endtoendid) LIKE ? OR "
            + "LOWER(empfaenger_konto) LIKE ?",
        text,
        text,
        text,
        text);
    list.setOrder("ORDER BY " + service.getSQLTimestamp("termin") + " DESC");

    ArrayList results = new ArrayList();
    while (list.hasNext()) {
      results.add(new MyResult((AuslandsUeberweisung) list.next()));
    }
    return results;
  }