Returns the number of commerce currencies where groupId = &#63; and primary = &#63; and active = &#63;.

@param groupId the group ID
@param primary the primary
@param active the active
@return the number of matching commerce currencies
6914
@Override
	public int countByG_P_A(long groupId, boolean primary, boolean active) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_G_P_A;

		Object[] finderArgs = new Object[] { groupId, primary, active };

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

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

			query.append(_SQL_COUNT_COMMERCECURRENCY_WHERE);

			query.append(_FINDER_COLUMN_G_P_A_GROUPID_2);

			query.append(_FINDER_COLUMN_G_P_A_PRIMARY_2);

			query.append(_FINDER_COLUMN_G_P_A_ACTIVE_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(groupId);

				qPos.add(primary);

				qPos.add(active);

				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();
	}
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();
	}
1182711
@Override
	public List<CommerceAccount> findByCompanyId(long companyId) {
		return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
			null);
	}
1348938
@Override
	public List<CommerceCurrency> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
1254490
@Override
	public void removeByG_A_C(long groupId, boolean active,
		long commerceCountryId) {
		for (CommerceWarehouse commerceWarehouse : findByG_A_C(groupId, active,
				commerceCountryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceWarehouse);
		}
	}
143342
@Override
	public int countByG_U_O(long groupId, long userId, int orderStatus) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_G_U_O;

		Object[] finderArgs = new Object[] { groupId, userId, orderStatus };

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

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

			query.append(_SQL_COUNT_COMMERCEORDER_WHERE);

			query.append(_FINDER_COLUMN_G_U_O_GROUPID_2);

			query.append(_FINDER_COLUMN_G_U_O_USERID_2);

			query.append(_FINDER_COLUMN_G_U_O_ORDERSTATUS_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(groupId);

				qPos.add(userId);

				qPos.add(orderStatus);

				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();
	}
1337412
@Override
	public int countByG_B_A(long groupId, boolean billingAllowed, boolean active) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_G_B_A;

		Object[] finderArgs = new Object[] { groupId, billingAllowed, active };

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

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

			query.append(_SQL_COUNT_COMMERCECOUNTRY_WHERE);

			query.append(_FINDER_COLUMN_G_B_A_GROUPID_2);

			query.append(_FINDER_COLUMN_G_B_A_BILLINGALLOWED_2);

			query.append(_FINDER_COLUMN_G_B_A_ACTIVE_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(groupId);

				qPos.add(billingAllowed);

				qPos.add(active);

				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();
	}
1152663
@Override
	public com.liferay.commerce.account.service.persistence.CommerceAccountOrganizationRelPK getPrimaryKey() {
		return _commerceAccountOrganizationRel.getPrimaryKey();
	}
67698
@Override
	public void removeByG_B_A(long groupId, boolean billingAllowed,
		boolean active) {
		for (CommerceCountry commerceCountry : findByG_B_A(groupId,
				billingAllowed, active, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
				null)) {
			remove(commerceCountry);
		}
	}
838087
@Override
	public List<CommerceDiscountUsageEntry> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
285570
@Override
	public void removeByG_A(long groupId, boolean active) {
		for (CommerceShippingMethod commerceShippingMethod : findByG_A(
				groupId, active, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceShippingMethod);
		}
	}
933958
@Override
	public List<CommerceOrder> findByG_U_O(long groupId, long userId,
		int orderStatus) {
		return findByG_U_O(groupId, userId, orderStatus, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
586764
@Override
	public List<CommerceShippingMethod> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
875571
@Override
	public List<CommerceCountry> findByG_B_A(long groupId,
		boolean billingAllowed, boolean active) {
		return findByG_B_A(groupId, billingAllowed, active, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
886540
@Override
	public List<CommercePriceEntry> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
19701
@Override
	public List<CommerceAvailabilityEstimate> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
387844
public static List<CommerceAddress> findByG_C_C(long groupId,
		long classNameId, long classPK) {
		return getPersistence().findByG_C_C(groupId, classNameId, classPK);
	}