Deletes the cp rule user segment rel from the database. Also notifies the appropriate model listeners.

@param cpRuleUserSegmentRel the cp rule user segment rel
@return the cp rule user segment rel that was removed
@throws PortalException
169275
public static com.liferay.commerce.product.model.CPRuleUserSegmentRel deleteCPRuleUserSegmentRel(
		com.liferay.commerce.product.model.CPRuleUserSegmentRel cpRuleUserSegmentRel)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCPRuleUserSegmentRel(cpRuleUserSegmentRel);
	}
940963
public function delete($userRoleLinker, $tableName = null)
    {
        $this->checkEntity($userRoleLinker);

        return parent::delete(array('user_id' => $userRoleLinker->getUserId(), 'role_id' => $userRoleLinker->getRoleId()));
    }
512434
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPRuleUserSegmentRel updateCPRuleUserSegmentRel(
		CPRuleUserSegmentRel cpRuleUserSegmentRel) {
		return cpRuleUserSegmentRelPersistence.update(cpRuleUserSegmentRel);
	}
865184
public static com.liferay.commerce.product.model.CPRuleUserSegmentRel createCPRuleUserSegmentRel(
		long CPRuleUserSegmentRelId) {
		return getService().createCPRuleUserSegmentRel(CPRuleUserSegmentRelId);
	}
1265560
public static com.liferay.commerce.product.model.CPTaxCategory deleteCPTaxCategory(
		com.liferay.commerce.product.model.CPTaxCategory cpTaxCategory)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCPTaxCategory(cpTaxCategory);
	}
680138
@Override
	public com.liferay.commerce.product.model.CPOptionCategory deleteCPOptionCategory(
		com.liferay.commerce.product.model.CPOptionCategory cpOptionCategory)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _cpOptionCategoryLocalService.deleteCPOptionCategory(cpOptionCategory);
	}
1002876
private static void addDeleteDirective(
            Element compViewNode, String elementID, IPerson person, Document plf, Element delSet)
            throws PortalException {
        String ID = null;

        try {
            ID = getDLS().getNextStructDirectiveId(person);
        } catch (Exception e) {
            throw new PortalException(
                    "Exception encountered while "
                            + "generating new delete node "
                            + "Id for userId="
                            + person.getID(),
                    e);
        }
        Element delete = plf.createElement(Constants.ELM_DELETE);
        delete.setAttribute(Constants.ATT_TYPE, Constants.ELM_DELETE);
        delete.setAttribute(Constants.ATT_ID, ID);
        delete.setAttributeNS(Constants.NS_URI, Constants.ATT_NAME, elementID);
        delSet.appendChild(delete);

        // now pass through children and add delete directives for those with
        // IDs indicating that they were incorporated
        Element child = (Element) compViewNode.getFirstChild();

        while (child != null) {
            String childID = child.getAttribute("ID");
            if (childID.startsWith(Constants.FRAGMENT_ID_USER_PREFIX))
                addDeleteDirective(child, childID, person, plf, delSet);
            child = (Element) child.getNextSibling();
        }
    }
353325
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPTaxCategory deleteCPTaxCategory(CPTaxCategory cpTaxCategory)
		throws PortalException {
		return cpTaxCategoryPersistence.remove(cpTaxCategory);
	}
1067640
@Override
	public void cacheResult(List<CPRuleUserSegmentRel> cpRuleUserSegmentRels) {
		for (CPRuleUserSegmentRel cpRuleUserSegmentRel : cpRuleUserSegmentRels) {
			if (entityCache.getResult(
						CPRuleUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
						CPRuleUserSegmentRelImpl.class,
						cpRuleUserSegmentRel.getPrimaryKey()) == null) {
				cacheResult(cpRuleUserSegmentRel);
			}
			else {
				cpRuleUserSegmentRel.resetOriginalValues();
			}
		}
	}
415762
@Override
    public void perform() throws PortalException {
        // push the change into the PLF
        if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) {
            // we are dealing with an incorporated node
            ParameterEditManager.removeParmEditDirective(nodeId, name, person);
        } else {
            // node owned by user so add parameter child directly
            Document plf = RDBMDistributedLayoutStore.getPLF(person);
            Element plfNode = plf.getElementById(nodeId);
            removeParameterChild(plfNode, name);
        }
        // push the change into the ILF
        removeParameterChild(ilfNode, name);
    }
564530
@Override
	public com.liferay.commerce.product.model.CPOption deleteCPOption(
		com.liferay.commerce.product.model.CPOption cpOption)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _cpOptionLocalService.deleteCPOption(cpOption);
	}
606790
public void deleteUser(CmsRequestContext context, String username) throws CmsException {

        CmsUser user = readUser(context, username);
        deleteUser(context, user, null);
    }
302579
public function delete()
	{
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        } else {
			$deleted = false;
			if($this->getRequestParameter('uri')){

				$role = $this->getCurrentInstance();

				if(!in_array($role->getUri(), $this->forbidden)){
						//check if no user is using this role:
						$userClass = $this->getClass(GenerisRdf::CLASS_GENERIS_USER);
						$options = array('recursive' => true, 'like' => false);
						$filters = array(GenerisRdf::PROPERTY_USER_ROLES => $role->getUri());
						$users = $userClass->searchInstances($filters, $options);
						if(empty($users)){
							//delete role here:
							$deleted = $this->getClassService()->removeRole($role);
						}else{
							//set message error
							throw new UserErrorException(__('This role is still given to one or more users. Please remove the role to these users first.'));
						}
				}else{
					throw new UserErrorException($role->getLabel() . ' could not be deleted');
				}
			}

			$this->returnJson(array('deleted' => $deleted));
		}
	}
52527
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceCountry deleteCommerceCountry(
		CommerceCountry commerceCountry) throws PortalException {
		return commerceCountryPersistence.remove(commerceCountry);
	}
706360
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceDiscountUserSegmentRel deleteCommerceDiscountUserSegmentRel(
		CommerceDiscountUserSegmentRel commerceDiscountUserSegmentRel) {
		return commerceDiscountUserSegmentRelPersistence.remove(commerceDiscountUserSegmentRel);
	}
468826
public void deleteUser(CmsRequestContext context, CmsUUID userId) throws CmsException {

        CmsUser user = readUser(context, userId);
        deleteUser(context, user, null);
    }
988026
public int deleteProjectPermissionOfAnyUser(DbSession dbSession, long projectId, String permission) {
    return mapper(dbSession).deleteProjectPermissionOfAnyUser(projectId, permission);
  }