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

@param commerceDiscountUserSegmentRels the commerce discount user segment rels
763808
@Override
	public void cacheResult(
		List<CommerceDiscountUserSegmentRel> commerceDiscountUserSegmentRels) {
		for (CommerceDiscountUserSegmentRel commerceDiscountUserSegmentRel : commerceDiscountUserSegmentRels) {
			if (entityCache.getResult(
						CommerceDiscountUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
						CommerceDiscountUserSegmentRelImpl.class,
						commerceDiscountUserSegmentRel.getPrimaryKey()) == null) {
				cacheResult(commerceDiscountUserSegmentRel);
			}
			else {
				commerceDiscountUserSegmentRel.resetOriginalValues();
			}
		}
	}
636974
@Override
	public List<CommerceDiscountUserSegmentRel> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
1235996
public void setCommerceDiscountUsageEntryLocalService(
		com.liferay.commerce.discount.service.CommerceDiscountUsageEntryLocalService commerceDiscountUsageEntryLocalService) {
		this.commerceDiscountUsageEntryLocalService = commerceDiscountUsageEntryLocalService;
	}
1360173
@Indexable(type = IndexableType.DELETE)
	@Override
	public CommerceUserSegmentEntry deleteCommerceUserSegmentEntry(
		CommerceUserSegmentEntry commerceUserSegmentEntry)
		throws PortalException {
		return commerceUserSegmentEntryPersistence.remove(commerceUserSegmentEntry);
	}
1292879
@Override
	public com.liferay.commerce.discount.model.CommerceDiscount createCommerceDiscount(
		long commerceDiscountId) {
		return _commerceDiscountLocalService.createCommerceDiscount(commerceDiscountId);
	}
1008189
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceDiscountUsageEntryImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
547102
public void setCommercePriceListUserSegmentEntryRelLocalService(
		com.liferay.commerce.price.list.service.CommercePriceListUserSegmentEntryRelLocalService commercePriceListUserSegmentEntryRelLocalService) {
		this.commercePriceListUserSegmentEntryRelLocalService = commercePriceListUserSegmentEntryRelLocalService;
	}
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();
	}
633997
public void setCommerceUserSegmentCriterionLocalService(
		com.liferay.commerce.user.segment.service.CommerceUserSegmentCriterionLocalService commerceUserSegmentCriterionLocalService) {
		this.commerceUserSegmentCriterionLocalService = commerceUserSegmentCriterionLocalService;
	}
737345
public void setCommerceDiscountLocalService(
		com.liferay.commerce.discount.service.CommerceDiscountLocalService commerceDiscountLocalService) {
		this.commerceDiscountLocalService = commerceDiscountLocalService;
	}
866255
@Override
	public void clearCache(CommerceDiscount commerceDiscount) {
		entityCache.removeResult(CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED,
			CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

		clearUniqueFindersCache((CommerceDiscountModelImpl)commerceDiscount,
			true);
	}
781784
public static com.liferay.commerce.user.segment.model.CommerceUserSegmentCriterion addCommerceUserSegmentCriterion(
		com.liferay.commerce.user.segment.model.CommerceUserSegmentCriterion commerceUserSegmentCriterion) {
		return getService()
				   .addCommerceUserSegmentCriterion(commerceUserSegmentCriterion);
	}
523972
@Override
	public void cacheResult(
		List<CommerceAccountOrganizationRel> commerceAccountOrganizationRels) {
		for (CommerceAccountOrganizationRel commerceAccountOrganizationRel : commerceAccountOrganizationRels) {
			if (entityCache.getResult(
						CommerceAccountOrganizationRelModelImpl.ENTITY_CACHE_ENABLED,
						CommerceAccountOrganizationRelImpl.class,
						commerceAccountOrganizationRel.getPrimaryKey()) == null) {
				cacheResult(commerceAccountOrganizationRel);
			}
			else {
				commerceAccountOrganizationRel.resetOriginalValues();
			}
		}
	}
573521
@Override
	public void cacheResult(List<CommerceDiscountRel> commerceDiscountRels) {
		for (CommerceDiscountRel commerceDiscountRel : commerceDiscountRels) {
			if (entityCache.getResult(
						CommerceDiscountRelModelImpl.ENTITY_CACHE_ENABLED,
						CommerceDiscountRelImpl.class,
						commerceDiscountRel.getPrimaryKey()) == null) {
				cacheResult(commerceDiscountRel);
			}
			else {
				commerceDiscountRel.resetOriginalValues();
			}
		}
	}
988922
public static com.liferay.commerce.discount.model.CommerceDiscount deleteCommerceDiscount(
		com.liferay.commerce.discount.model.CommerceDiscount commerceDiscount)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCommerceDiscount(commerceDiscount);
	}
341813
public static void addCommerceAccountUserRels(long commerceAccountId,
		long[] userIds, String[] emailAddresses, long[] roleIds,
		com.liferay.portal.kernel.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException {
		getService()
			.addCommerceAccountUserRels(commerceAccountId, userIds,
			emailAddresses, roleIds, serviceContext);
	}
758649
@Override
	public void cacheResult(CommerceAccountUserRel commerceAccountUserRel) {
		entityCache.putResult(CommerceAccountUserRelModelImpl.ENTITY_CACHE_ENABLED,
			CommerceAccountUserRelImpl.class,
			commerceAccountUserRel.getPrimaryKey(), commerceAccountUserRel);

		commerceAccountUserRel.resetOriginalValues();
	}