protected function populate(int $party_id, &$party)
 {
     if ($party == null) {
         $party = new rental_party((int) $party_id);
         $party->set_account_number($this->unmarshal($this->db->f('account_number'), 'string'));
         $party->set_address_1($this->unmarshal($this->db->f('address_1'), 'string'));
         $party->set_address_2($this->unmarshal($this->db->f('address_2'), 'string'));
         $party->set_comment($this->unmarshal($this->db->f('comment'), 'string'));
         $party->set_company_name($this->unmarshal($this->db->f('company_name'), 'string'));
         $party->set_department($this->unmarshal($this->db->f('department'), 'string'));
         $party->set_email($this->unmarshal($this->db->f('email'), 'string'));
         $party->set_fax($this->unmarshal($this->db->f('fax'), 'string'));
         $party->set_first_name($this->unmarshal($this->db->f('first_name'), 'string'));
         $party->set_is_inactive($this->unmarshal($this->db->f('is_inactive'), 'bool'));
         $party->set_last_name($this->unmarshal($this->db->f('last_name'), 'string'));
         $party->set_location_id($this->unmarshal($this->db->f('org_location_id'), 'int'));
         $party->set_identifier($this->unmarshal($this->db->f('identifier'), 'string'));
         $party->set_mobile_phone($this->unmarshal($this->db->f('mobile_phone'), 'string'));
         $party->set_place($this->unmarshal($this->db->f('place'), 'string'));
         $party->set_postal_code($this->unmarshal($this->db->f('postal_code'), 'string'));
         $party->set_reskontro($this->unmarshal($this->db->f('reskontro'), 'string'));
         $party->set_title($this->unmarshal($this->db->f('title'), 'string'));
         $party->set_url($this->unmarshal($this->db->f('url'), 'string'));
         $party->set_org_enhet_id($this->unmarshal($this->db->f('org_enhet_id'), 'string'));
         $party->set_unit_leader($this->unmarshal($this->db->f('unit_leader'), 'string'));
         $sync_message = $party->set_sync_data(array('responsibility_id' => $this->unmarshal($this->db->f('responsibility_id'), 'string'), 'org_enhet_id' => $this->unmarshal($this->db->f('org_enhet_id'), 'string'), 'result_unit_number' => $this->unmarshal($this->db->f('result_unit_number'), 'string')));
         if (isset($sync_message) && $sync_message != '') {
             $party->add_sync_problem($sync_message);
         }
     }
     return $party;
 }