Set Item prototype identifier.

@param Prototype|string $objectOrId Prototype or its ID.

@since 0.1
435528
public function setPrototypeId($objectOrId)
    {
        if ($objectOrId instanceof Prototype) {
            $objectOrId = $objectOrId->getId();
        }

        $this->setValue('prototypeId', (string) $objectOrId);
    }
1184299
public function setDescription($objectData, $customData = [])
    {
        $this->set('description', $customData['description']);
        // Custom description
        if(isset($customData['description'])) {
            $this->set('description', $customData['description']);
        }else{
            // Avoid duplicate meta tags
            if(!$this->metaExists('description') && isset($objectData->description)) {
                $this->set('description', $objectData->description);
            }
        }

        return $this;
    }
778876
public function setProperty(NodeInterface $node, \DOMElement $element) : void
    {
        if ($node instanceof ItemInterface) {
            $author = $node->newAuthor();
            $author->setName($element->nodeValue);
            $node->setAuthor($author);
        }
    }
1338895
public function setValue($object, $value = null)
    {
        if (! ($object instanceof Proxy && ! $object->__isInitialized())) {
            parent::setValue($object, $value);

            return;
        }

        $originalInitializer = $object->__getInitializer();
        $object->__setInitializer(null);
        parent::setValue($object, $value);
        $object->__setInitializer($originalInitializer);
    }
161341
public function setIdentifier($identifier)
    {
        if (preg_match(NodeIdentifierValidator::PATTERN_MATCH_NODE_IDENTIFIER, $identifier) !== 1) {
            throw new \InvalidArgumentException(sprintf('Invalid UUID "%s" given.', $identifier), 1385026112);
        }
        $this->identifier = $identifier;
    }
815748
public void setItemIds(@Nullable ItemIds<? super T> itemIds) {
        if (this.itemIds != itemIds) {
            this.itemIds = itemIds;
            setHasStableIds(itemIds != null);
        }
    }
1120343
public function setItemPosition($position)
    {
        if ((int)$position >= 0) {
            // check if given position is larger as possible position
            if ($position >= ($countItems = $this->countItems())) {
                // set position to max possible position
                $position = $countItems - 1;
            }

            if ($position <= ($this->countItems() / 2)) {
                $this->getIteratorObject()->rewind();
                if (($countItems = $this->countItems()) > 0) {
                    $this->_itemPosition = $countItems - 1;
                } else {
                    $this->_itemPosition = 0;
                }

                // go with next
                while ($position != $this->_itemPosition) {
                    $this->getIteratorObject()->next();

                    if (!$this->getIteratorObject()->valid()) {
                        throw new IteratorDecoratorReverseException('Specified position is not valid (next).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemPosition--;
                    }
                }
            } else {
                $this->getIteratorObject()->last();

                if (!$this->getIteratorObject()->valid()) {
                    $this->_itemPosition = 0;
                } else {
                    $this->_itemPosition = 0;
                }

                // go with prev
                while ($position != $this->_itemPosition) {
                    $this->getIteratorObject()->previous();

                    if (!$this->getIteratorObject()->valid()) {
                        throw new IteratorDecoratorReverseException('Specified position is not valid (previous).', E_NOTICE);
                        break;
                    } else {
                        $this->_itemPosition++;
                    }
                }
            }
        } else {
            throw new IteratorDecoratorReverseException('Specified position is not valid.', E_WARNING);
        }
    }
801543
public function load($objectId)
    {
        if (!empty($objectId)) {
            $blResult = is_array($objectId)? $this->_loadByArray($objectId) : $this->_loadById($objectId);
            if ($blResult === false) {
                $sClass = get_class($this->getObject());
                throw new Exception("Failed to load $sClass with id $objectId");
            }
        }
    }
125356
public function setDocumentId(\AgentSIB\Diadoc\Api\Proto\DocumentIdEx $value = null)
    {
        $this->DocumentId = $value;
    }
1193921
public function setObjectId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->object_id !== $v) {
            $this->object_id = $v;
            $this->modifiedColumns[SkillTableMap::COL_OBJECT_ID] = true;
        }

        if ($this->aObject !== null && $this->aObject->getId() !== $v) {
            $this->aObject = null;
        }

        return $this;
    }
1186944
public function set(ItemInterface $item)
    {
        $id = $item->getId();
        $collectionName = $item->getCollection();

        $this->items[$id] = $item;

        if (isset($this->idCollections[$id]) && $this->idCollections[$id] !== $collectionName) {
            throw new \RuntimeException(sprintf('The item with id: "%s" has been registered previously with another collection.', $id));
        }

        if (isset($this->itemCollections[$collectionName]) === false) {
            $this->itemCollections[$collectionName] = [];
        }

        $this->itemCollections[$collectionName][$id] = $item;
        $this->idCollections[$id] = $collectionName;
    }
525891
public function setTypeId( $typeid )
	{
		if ( $typeid == $this->getTypeId() ) { return; }

		$this->_values['typeid'] = (int) $typeid;
		$this->setModified();
	}
675870
protected function initialize()
    {
        if (is_array($this->objectIdentifiers)) {
            foreach ($this->objectIdentifiers as $identifier) {
                try {
                    parent::attach($this->persistenceManager->getObjectByIdentifier($identifier));
                } catch (Exception\InvalidObjectDataException $exception) {
                    // when security query rewriting holds back an object here, we skip it...
                }
            }
            $this->objectIdentifiers = null;
        }
    }
412105
public function setIdentifierValue($document, $id)
    {
        if (isset($this->reflFields[$this->identifier])) {
            $this->reflFields[$this->identifier]->setValue($document, $id);
        }
    }
757998
public function setIdentifier($identifier)
    {
        if ($this->identifier && $this->identifier !== $identifier) {
            throw new MappingException('Cannot map the identifier to more than one property');
        }

        $this->identifier = $identifier;
    }
51821
@Beta
    public MSICredentials withObjectId(String objectId) {
        this.objectId = objectId;
        this.clientId = null;
        this.identityId = null;
        return this;
    }
530983
public function set_object_type( $object_type ) {
		if ( ! in_array( $object_type, $supported = [ 'user', 'comment', 'term', 'post' ] ) ) {
			// @codingStandardsIgnoreLine
			_doing_it_wrong( __FUNCTION__, 'The object type must be one of: ' . implode( ', ', $supported ), null );
		}

		$this->object_type = $object_type;

		return $this;
	}