Sets the Sport id

@param mixed $id
@param mixed $relatedId
@return PayloadInterface
332960
public function setSportId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Object not found.']);
		}

		// update
		if ($this->doSetSportId($model, $relatedId)) {
			$this->dispatch(ObjectEvent::PRE_SPORT_UPDATE, $model);
			$this->dispatch(ObjectEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(ObjectEvent::POST_SPORT_UPDATE, $model);
			$this->dispatch(ObjectEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
894927
protected function doSetMultipleOfId(Skill $model, $relatedId) {
		if ($model->getMultipleOfId() !== $relatedId) {
			$model->setMultipleOfId($relatedId);

			return true;
		}

		return false;
	}
1369750
public function setCard($id, $cardId)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/idCard', array('value' => $cardId));
    }
1253469
protected function doSetSportId(Object $model, $relatedId) {
		if ($model->getSportId() !== $relatedId) {
			$model->setSportId($relatedId);

			return true;
		}

		return false;
	}
239527
public static function add_related_competency($competencyid, $relatedcompetencyid) {
        $params = self::validate_parameters(self::add_related_competency_parameters(), array(
            'competencyid' => $competencyid,
            'relatedcompetencyid' => $relatedcompetencyid
        ));
        $competency = api::read_competency($params['competencyid']);
        self::validate_context($competency->get_context());

        return api::add_related_competency($params['competencyid'], $params['relatedcompetencyid']);
    }
929520
public function setId($id)
    {
        if (is_null($this->id) && ! is_null($id) && ($model = $this->getRepository()->find($id))) {
            $this->id = $id;

            parent::setModel($model);
            $this->getButtons()->setModel($model);
            $this->setModelClass(get_class($model));
        }
    }
554269
public function setId($id)
    {
        if (!is_int($id) && !is_null($id)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not an integer');
        }

        $this->id = $id;

        return $this;
    }
269463
public function add($related_product_id, $product_id)
    {
        $result = null;
        $this->hook->attach('product.related.add.before', $related_product_id, $product_id, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $this->db->insert('product_related', array('product_id' => $product_id, 'item_product_id' => $related_product_id));
        $this->db->insert('product_related', array('product_id' => $related_product_id, 'item_product_id' => $product_id));

        $this->hook->attach('product.related.add.after', $related_product_id, $product_id, $result, $this);
        return (bool) $result;
    }
1259001
protected function doSetObjectId(Skill $model, $relatedId) {
		if ($model->getObjectId() !== $relatedId) {
			$model->setObjectId($relatedId);

			return true;
		}

		return false;
	}
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;
    }
631851
public function setEndPositionId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// update
		if ($this->doSetEndPositionId($model, $relatedId)) {
			$this->dispatch(SkillEvent::PRE_END_POSITION_UPDATE, $model);
			$this->dispatch(SkillEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(SkillEvent::POST_END_POSITION_UPDATE, $model);
			$this->dispatch(SkillEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
307098
public function setAncestorId($id, $relatedId) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Lineage not found.']);
		}

		// update
		if ($this->doSetAncestorId($model, $relatedId)) {
			$this->dispatch(LineageEvent::PRE_ANCESTOR_UPDATE, $model);
			$this->dispatch(LineageEvent::PRE_SAVE, $model);
			$model->save();
			$this->dispatch(LineageEvent::POST_ANCESTOR_UPDATE, $model);
			$this->dispatch(LineageEvent::POST_SAVE, $model);

			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
691025
public function setId(int $id): Email
    {
        Assert::greaterThan($id, 0);

        $this->id = $id;

        return $this;
    }
177788
public function setId($id)
    {
        $this->id = (string)$id;

        if (!$this->isIdValid($this->id)) {
            throw new InvalidIdException($this);
        }

        return $this;
    }
634737
public function assignChild ($relationIdentifier, $id, $childId)
		{
			$relation = $this->getRelation($relationIdentifier);

			if (!$relation) {
				throw new RelationException('Invalid relation `' . $relationIdentifier);
			}

			if ($relation instanceof OneToMany) {
				$this->database->createQuery()
					->update()
					->table($relation->getRelatedTable())
					->set(
						array(
							$relation->getRelatedKey() => $id,
						)
					)
					->whereEqual($relation->getKey(), $childId)
					->execute();
			} else if ($relation instanceof ManyToMany) {
				if (! $this->getChild($relationIdentifier, $id, $childId)) {
					$this->database->createQuery()
						->insert()
						->into($relation->getRelationalTable())
						->set(
							array(
								$relation->getKey()         => $id,
								$relation->getRelatedKey()  => $childId,
							)
						)
						->execute();
				}
			} else {
				throw new RelationException('Invalid relation type `' . gettype($relation) . '`');
			}
		}
755780
public function setId($id)
    {
        $id = (string)$id;

        if(!isset($this->__flywheelInitialId)) {
            $this->__flywheelInitialId = $id;
        }

        $this->__flywheelDocId = $id;

        return $id;
    }
819246
protected function setIds($id)
    {
        if ($id) {
            $this->props = $this->mergeProps(array(
                $this->props,
                array(
                    'attribsContainer' => array(
                        'id' => $id.'_container',
                    ),
                    'attribs' => array(
                        'id' => $id,
                    ),
                    'attribsLabel' => array(
                        'for' => $id,
                    ),
                    'attribsHelpBlock' => array(
                        'id' => $id.'_help_block',
                    ),
                ),
            ));
        }
    }