Exclude object from result

@param   ChildPersonVersion $personVersion Object to remove from the list of results

@return ChildPersonVersionQuery The current query, for fluid interface
19361
public function prune($personVersion = null)
    {
        if ($personVersion) {
            $this->addCond('pruneCond0', $this->getAliasedColName(PersonVersionTableMap::ID), $personVersion->getId(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(PersonVersionTableMap::VERSION), $personVersion->getVersion(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }
715651
public function setPersonType($PersonType)
    {
        switch ($PersonType) {
            case static::NATURAL_PERSON:
            case static::LEGAL_PERSONALITY:
                $this->PersonType = $PersonType;
            break;

            default:
                throw new \InvalidArgumentException(sprintf('Invalid person type: %s', $PersonType));
        }

        return $this;
    }
32552
protected function getNodeVersionLocksByNodeTranslation(NodeTranslation $nodeTranslation, $isPublicVersion, BaseUser $userToExclude = null)
    {
        $threshold = $this->container->getParameter('kunstmaan_node.lock_threshold');
        /** @var NodeVersionLockRepository $objectRepository */
        $objectRepository = $this->objectManager->getRepository('KunstmaanNodeBundle:NodeVersionLock');

        return $objectRepository->getLocksForNodeTranslation($nodeTranslation, $isPublicVersion, $threshold, $userToExclude);
    }
823023
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerBrandVersionQuery::create()
            ->filterByDealerBrand($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
791049
static function removeById( $attributeId, $version = null )
    {
        if ( $version !== null )
    	   $conds = array( 'contentobject_attribute_id' => $attributeId, 'contentobject_version' => $version  );
    	else
    	    $conds = array( 'contentobject_attribute_id' => $attributeId );

        eZPersistentObject::removeObject( self::definition(), $conds, null );
    }
1045405
public function setPerson(ChildPerson $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aPerson = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildPerson object, it will not be re-added.
        if ($v !== null) {
            $v->addPersonI18n($this);
        }


        return $this;
    }
1179412
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerFolderVersionQuery::create()
            ->filterByDealerFolder($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
1355288
public function withProtocolVersion($version)
    {
        Validator::checkProtocolVersion($version);
        $instance = clone $this;
        $instance->protocol = $version;

        return $instance;
    }
181577
public function removeUser(ChildUser $user)
    {
        if ($this->getUsers()->contains($user)) { $userRole = new ChildUserRole();

            $userRole->setUser($user);
            if ($user->isRolesLoaded()) {
                //remove the back reference if available
                $user->getRoles()->removeObject($this);
            }

            $userRole->setRole($this);
            $this->removeUserRole(clone $userRole);
            $userRole->clear();

            $this->collUsers->remove($this->collUsers->search($user));

            if (null === $this->usersScheduledForDeletion) {
                $this->usersScheduledForDeletion = clone $this->collUsers;
                $this->usersScheduledForDeletion->clear();
            }

            $this->usersScheduledForDeletion->push($user);
        }


        return $this;
    }
399840
public function removeRole(ChildRole $role)
    {
        if ($this->getRoles()->contains($role)) { $userRole = new ChildUserRole();

            $userRole->setRole($role);
            if ($role->isUsersLoaded()) {
                //remove the back reference if available
                $role->getUsers()->removeObject($this);
            }

            $userRole->setUser($this);
            $this->removeUserRole(clone $userRole);
            $userRole->clear();

            $this->collRoles->remove($this->collRoles->search($role));

            if (null === $this->rolesScheduledForDeletion) {
                $this->rolesScheduledForDeletion = clone $this->collRoles;
                $this->rolesScheduledForDeletion->clear();
            }

            $this->rolesScheduledForDeletion->push($role);
        }


        return $this;
    }
691855
public function removePersona(\Haven\PersonaBundle\Entity\Persona $persona) {
        $this->persona->removeElement($persona);
    }
805010
public function setElementVersion(ElementVersion $elementVersion)
    {
        $this->elementVersion = $elementVersion;
        $elementVersion->addMappedField($this);

        return $this;
    }
1173083
public function countDealerContentVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerContentVersionsPartial && !$this->isNew();
        if (null === $this->collDealerContentVersions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerContentVersions) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getDealerContentVersions());
            }

            $query = ChildDealerContentVersionQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByDealerContent($this)
                ->count($con);
        }

        return count($this->collDealerContentVersions);
    }
1362281
public function getSpouseById(\Fisharebest\Webtrees\Individual $person) {
		if ($this->gedcomrecord->getWife() && 
				$person->getXref() === $this->gedcomrecord->getWife()->getXref()) {
			return $this->gedcomrecord->getHusband();
		} else {
			return $this->gedcomrecord->getWife();
		}
	}
780221
protected function createEntityVersionLock(User $user, LockableEntity $entity)
    {
        /** @var EntityVersionLock $lock */
        $lock = $this->objectManager->getRepository('KunstmaanAdminListBundle:EntityVersionLock')->findOneBy([
            'owner' => $user->getUsername(),
            'lockableEntity' => $entity,
        ]);
        if (!$lock) {
            $lock = new EntityVersionLock();
        }
        $lock->setOwner($user->getUsername());
        $lock->setLockableEntity($entity);
        $lock->setCreatedAt(new \DateTime());
        $this->objectManager->persist($lock);
        $this->objectManager->flush();
    }
1116710
public function restoreVersion($documentVersion, $removeExisting)
    {
        $oid = spl_object_hash($documentVersion);
        $history = $this->documentHistory[$oid];
        $version = $this->documentVersion[$oid];
        $document = $this->dm->find(null, $history->getVersionableIdentifier());
        $vm = $this->session->getWorkspace()->getVersionManager();

        $vm->restore($removeExisting, $version);
        $this->dm->refresh($document);
    }
1297206
public function setPersonTeamLinkVersions($v)
    {
        if ($this->person_team_link_versions_unserialized !== $v) {
            $this->person_team_link_versions_unserialized = $v;
            $this->person_team_link_versions = '| ' . implode(' | ', $v) . ' |';
            $this->modifiedColumns[PersonVersionTableMap::PERSON_TEAM_LINK_VERSIONS] = true;
        }


        return $this;
    }