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

@param cpRule the cp rule
@return the cp rule that was removed
@throws PortalException
324549
public static com.liferay.commerce.product.model.CPRule deleteCPRule(
		com.liferay.commerce.product.model.CPRule cpRule)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCPRule(cpRule);
	}
614353
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPDefinitionInventory deleteCPDefinitionInventory(
		CPDefinitionInventory cpDefinitionInventory) {
		return cpDefinitionInventoryPersistence.remove(cpDefinitionInventory);
	}
159312
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPRuleAssetCategoryRel deleteCPRuleAssetCategoryRel(
		CPRuleAssetCategoryRel cpRuleAssetCategoryRel) {
		return cpRuleAssetCategoryRelPersistence.remove(cpRuleAssetCategoryRel);
	}
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);
	}
9687
@Override
	public com.liferay.commerce.discount.model.CommerceDiscountRule deleteCommerceDiscountRule(
		com.liferay.commerce.discount.model.CommerceDiscountRule commerceDiscountRule)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _commerceDiscountRuleLocalService.deleteCommerceDiscountRule(commerceDiscountRule);
	}
558476
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommercePriceEntry deleteCommercePriceEntry(
		CommercePriceEntry commercePriceEntry) throws PortalException {
		return commercePriceEntryPersistence.remove(commercePriceEntry);
	}
591658
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceShippingMethod deleteCommerceShippingMethod(
		CommerceShippingMethod commerceShippingMethod)
		throws PortalException {
		return commerceShippingMethodPersistence.remove(commerceShippingMethod);
	}
1281193
@Override
	public void clearCache(CPRuleAssetCategoryRel cpRuleAssetCategoryRel) {
		entityCache.removeResult(CPRuleAssetCategoryRelModelImpl.ENTITY_CACHE_ENABLED,
			CPRuleAssetCategoryRelImpl.class,
			cpRuleAssetCategoryRel.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
863419
public ApiResponse<RuleEnvelope> deleteRuleWithHttpInfo(String ruleId) throws ApiException {
        com.squareup.okhttp.Call call = deleteRuleValidateBeforeCall(ruleId, null, null);
        Type localVarReturnType = new TypeToken<RuleEnvelope>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
689982
@Override
	public void removeByCPRuleId(long CPRuleId) {
		for (CPRuleAssetCategoryRel cpRuleAssetCategoryRel : findByCPRuleId(
				CPRuleId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpRuleAssetCategoryRel);
		}
	}
1042075
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceDiscountRel deleteCommerceDiscountRel(
		CommerceDiscountRel commerceDiscountRel) throws PortalException {
		return commerceDiscountRelPersistence.remove(commerceDiscountRel);
	}
518887
public final hqlParser.queryRule_return queryRule() throws RecognitionException {
		hqlParser.queryRule_return retval = new hqlParser.queryRule_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		ParserRuleReturnScope selectFrom38 =null;
		ParserRuleReturnScope whereClause39 =null;
		ParserRuleReturnScope groupByClause40 =null;
		ParserRuleReturnScope havingClause41 =null;
		ParserRuleReturnScope orderByClause42 =null;
		ParserRuleReturnScope skipClause43 =null;
		ParserRuleReturnScope takeClause44 =null;


		try {
			// hql.g:233:2: ( selectFrom ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( skipClause )? ( takeClause )? )
			// hql.g:233:4: selectFrom ( whereClause )? ( groupByClause )? ( havingClause )? ( orderByClause )? ( skipClause )? ( takeClause )?
			{
			root_0 = (CommonTree)adaptor.nil();


			pushFollow(FOLLOW_selectFrom_in_queryRule904);
			selectFrom38=selectFrom();
			state._fsp--;

			adaptor.addChild(root_0, selectFrom38.getTree());

			// hql.g:234:3: ( whereClause )?
			int alt9=2;
			int LA9_0 = input.LA(1);
			if ( (LA9_0==WHERE) ) {
				alt9=1;
			}
			switch (alt9) {
				case 1 :
					// hql.g:234:4: whereClause
					{
					pushFollow(FOLLOW_whereClause_in_queryRule909);
					whereClause39=whereClause();
					state._fsp--;

					adaptor.addChild(root_0, whereClause39.getTree());

					}
					break;

			}

			// hql.g:235:3: ( groupByClause )?
			int alt10=2;
			int LA10_0 = input.LA(1);
			if ( (LA10_0==GROUP) ) {
				alt10=1;
			}
			switch (alt10) {
				case 1 :
					// hql.g:235:4: groupByClause
					{
					pushFollow(FOLLOW_groupByClause_in_queryRule916);
					groupByClause40=groupByClause();
					state._fsp--;

					adaptor.addChild(root_0, groupByClause40.getTree());

					}
					break;

			}

			// hql.g:236:3: ( havingClause )?
			int alt11=2;
			int LA11_0 = input.LA(1);
			if ( (LA11_0==HAVING) ) {
				alt11=1;
			}
			switch (alt11) {
				case 1 :
					// hql.g:236:4: havingClause
					{
					pushFollow(FOLLOW_havingClause_in_queryRule923);
					havingClause41=havingClause();
					state._fsp--;

					adaptor.addChild(root_0, havingClause41.getTree());

					}
					break;

			}

			// hql.g:237:3: ( orderByClause )?
			int alt12=2;
			int LA12_0 = input.LA(1);
			if ( (LA12_0==ORDER) ) {
				alt12=1;
			}
			switch (alt12) {
				case 1 :
					// hql.g:237:4: orderByClause
					{
					pushFollow(FOLLOW_orderByClause_in_queryRule930);
					orderByClause42=orderByClause();
					state._fsp--;

					adaptor.addChild(root_0, orderByClause42.getTree());

					}
					break;

			}

			// hql.g:238:3: ( skipClause )?
			int alt13=2;
			int LA13_0 = input.LA(1);
			if ( (LA13_0==SKIP) ) {
				alt13=1;
			}
			switch (alt13) {
				case 1 :
					// hql.g:238:4: skipClause
					{
					pushFollow(FOLLOW_skipClause_in_queryRule937);
					skipClause43=skipClause();
					state._fsp--;

					adaptor.addChild(root_0, skipClause43.getTree());

					}
					break;

			}

			// hql.g:239:3: ( takeClause )?
			int alt14=2;
			int LA14_0 = input.LA(1);
			if ( (LA14_0==TAKE) ) {
				alt14=1;
			}
			switch (alt14) {
				case 1 :
					// hql.g:239:4: takeClause
					{
					pushFollow(FOLLOW_takeClause_in_queryRule944);
					takeClause44=takeClause();
					state._fsp--;

					adaptor.addChild(root_0, takeClause44.getTree());

					}
					break;

			}

			}

			retval.stop = input.LT(-1);

			retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
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);
	}
933435
@Override
	public List<CPRule> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
619976
@Override
	@Transactional(enabled = false)
	public CPRule createCPRule(long CPRuleId) {
		return cpRulePersistence.create(CPRuleId);
	}
1021708
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceRegion deleteCommerceRegion(CommerceRegion commerceRegion)
		throws PortalException {
		return commerceRegionPersistence.remove(commerceRegion);
	}
680278
public static com.liferay.commerce.product.model.CPSpecificationOption deleteCPSpecificationOption(
		com.liferay.commerce.product.model.CPSpecificationOption cpSpecificationOption)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCPSpecificationOption(cpSpecificationOption);
	}