Add or replace a translation child object that represents the translated fields of this entity
@param INabuTranslation $nb_translation Translation child object to add / replace
@return CNabuDataObject Returns the translation setted.
347819
public function setTranslation(INabuTranslation $nb_translation)
    {
        if ($this->checkForValidTranslationInstance($nb_translation) &&
            ($nb_translation->isValueNumeric(NABU_LANG_FIELD_ID) || $nb_translation->isValueGUID(NABU_LANG_FIELD_ID))
        ) {
            $nb_translation->setTranslatedObject($this);
            $nb_language_id = $nb_translation->getValue(NABU_LANG_FIELD_ID);
            $this->translations_list->addItem($nb_translation);
            if ($this->translations_removed->containsKey($nb_language_id)) {
                $this->translations_removed->removeItem($nb_language_id);
            }
        }

        return $nb_translation;
    }
476890
public function setTranslationStatus(string $translation_status = "D") : CNabuDataObject
    {
        if ($translation_status === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$translation_status")
            );
        }
        $this->setValue('nb_site_lang_translation_status', $translation_status);
        
        return $this;
    }
217365
public function setTtl(int $ttl = 86400) : CNabuDataObject
    {
        if ($ttl === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$ttl")
            );
        }
        $this->setValue('nb_domain_zone_ttl', $ttl);
        
        return $this;
    }
1360023
public function setIcontactProspectId(int $nb_icontact_prospect_id) : CNabuDataObject
    {
        if ($nb_icontact_prospect_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_icontact_prospect_id")
            );
        }
        $this->setValue('nb_icontact_prospect_id', $nb_icontact_prospect_id);
        
        return $this;
    }
1104441
public function setIcontactId(int $nb_icontact_id) : CNabuDataObject
    {
        if ($nb_icontact_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_icontact_id")
            );
        }
        $this->setValue('nb_icontact_id', $nb_icontact_id);
        
        return $this;
    }
344936
public function addTranslationUnit(tao_helpers_translation_TranslationUnit $translationUnit)
    {
        
        // If the translation unit exists, we replace the target with the new one if it exists.
        foreach ($this->getTranslationUnits() as $tu) {
            
            if ($tu->getSource() == $translationUnit->getSource()) {
                // If we are here, it means that this TU is being overriden by
                // another one having the same source...
                //
                // Let's make sure we don't override the existing one with an empty target!
                if ($translationUnit->getTarget() !== '') {
                    $tu->setTarget($translationUnit->getTarget());
                    $tu->setAnnotations($translationUnit->getAnnotations());
                }

                return;
            }
        }
        
        // If we are here, it means that this TU does not exist.
        $translationUnit->setSourceLanguage($this->getSourceLanguage());
        $translationUnit->setTargetLanguage($this->getTargetLanguage());
        array_push($this->translationUnits, $translationUnit);
    }
397979
public function setLevel(int $level = 1) : CNabuDataObject
    {
        if ($level === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$level")
            );
        }
        $this->setValue('nb_site_map_level', $level);
        
        return $this;
    }
1213181
public function setId(int $id) : CNabuDataObject
    {
        if ($id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$id")
            );
        }
        $this->setValue('nb_catalog_tag_id', $id);
        
        return $this;
    }
1035230
public function setSerial(int $serial = 1) : CNabuDataObject
    {
        if ($serial === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$serial")
            );
        }
        $this->setValue('nb_domain_zone_serial', $serial);
        
        return $this;
    }
888401
public function createTranslator()
    {
        return $this
            ->entityTranslatorFactory
            ->create(
                $this->entityTranslationProvider,
                $this->configuration,
                $this->fallback
            );
    }
510468
public function setDomainZoneId(int $nb_domain_zone_id) : CNabuDataObject
    {
        if ($nb_domain_zone_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_domain_zone_id")
            );
        }
        $this->setValue('nb_domain_zone_id', $nb_domain_zone_id);
        
        return $this;
    }
1097177
public function setCommerceProductId(int $nb_commerce_product_id) : CNabuDataObject
    {
        if ($nb_commerce_product_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_commerce_product_id")
            );
        }
        $this->setValue('nb_commerce_product_id', $nb_commerce_product_id);
        
        return $this;
    }
1304638
public function setTitle(string $title) : CNabuDataObject
    {
        if ($title === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$title")
            );
        }
        $this->setValue('nb_user_group_lang_title', $title);
        
        return $this;
    }
19152
public function setCreationDatetime($creation_datetime) : CNabuDataObject
    {
        if ($creation_datetime === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$creation_datetime")
            );
        }
        $this->setValue('nb_user_creation_datetime', $creation_datetime);
        
        return $this;
    }
211641
public function setAttachment(string $attachment = "F") : CNabuDataObject
    {
        if ($attachment === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$attachment")
            );
        }
        $this->setValue('nb_site_target_attachment', $attachment);
        
        return $this;
    }
678335
public function setIContactProspect(CNabuIContactProspect $nb_icontact_prospect)
    {
        $this->nb_icontact_prospect = $nb_icontact_prospect;
        if ($this instanceof CNabuDataObject && $nb_icontact_prospect->contains(NABU_ICONTACT_PROSPECT_FIELD_ID)) {
            $this->transferValue($nb_icontact_prospect, NABU_ICONTACT_PROSPECT_FIELD_ID);
        }

        return $this;
    }
483836
public function setCommerceProductCategoryId(int $nb_commerce_product_category_id) : CNabuDataObject
    {
        if ($nb_commerce_product_category_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_commerce_product_category_id")
            );
        }
        $this->setValue('nb_commerce_product_category_id', $nb_commerce_product_category_id);
        
        return $this;
    }