public function setUnits($units)
    {
        $this->unitsByLocaleAndDomain = array();
        foreach ($units as $unit) {
            foreach ($unit->getTranslations() as $translation) {
                $this->unitsByLocaleAndDomain[$translation->getLocale()][$translation->getDomain()][] = $translation;
            }
        }
    }