Returns the number of cp specification options where CPOptionCategoryId = &#63;.

@param CPOptionCategoryId the cp option category ID
@return the number of matching cp specification options
967233
@Override
	public int countByCPOptionCategoryId(long CPOptionCategoryId) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_CPOPTIONCATEGORYID;

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

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

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

			query.append(_SQL_COUNT_CPSPECIFICATIONOPTION_WHERE);

			query.append(_FINDER_COLUMN_CPOPTIONCATEGORYID_CPOPTIONCATEGORYID_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(CPOptionCategoryId);

				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();
	}
1084590
public static function findByCategoryId( $categoryId ) {

		$optionTable = CoreTables::getTableName( CoreTables::TABLE_OPTION );

		return self::find()->where( "$optionTable.categoryId=:id", [ ':id' => $categoryId ] )->all();
	}
523325
@Override
	public CPSpecificationOption create(long CPSpecificationOptionId) {
		CPSpecificationOption cpSpecificationOption = new CPSpecificationOptionImpl();

		cpSpecificationOption.setNew(true);
		cpSpecificationOption.setPrimaryKey(CPSpecificationOptionId);

		String uuid = PortalUUIDUtil.generate();

		cpSpecificationOption.setUuid(uuid);

		cpSpecificationOption.setCompanyId(companyProvider.getCompanyId());

		return cpSpecificationOption;
	}
809408
@Override
	public List<CPDefinitionSpecificationOptionValue> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
403052
public static com.liferay.commerce.product.model.CPOptionCategory createCPOptionCategory(
		long CPOptionCategoryId) {
		return getService().createCPOptionCategory(CPOptionCategoryId);
	}
869697
public static com.liferay.commerce.model.CPDAvailabilityEstimate fetchCPDAvailabilityEstimateByCPDefinitionId(
		long cpDefinitionId)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService()
				   .fetchCPDAvailabilityEstimateByCPDefinitionId(cpDefinitionId);
	}
159997
public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult
      getCategoricalStatsResult() {
    if (resultCase_ == 4) {
      return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult)
          result_;
    }
    return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult
        .getDefaultInstance();
  }
169843
private <T> CategoryRegistry<T> getRegistry(final Class<T> pCategory) {
        @SuppressWarnings({"unchecked"})
        CategoryRegistry<T> registry = categoryMap.get(pCategory);
        if (registry == null) {
            throw new IllegalArgumentException("No such category: " + pCategory.getName());
        }
        return registry;
    }
686694
@Override
	@Transactional(enabled = false)
	public CPSpecificationOption createCPSpecificationOption(
		long CPSpecificationOptionId) {
		return cpSpecificationOptionPersistence.create(CPSpecificationOptionId);
	}
1327555
public function getCategoryInsertionPointValueOptions()
    {
        $trees = $this->getCategoryService()->getAllCategoryTreesAsArray();
        
        $valueOptions = array();
        
        foreach ($trees as $rootId => $tree) {
            $valueOptions[$rootId] = array(
                'label'   => 'Label of category ' . $rootId,
                'options' => array()
            );
            foreach ($tree as $node) {
                $category = $node->getNode();
                
                if ($category->getId() == $rootId) {
                    $valueOptions[$rootId]['label'] = $category->getTitle();
                } //else {
                    $valueOptions[$rootId]['options'][$category->getId()] = str_repeat('-', $node->getLevel()) . $category->getTitle();
                //}
            }
        }
        
        return $valueOptions;
    }
822765
@Override
	public List<CPInstance> findByCPDefinitionId(long CPDefinitionId) {
		return findByCPDefinitionId(CPDefinitionId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
1295027
@Override
	public List<CPOption> getCPOptionsByUuidAndCompanyId(String uuid,
		long companyId) {
		return cpOptionPersistence.findByUuid_C(uuid, companyId);
	}
1271117
@Override
	public CPTaxCategory create(long CPTaxCategoryId) {
		CPTaxCategory cpTaxCategory = new CPTaxCategoryImpl();

		cpTaxCategory.setNew(true);
		cpTaxCategory.setPrimaryKey(CPTaxCategoryId);

		cpTaxCategory.setCompanyId(companyProvider.getCompanyId());

		return cpTaxCategory;
	}
1234997
@Override
	public List<CommerceTaxFixedRate> findByCPTaxCategoryId(
		long CPTaxCategoryId) {
		return findByCPTaxCategoryId(CPTaxCategoryId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
175056
public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder
      getCategoricalStatsConfigOrBuilder() {
    if (typeCase_ == 2) {
      return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_;
    }
    return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance();
  }
6544
@Override
	public List<CPOptionCategory> getCPOptionCategoriesByUuidAndCompanyId(
		String uuid, long companyId) {
		return cpOptionCategoryPersistence.findByUuid_C(uuid, companyId);
	}
1131782
@Override
	public void removeByCPOptionCategoryId(long CPOptionCategoryId) {
		for (CPSpecificationOption cpSpecificationOption : findByCPOptionCategoryId(
				CPOptionCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpSpecificationOption);
		}
	}