function addResource($resource_id)
 {
     // check, if the added resources needs to be checked
     $resObj = ResourceObject::Factory($resource_id);
     if (!$resObj->getMultipleAssign()) {
         if (!$this->begin || !$this->end) {
             throw new RuntimeException(__METHOD__ . ' could not add resource without time range');
         }
         $this->resource_ids[] = $resource_id;
         $parameters = array();
         $query = "SELECT DISTINCT assign_id\n                FROM resources_assign ra\n                LEFT JOIN resources_temporary_events rte USING(assign_id,resource_id)\n                WHERE rte.event_id IS NULL AND\n                ra.resource_id = :resource_id AND\n                (ra.begin BETWEEN :begin AND :end OR (ra.begin <= :end AND (ra.repeat_end > :begin OR ra.end > :begin)))";
         $parameters[':resource_id'] = $resource_id;
         $parameters[':begin'] = $this->begin;
         $parameters[':end'] = $this->end;
         $statement = DBManager::get()->prepare($query);
         $statement->execute($parameters);
         $missing_temporary_assigns = $statement->fetchAll(PDO::FETCH_COLUMN);
         if (count($missing_temporary_assigns)) {
             foreach ($missing_temporary_assigns as $assign_id) {
                 $assign = new AssignObject($assign_id);
                 $assign->updateResourcesTemporaryEvents();
             }
         }
         return true;
     }
     return false;
 }