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
971283
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPRule deleteCPRule(CPRule cpRule) throws PortalException {
		return cpRulePersistence.remove(cpRule);
	}
1078236
@Override
	public void clearCache(CPRuleUserSegmentRel cpRuleUserSegmentRel) {
		entityCache.removeResult(CPRuleUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
			CPRuleUserSegmentRelImpl.class, cpRuleUserSegmentRel.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
387918
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceDiscountRule deleteCommerceDiscountRule(
		CommerceDiscountRule commerceDiscountRule) throws PortalException {
		return commerceDiscountRulePersistence.remove(commerceDiscountRule);
	}
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);
	}
708600
@Override
	public CPRuleAssetCategoryRel create(long CPRuleAssetCategoryRelId) {
		CPRuleAssetCategoryRel cpRuleAssetCategoryRel = new CPRuleAssetCategoryRelImpl();

		cpRuleAssetCategoryRel.setNew(true);
		cpRuleAssetCategoryRel.setPrimaryKey(CPRuleAssetCategoryRelId);

		cpRuleAssetCategoryRel.setCompanyId(companyProvider.getCompanyId());

		return cpRuleAssetCategoryRel;
	}
1110214
@Override
	public void cacheResult(CPRule cpRule) {
		entityCache.putResult(CPRuleModelImpl.ENTITY_CACHE_ENABLED,
			CPRuleImpl.class, cpRule.getPrimaryKey(), cpRule);

		cpRule.resetOriginalValues();
	}
142398
@Override
	public com.liferay.commerce.model.CommerceAddress deleteCommerceAddress(
		com.liferay.commerce.model.CommerceAddress commerceAddress)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _commerceAddressLocalService.deleteCommerceAddress(commerceAddress);
	}
251302
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPInstance deleteCPInstance(CPInstance cpInstance)
		throws PortalException {
		return cpInstancePersistence.remove(cpInstance);
	}
1021708
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceRegion deleteCommerceRegion(CommerceRegion commerceRegion)
		throws PortalException {
		return commerceRegionPersistence.remove(commerceRegion);
	}
1196640
@Override
	public CPRule fetchByPrimaryKey(Serializable primaryKey) {
		Serializable serializable = entityCache.getResult(CPRuleModelImpl.ENTITY_CACHE_ENABLED,
				CPRuleImpl.class, primaryKey);

		if (serializable == nullModel) {
			return null;
		}

		CPRule cpRule = (CPRule)serializable;

		if (cpRule == null) {
			Session session = null;

			try {
				session = openSession();

				cpRule = (CPRule)session.get(CPRuleImpl.class, primaryKey);

				if (cpRule != null) {
					cacheResult(cpRule);
				}
				else {
					entityCache.putResult(CPRuleModelImpl.ENTITY_CACHE_ENABLED,
						CPRuleImpl.class, primaryKey, nullModel);
				}
			}
			catch (Exception e) {
				entityCache.removeResult(CPRuleModelImpl.ENTITY_CACHE_ENABLED,
					CPRuleImpl.class, primaryKey);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return cpRule;
	}
1124367
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommercePriceList deleteCommercePriceList(
		CommercePriceList commercePriceList) throws PortalException {
		return commercePriceListPersistence.remove(commercePriceList);
	}
376310
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPAttachmentFileEntry deleteCPAttachmentFileEntry(
		CPAttachmentFileEntry cpAttachmentFileEntry) throws PortalException {
		return cpAttachmentFileEntryPersistence.remove(cpAttachmentFileEntry);
	}
111935
public void setCPRuleLocalService(
		com.liferay.commerce.product.service.CPRuleLocalService cpRuleLocalService) {
		this.cpRuleLocalService = cpRuleLocalService;
	}
583061
@Override
	public com.liferay.commerce.model.CommerceRegion deleteCommerceRegion(
		com.liferay.commerce.model.CommerceRegion commerceRegion)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _commerceRegionLocalService.deleteCommerceRegion(commerceRegion);
	}
52527
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceCountry deleteCommerceCountry(
		CommerceCountry commerceCountry) throws PortalException {
		return commerceCountryPersistence.remove(commerceCountry);
	}
1106508
public static com.liferay.commerce.product.model.CPDefinitionOptionRel deleteCPDefinitionOptionRel(
		com.liferay.commerce.product.model.CPDefinitionOptionRel cpDefinitionOptionRel)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCPDefinitionOptionRel(cpDefinitionOptionRel);
	}
369405
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPDefinitionVirtualSetting deleteCPDefinitionVirtualSetting(
		CPDefinitionVirtualSetting cpDefinitionVirtualSetting) {
		return cpDefinitionVirtualSettingPersistence.remove(cpDefinitionVirtualSetting);
	}