public function setSavedSearch($savedSearch)
    {
        if ($savedSearch instanceof SavedSearch) {
            $this->savedSearch = $savedSearch;
        } elseif (is_array($savedSearch)) {
            $this->savedSearch = new SavedSearch($savedSearch);
        } else {
            $this->savedSearch = null;
            trigger_error('Argument must be an object of class SavedSearch. Data loss!', E_USER_WARNING);
        }

        return $this;
    }