Updates the commerce account user rel in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

@param commerceAccountUserRel the commerce account user rel
@return the commerce account user rel that was updated
426771
public static com.liferay.commerce.account.model.CommerceAccountUserRel updateCommerceAccountUserRel(
		com.liferay.commerce.account.model.CommerceAccountUserRel commerceAccountUserRel) {
		return getService().updateCommerceAccountUserRel(commerceAccountUserRel);
	}
1099093
public void setCommerceAccountOrganizationRelService(
		com.liferay.commerce.account.service.CommerceAccountOrganizationRelService commerceAccountOrganizationRelService) {
		this.commerceAccountOrganizationRelService = commerceAccountOrganizationRelService;
	}
931742
@Override
	public List<CommerceAccountUserRel> findByCommerceAccountId(
		long commerceAccountId) {
		return findByCommerceAccountId(commerceAccountId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
1299370
public static com.liferay.commerce.discount.model.CommerceDiscountRel createCommerceDiscountRel(
		long commerceDiscountRelId) {
		return getService().createCommerceDiscountRel(commerceDiscountRelId);
	}
631925
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CommerceTaxFixedRateAddressRel addCommerceTaxFixedRateAddressRel(
		CommerceTaxFixedRateAddressRel commerceTaxFixedRateAddressRel) {
		commerceTaxFixedRateAddressRel.setNew(true);

		return commerceTaxFixedRateAddressRelPersistence.update(commerceTaxFixedRateAddressRel);
	}
4264
public static com.liferay.commerce.user.segment.model.CommerceUserSegmentEntry addCommerceUserSegmentEntry(
		com.liferay.commerce.user.segment.model.CommerceUserSegmentEntry commerceUserSegmentEntry) {
		return getService().addCommerceUserSegmentEntry(commerceUserSegmentEntry);
	}
917876
public void setCommerceDiscountUserSegmentRelLocalService(
		com.liferay.commerce.discount.service.CommerceDiscountUserSegmentRelLocalService commerceDiscountUserSegmentRelLocalService) {
		this.commerceDiscountUserSegmentRelLocalService = commerceDiscountUserSegmentRelLocalService;
	}
203983
@Override
	public com.liferay.commerce.discount.model.CommerceDiscountRel getCommerceDiscountRel(
		long commerceDiscountRelId)
		throws com.liferay.portal.kernel.exception.PortalException {
		return _commerceDiscountRelLocalService.getCommerceDiscountRel(commerceDiscountRelId);
	}
447246
public static com.liferay.commerce.price.list.model.CommercePriceListAccountRel addCommercePriceListAccountRel(
		com.liferay.commerce.price.list.model.CommercePriceListAccountRel commercePriceListAccountRel) {
		return getService()
				   .addCommercePriceListAccountRel(commercePriceListAccountRel);
	}
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();
	}
234306
public static com.liferay.commerce.price.list.model.CommercePriceEntry updateCommercePriceEntry(
		com.liferay.commerce.price.list.model.CommercePriceEntry commercePriceEntry) {
		return getService().updateCommercePriceEntry(commercePriceEntry);
	}
222862
@Override
	public void clearCache() {
		entityCache.clearCache(CommerceAccountUserRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
623796
@Override
	@Transactional(enabled = false)
	public CommerceAccountUserRel createCommerceAccountUserRel(
		CommerceAccountUserRelPK commerceAccountUserRelPK) {
		return commerceAccountUserRelPersistence.create(commerceAccountUserRelPK);
	}
1232453
public static com.liferay.commerce.currency.model.CommerceCurrency updateCommerceCurrency(
		com.liferay.commerce.currency.model.CommerceCurrency commerceCurrency) {
		return getService().updateCommerceCurrency(commerceCurrency);
	}
538510
@Override
	public void removeByCommerceAccountId(long commerceAccountId) {
		for (CommerceAccountOrganizationRel commerceAccountOrganizationRel : findByCommerceAccountId(
				commerceAccountId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceAccountOrganizationRel);
		}
	}
590528
@Override
	public CommerceAccountUserRel create(
		CommerceAccountUserRelPK commerceAccountUserRelPK) {
		CommerceAccountUserRel commerceAccountUserRel = new CommerceAccountUserRelImpl();

		commerceAccountUserRel.setNew(true);
		commerceAccountUserRel.setPrimaryKey(commerceAccountUserRelPK);

		commerceAccountUserRel.setCompanyId(companyProvider.getCompanyId());

		return commerceAccountUserRel;
	}
69082
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CommerceDiscountRel addCommerceDiscountRel(
		CommerceDiscountRel commerceDiscountRel) {
		commerceDiscountRel.setNew(true);

		return commerceDiscountRelPersistence.update(commerceDiscountRel);
	}