function populate(int $control_id, &$control)
 {
     if ($control == null) {
         $start_date = date("d.m.Y", $this->db->f('start_date'));
         $end_date = date("d.m.Y", $this->db->f('end_date'));
         $control = new controller_control((int) $control_id);
         $control->set_title($this->unmarshal($this->db->f('title', true), 'string'));
         $control->set_description($this->unmarshal($this->db->f('description', true), 'string'));
         $control->set_start_date($start_date);
         $control->set_end_date($end_date);
         $control->set_procedure_id($this->unmarshal($this->db->f('procedure_id'), 'int'));
         $control->set_procedure_name($this->unmarshal($this->db->f('procedure_name', true), 'string'));
         $control->set_requirement_id($this->unmarshal($this->db->f('requirement_id'), 'int'));
         $control->set_costresponsibility_id($this->unmarshal($this->db->f('costresponsibility_id'), 'int'));
         $control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id'), 'int'));
         $control->set_control_area_id($this->unmarshal($this->db->f('control_area_id'), 'int'));
         $control->set_control_area_name($this->unmarshal($this->db->f('control_area_name', true), 'string'));
         $control->set_equipment_type_id($this->unmarshal($this->db->f('equipment_type_id'), 'int'));
         $control->set_equipment_id($this->unmarshal($this->db->f('equipment_id'), 'int'));
         $control->set_location_code($this->unmarshal($this->db->f('location_code', true), 'string'));
         $control->set_location_id($this->unmarshal($this->db->f('location_id'), 'string'));
         $control->set_repeat_type($this->unmarshal($this->db->f('repeat_type'), 'int'));
         $control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval'), 'int'));
     }
     return $control;
 }