Exclude reference.

@param ItemUUID[] $uuids

@return Query
777359
public function excludeUUIDs(array $uuids): self
    {
        $this->filters['excluded_ids'] = Filter::create(
            '_id',
            array_map(function (ItemUUID $uuid) {
                return $uuid->composeUUID();
            }, $uuids),
            Filter::EXCLUDE,
            Filter::TYPE_FIELD
        );

        return $this;
    }
1363751
protected function getQueryBuilderForContainsMethods(string $itemType, int $itemUid) : QueryBuilder
    {
        $queryBuilder = $this->getQueryBuilder();
        return $queryBuilder->count('uid')->from($this->table)
            ->andWhere(
                $queryBuilder->expr()->eq('item_type', $queryBuilder->createNamedParameter($itemType)),
                $queryBuilder->expr()->eq('item_uid', $itemUid)
            );
    }
906812
public function scopeUuid($query, $uuid, $first = true)
    {
        $match = preg_match('/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/', $uuid);

        if (!is_string($uuid) || $match !== 1)
        {
            throw (new ModelNotFoundException)->setModel(get_class($this));
        }
    
        $results = $query->where(config('uuid.default_uuid_column'), $uuid);
    
        return $first ? $results->firstOrFail() : $results;
    }
537299
@Override
	public void removeByUuid(String uuid) {
		for (CommerceNotificationTemplate commerceNotificationTemplate : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceNotificationTemplate);
		}
	}
342287
protected function cleanAccessLevels($uuid, $accessLevels)
    {
        foreach ($accessLevels as $key => $accessLevel) {
            if ($this->hasGroupLoop($accessLevel, $uuid)) {
                unset($accessLevels[$key]);
            }
        }
        
        return $accessLevels;
    }
931986
@Override
	public void removeByUuid(String uuid) {
		for (CommerceOrder commerceOrder : findByUuid(uuid, QueryUtil.ALL_POS,
				QueryUtil.ALL_POS, null)) {
			remove(commerceOrder);
		}
	}
1286745
@Override
	public void removeByUuid(String uuid) {
		for (CPDefinitionInventory cpDefinitionInventory : findByUuid(uuid,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionInventory);
		}
	}
1095819
protected function excludeUnSortable($indexedColumns)
    {
        if (property_exists($this, 'unSortable') && !empty($this->unSortable)) {
            $indexedColumns = array_diff($indexedColumns, $this->unSortable);
        }

        return $indexedColumns;
    }
7342
protected function removeIds(array $itemIds): void
    {
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->delete(Item::class, 'i')
                     ->andWhere('i.id IN (:itemIds)')
                     ->setParameter('itemIds', array_values($itemIds));

        $queryBuilder->getQuery()->execute();
    }
94855
public function getOddItem($uuid)
    {
        $found = null;
        foreach ($this->oddItems as $oddItem) {
            if ($oddItem->getItem()->getUuid() === $uuid) {
                $found = $oddItem;
                break;
            }
        }

        return $found;
    }
1121193
@Override
	public void removeByUuid(String uuid) {
		for (CommercePriceListAccountRel commercePriceListAccountRel : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceListAccountRel);
		}
	}
637218
public function _removeIdxContentContents(array $contentUids)
    {
        if (0 < count($contentUids)) {
            $this->getEntityManager()
                    ->createQuery('DELETE FROM BackBee\ClassContent\Indexes\IdxContentContent i
                        WHERE i.content_uid IN(:content_uids)
                        OR i.subcontent_uid IN(:subcontent_uids)')
                    ->setParameters(array(
                        'content_uids' => $contentUids,
                        'subcontent_uids' => $contentUids, ))
                    ->execute();
        }

        return $this;
    }
872548
public function exclude(DataQuery $query)
    {
        if (($key = array_search('not', $this->modifiers)) !== false) {
            unset($this->modifiers[$key]);
            return $this->apply($query);
        }
        if (is_array($this->value)) {
            return $this->excludeMany($query);
        } else {
            return $this->excludeOne($query);
        }
    }
415301
@Override
	public void removeByUuid(String uuid) {
		for (CommercePriceListUserSegmentEntryRel commercePriceListUserSegmentEntryRel : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceListUserSegmentEntryRel);
		}
	}
811205
protected function excludeItems( array $propItems )
	{
		$excludes = array( 'package-length', 'package-height', 'package-width', 'package-weight' );

		foreach( $propItems as $key => $propItem )
		{
			if( in_array( $propItem->getType(), $excludes ) ) {
				unset( $propItems[$key] );
			}
		}

		return $propItems;
	}
1363625
protected static function unionQueriesToOne($queries)
    {
        if (count($queries) === 0) {
            throw new Exception(Module::t('app', 'Nothing to union'));
        }

        $query = array_reduce(
            $queries,
            function ($query, $item) {
                /**
                 * @var $query Query
                 */
                if ($query === null) {
                    $query = $item;
                } else {
                    $query->union($item);
                }
                return $query;
            }
        );

        return $query;
    }
1245132
public function getSnippetsByUuids(array $uuids, $locale, $loadGhostContent = false)
    {
        $snippets = [];

        foreach ($uuids as $uuid) {
            try {
                $snippet = $this->documentManager->find($uuid, $locale, [
                    'load_ghost_content' => $loadGhostContent,
                ]);
                $snippets[] = $snippet;
            } catch (DocumentNotFoundException $e) {
                // ignore not found items
            }
        }

        return $snippets;
    }