protected function convert_existing_data_to_values(\stdClass $data) : \stdClass {
        $data->lawfulbases = explode(',', $data->lawfulbases);
        if (!empty($data->sensitivedatareasons)) {
            $data->sensitivedatareasons = explode(',', $data->sensitivedatareasons);
        }

        // Convert the single properties into number and unit.
        $strlen = strlen($data->retentionperiod);
        $data->retentionperiodnumber = substr($data->retentionperiod, 1, $strlen - 2);
        $data->retentionperiodunit = substr($data->retentionperiod, $strlen - 1);
        unset($data->retentionperiod);

        return $data;
    }