public function getById($thesaurusId)
{
if (!isset($this->thesaurusRepositoryById[$thesaurusId])) {
/** @var ThesaurusInterface $thesaurus */
$thesaurus = $this->thesaurusFactory->create()->load($thesaurusId);
if (!$thesaurus->getThesaurusId()) {
$exception = new NoSuchEntityException();
throw $exception->singleField('thesaurusId', $thesaurusId);
}
$this->thesaurusRepositoryById[$thesaurusId] = $thesaurus;
}
return $this->thesaurusRepositoryById[$thesaurusId];
}