Caches the commerce discount user segment rel in the entity cache if it is enabled.

@param commerceDiscountUserSegmentRel the commerce discount user segment rel
498195
@Override
	public void cacheResult(
		CommerceDiscountUserSegmentRel commerceDiscountUserSegmentRel) {
		entityCache.putResult(CommerceDiscountUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
			CommerceDiscountUserSegmentRelImpl.class,
			commerceDiscountUserSegmentRel.getPrimaryKey(),
			commerceDiscountUserSegmentRel);

		commerceDiscountUserSegmentRel.resetOriginalValues();
	}
868498
public void setCommerceUserSegmentEntryLocalService(
		com.liferay.commerce.user.segment.service.CommerceUserSegmentEntryLocalService commerceUserSegmentEntryLocalService) {
		this.commerceUserSegmentEntryLocalService = commerceUserSegmentEntryLocalService;
	}
417766
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceDiscountUserSegmentRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
1120270
@Override
	public void clearCache() {
		entityCache.clearCache(CommercePriceListUserSegmentEntryRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
213236
@Override
	public void cacheResult(CPRuleUserSegmentRel cpRuleUserSegmentRel) {
		entityCache.putResult(CPRuleUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
			CPRuleUserSegmentRelImpl.class,
			cpRuleUserSegmentRel.getPrimaryKey(), cpRuleUserSegmentRel);

		cpRuleUserSegmentRel.resetOriginalValues();
	}
535169
@Override
	public com.liferay.commerce.account.model.CommerceAccountUserRel addCommerceAccountUserRel(
		com.liferay.commerce.account.model.CommerceAccountUserRel commerceAccountUserRel) {
		return _commerceAccountUserRelLocalService.addCommerceAccountUserRel(commerceAccountUserRel);
	}
758649
@Override
	public void cacheResult(CommerceAccountUserRel commerceAccountUserRel) {
		entityCache.putResult(CommerceAccountUserRelModelImpl.ENTITY_CACHE_ENABLED,
			CommerceAccountUserRelImpl.class,
			commerceAccountUserRel.getPrimaryKey(), commerceAccountUserRel);

		commerceAccountUserRel.resetOriginalValues();
	}
636974
@Override
	public List<CommerceDiscountUserSegmentRel> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
741288
@Override
	public int countByCommerceAccountUserId(long commerceAccountUserId) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_COMMERCEACCOUNTUSERID;

		Object[] finderArgs = new Object[] { commerceAccountUserId };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(2);

			query.append(_SQL_COUNT_COMMERCEACCOUNTUSERREL_WHERE);

			query.append(_FINDER_COLUMN_COMMERCEACCOUNTUSERID_COMMERCEACCOUNTUSERID_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(commerceAccountUserId);

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

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

		return count.intValue();
	}
547102
public void setCommercePriceListUserSegmentEntryRelLocalService(
		com.liferay.commerce.price.list.service.CommercePriceListUserSegmentEntryRelLocalService commercePriceListUserSegmentEntryRelLocalService) {
		this.commercePriceListUserSegmentEntryRelLocalService = commercePriceListUserSegmentEntryRelLocalService;
	}
366050
@Override
	public List<CommerceNotificationTemplateUserSegmentRel> findByCommerceUserSegmentEntryId(
		long commerceUserSegmentEntryId) {
		return findByCommerceUserSegmentEntryId(commerceUserSegmentEntryId,
			QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
1212399
@Override
	public com.liferay.commerce.discount.model.CommerceDiscountUsageEntry addCommerceDiscountUsageEntry(
		com.liferay.commerce.discount.model.CommerceDiscountUsageEntry commerceDiscountUsageEntry) {
		return _commerceDiscountUsageEntryLocalService.addCommerceDiscountUsageEntry(commerceDiscountUsageEntry);
	}
439862
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceDiscountRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
170961
@Override
	public List<CPRuleUserSegmentRel> findByCommerceUserSegmentEntryId(
		long commerceUserSegmentEntryId) {
		return findByCommerceUserSegmentEntryId(commerceUserSegmentEntryId,
			QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
706360
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceDiscountUserSegmentRel deleteCommerceDiscountUserSegmentRel(
		CommerceDiscountUserSegmentRel commerceDiscountUserSegmentRel) {
		return commerceDiscountUserSegmentRelPersistence.remove(commerceDiscountUserSegmentRel);
	}
519855
public static com.liferay.commerce.discount.model.CommerceDiscountRel updateCommerceDiscountRel(
		com.liferay.commerce.discount.model.CommerceDiscountRel commerceDiscountRel) {
		return getService().updateCommerceDiscountRel(commerceDiscountRel);
	}
346906
public void setCommerceDiscountRelService(
		com.liferay.commerce.discount.service.CommerceDiscountRelService commerceDiscountRelService) {
		this.commerceDiscountRelService = commerceDiscountRelService;
	}