/**
  * appends sql to given select statement
  *
  * @param  Zend_Db_Select                    $_select
  * @param  Tinebase_Backend_Sql_Abstract     $_backend
  * 
  * @todo allow multiple role/status filters?
  */
 public function appendFilterSql($_select, $_backend)
 {
     if (!is_array($this->_foreignIds)) {
         $this->_getFilterData();
         $events = $this->_controller->search($this->_filterGroup);
         Calendar_Model_Rrule::mergeAndRemoveNonMatchingRecurrences($events, $this->_filterGroup);
         $this->_getForeignIds($events);
     }
     // this is supposed to run in ContactFilter context
     $contactIdFilter = new Addressbook_Model_ContactIdFilter('id', 'in', $this->_foreignIds);
     $contactIdFilter->appendFilterSql($_select, $_backend);
 }