Set hit entity attribute

@param string $hitIdentifier
@param string $entityIdentifier
@param string $attribute
@return ItemMetaData
193475
public function setHitEntityAttribute($hitIdentifier, $entityIdentifier, $attribute)
	{
		if(!array_key_exists($entityIdentifier, $this->entityClasses))
		{
			throw MappingException::invalidEntity($this->itemClass, $entityIdentifier);
		}
		$this->entityHitMapping[$entityIdentifier][$hitIdentifier] = $attribute;
		return $this;
	}
76326
private void updateReadonly(EntityType entityType, Attribute attr, Attribute updatedAttr) {
    Map<String, Attribute> readonlyTableAttrs =
        getTableAttributesReadonly(entityType)
            .collect(toLinkedMap(Attribute::getName, Function.identity()));
    if (!readonlyTableAttrs.isEmpty()) {
      dropTableTriggers(entityType);
    }

    if (attr.isReadOnly() && !updatedAttr.isReadOnly()) {
      readonlyTableAttrs.remove(attr.getName());
    } else if (!attr.isReadOnly() && updatedAttr.isReadOnly()) {
      readonlyTableAttrs.put(updatedAttr.getName(), updatedAttr);
    }

    if (!readonlyTableAttrs.isEmpty()) {
      createTableTriggers(entityType, readonlyTableAttrs.values());
    }
  }
1057339
public function offsetSet($offset, $identifier)
    {
        if($identifier instanceof ObjectIdentifierInterface)
        {
            $data = array(
                'identifier' =>  $identifier,
                'class'      =>  $this->getClass($identifier)
            );

            apc_store($this->getNamespace().'-object_'.$offset, $data);
        }

        parent::offsetSet($offset, $identifier);
    }
877777
protected static function setIdentifier($field, $identifier, $defaultIdentifier)
    {
        if ($identifier === null) {
            $identifier = new $defaultIdentifier();
        }

        if (!($identifier instanceof Identifier)) {
            throw new \InvalidArgumentException('$identifier must be instance of Identifier');
        }

        static::${$field} = $identifier;
    }
810649
public function setEntity($entity_name, $entity_alias)
    {
        $this->entityName = $entity_name;
        $this->entityAlias = $entity_alias;
        $this->queryBuilder->from($entity_name, $entity_alias);

        return $this;
    }
1044219
public function setResponseIdentifier($responseIdentifier)
    {
        if (Format::isIdentifier($responseIdentifier, false) === true) {
            $this->responseIdentifier = $responseIdentifier;
        } else {
            $msg = "The 'responseIdentifier' argument must be a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
1091420
private function setObjectForObjectData(string $identifierAttribute, array $data)
    {
        $configurationObject = $this->configuration
            ->getConfigurationObjectForIdentifier($data[$identifierAttribute]);
        $className = $configurationObject->getClassName();
        $fqdnClass = $className->getValue();
        $object = new $fqdnClass();

        foreach ($data as $attribute => $value) {
            if ($attribute === $identifierAttribute) {
                continue;
            }

            $type = $configurationObject->getTypeForAttribute($attribute);
            $this->processDeserializeForType($type, $object, $value);
        }

        return $object;
    }
615042
public function attributeUseMethod(string $attribute, string $setter, string $getter): ObjectInterface
    {
        $this->attributes[$attribute] = new Type\Method($setter, $getter);

        return $this;
    }
104643
public function hydrateEntity($entityName, $identifier) {
    return $this->getDoctrinePackage()->getRepository(
      $this->getDoctrinePackage()->getModule()->getEntityName($entityName)
    )->hydrate($identifier);
  }
633400
public function set($identifier, $value)
    {
        $attributes = $this->getData()->attributes;
        $attributes[$identifier] = $value;

        return $this;
    }
121828
private function createSetter(Entity $entity, $property, $annotation)
    {
        if ($annotation->setter === null) {
            $setter = new PropertySetter($entity, $property);
        } else {
            if ($annotation->setter === true) {
                $methodName = 'set' . ucfirst($property);
            } else {
                $methodName = $annotation->setter;
            }
            $setter = new MethodSetter($entity, $methodName);
        }

        return $setter;
    }
688301
public function setAttributeSet(\Sulu\Bundle\ProductBundle\Entity\AttributeSet $template)
    {
        $this->attributeSet = $template;

        return $this;
    }
218804
public function set_accessible($identifier, $accessible = true) {
        if (is_object($identifier)) {
            $identifier = (int)($identifier->{$this->idfield});
        }
        $this->init_items_access();
        if (is_int($identifier)) {
            $accessible = (int)(bool)$accessible;
            if (!array_key_exists($identifier, $this->accessibleitems) ||
                    $this->accessibleitems[$identifier] != $accessible) {
                $this->accessibleitems[$identifier] = $accessible;
                $this->cachechangedaccessible;
            }
        } else {
            throw new coding_exception('Argument $identifier must be either int or object');
        }
    }
608975
function _addEntityIdentifier(entity, obj) {
    if (entity.constructor === EVT.Entity.Product) {
      obj.product = entity.id;
    } else if (entity.constructor === EVT.Entity.Thng) {
      obj.thng = entity.id;
    } else if (entity.constructor === EVT.Entity.Collection) {
      obj.collection = entity.id;
    }

    return obj;
  }
954465
public void setIdentifierMetadata(IdentifierMetadata identifierMetadata) {
    if (this.identifierMetadata != null) {
      String format = "Class %s has at least two fields, %s and %s, marked with %s annotation. "
          + "Only one field can be marked as an identifier. ";
      String message = String.format(format, entityClass.getName(),
          this.identifierMetadata.getName(), identifierMetadata.getName(),
          Identifier.class.getName());
      throw new EntityManagerException(message);
    }
    this.identifierMetadata = identifierMetadata;
  }
1325114
public function setEntity($entity_name, $entity_alias)
    {
        $this->entity_name  = $entity_name;
        $this->entity_alias = $entity_alias;
        $this->queryBuilder->from($entity_name, $entity_alias);
        return $this;
    }
708734
public function entityIdFrom(IEntitySet $entities) : ObjectFieldBuilder
    {
        return new ObjectFieldBuilder($this->type(new ObjectIdType(new EntityIdOptions($entities))));
    }