@Override
	public int countByG_C_O(long groupId, long commerceAccountId,
		int orderStatus) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_G_C_O;

		Object[] finderArgs = new Object[] {
				groupId, commerceAccountId, 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_C_O_GROUPID_2);

			query.append(_FINDER_COLUMN_G_C_O_COMMERCEACCOUNTID_2);

			query.append(_FINDER_COLUMN_G_C_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(commerceAccountId);

				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();
	}
@ Override public int countByG_C_O ( long groupId , long commerceAccountId , int orderStatus ) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_C_O ; Object [ ] finderArgs = new Object [ ] { groupId , commerceAccountId , 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_C_O_GROUPID_2 ) ; query . append ( _FINDER_COLUMN_G_C_O_COMMERCEACCOUNTID_2 ) ; query . append ( _FINDER_COLUMN_G_C_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 ( commerceAccountId ) ; 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 ( ) ; }
Returns the number of commerce orders where groupId = &#63; and commerceAccountId = &#63; and orderStatus = &#63;.

@param groupId the group ID
@param commerceAccountId the commerce account ID
@param orderStatus the order status
@return the number of matching commerce orders