Returns all the cp rule asset category rels where assetCategoryId = &#63;.

@param assetCategoryId the asset category ID
@return the matching cp rule asset category rels
188145
@Override
	public List<CPRuleAssetCategoryRel> findByAssetCategoryId(
		long assetCategoryId) {
		return findByAssetCategoryId(assetCategoryId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
144235
public static List<CPOptionCategory> findByUuid_C(String uuid,
		long companyId) {
		return getPersistence().findByUuid_C(uuid, companyId);
	}
1297621
@Override
	@Transactional(enabled = false)
	public CPTaxCategory createCPTaxCategory(long CPTaxCategoryId) {
		return cpTaxCategoryPersistence.create(CPTaxCategoryId);
	}
504663
public function getCategory(int $categoryId, int $siteId) : array
    {
        Assert::that($categoryId)->greaterThan(0, 'The $categoryId has to be positive');
        Assert::that($siteId)->greaterThan(0, 'The $siteId has to be positive');

        return (array)$this->master->doRequest(
            'GET',
            sprintf('/admin/WEBAPI/Endpoints/v1_0/ProductService/{KEY}/Category/%d/%d', $categoryId, $siteId)
        );
    }
99732
public String getClassificationId(ScopCategory category) {
		if(classificationId == null || classificationId.isEmpty()) {
			return null;
		}

		int numParts = 0;
		switch(category) {
		case Family:      numParts++;
		case Superfamily: numParts++;
		case Fold:        numParts++;
		case Class:       numParts++; break;
		default:
			throw new IllegalArgumentException("Only Class, Fold, Superfamily, and Family are supported.");
		}

		int endChar = -1;
		for(int i = 0;i<numParts-1;i++) {
			endChar = classificationId.indexOf('.', endChar+1);
			if(endChar<0) {
				// Not enough items in the classification for this category
				return null;
			}
		}
		endChar = classificationId.indexOf('.', endChar+1);
		if(endChar<0) {
			// category goes to the end
			return classificationId;
		}
		else {
			return classificationId.substring(0, endChar);
		}

	}
834578
@Override
	public List<CPRuleUserSegmentRel> findByCPRuleId(long CPRuleId) {
		return findByCPRuleId(CPRuleId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
			null);
	}
1106292
private function checkAlwaysFalseCategories()
    {
        $filtered = [];
        foreach ($this->categories as $category) {
            if ($category->formula === false) {
                if (null !== $category->examples) {
                    throw new \RuntimeException("The category '{$category->id}' should never occur, but it has examples (so for CLDR it may occur!)");
                }
            } else {
                $filtered[] = $category;
            }
        }
        $this->categories = $filtered;
    }
570478
public static EntityGetOperation<AssetDeliveryPolicyInfo> get(String assetDeliveryPolicyId) {
        return new DefaultGetOperation<AssetDeliveryPolicyInfo>(ENTITY_SET, assetDeliveryPolicyId,
                AssetDeliveryPolicyInfo.class);
    }
175701
public function getCategoryProductWithFilter($categoryId, $filters = [])
    {
        $prefix = env('DB_TABLE_PREFIX', 'avored_');

        $propetryInnerJoinFlag = false;
        $attributeInnerJoinFlag = false;

        $sql = "Select p.id
                FROM {$prefix}products as p 
                INNER JOIN {$prefix}category_product as cp on p.id = cp.product_id ";

        foreach ($filters as $type => $filterArray) {
            if ('property' == $type) {
                foreach ($filterArray as $identifier => $value) {
                    $property = Property::whereIdentifier($identifier)->first();

                    if ('INTEGER' == $property->data_type) {
                        if (false === $propetryInnerJoinFlag) {
                            $propetryInnerJoinFlag = true;
                            $sql .= "INNER JOIN {$prefix}product_property_integer_values as ppiv ON p.id = ppiv.product_id ";
                        }
                    }
                }
            }

            if ('attribute' == $type) {
                foreach ($filterArray as $identifier => $value) {
                    $attribute = Attribute::whereIdentifier($identifier)->first();
                    if (false === $attributeInnerJoinFlag) {
                        $attributeInnerJoinFlag = true;
                        $sql .= "INNER JOIN {$prefix}product_attribute_integer_values as paiv ON p.id = paiv.product_id ";
                    }
                }
            }
        }

        $sql .= "WHERE p.type != 'VARIABLE_PRODUCT' AND  cp.category_id = ? ";

        foreach ($filters as $type => $filterArray) {
            if ('property' == $type) {
                foreach ($filterArray as $identifier => $value) {
                    $property = Property::whereIdentifier($identifier)->first();

                    if ('INTEGER' == $property->data_type) {
                        $sql .= "AND ppiv.property_id = {$property->id} AND ppiv.value={$value} ";
                    }
                }
            }
        }

        foreach ($filters as $type => $filterArray) {
            if ('attribute' == $type) {
                foreach ($filterArray as $identifier => $value) {
                    $attribute = Attribute::whereIdentifier($identifier)->first();
                    $sql .= "AND paiv.attribute_id = {$attribute->id} AND paiv.value={$value} ";
                }
            }
        }

        $products = DB::select($sql, [$categoryId]);
        $collect = Collection::make([]);

        foreach ($products as $productArray) {
            $product = Product::find($productArray->id);

            if ($product->type == 'VARIABLE_PRODUCT') {
                $collect->push(($product->getVariableMainProduct()));
            } else {
                $collect->push(Product::find($productArray->id));
            }
        }

        return $collect;
    }
580625
public Map<Integer, Long> getIdMappingCategories() {
        Map<Integer, Long> idMapping = new HashMap<Integer, Long>();

        Session session = WikiHibernateUtil.getSessionFactory(this.dbConfig).getCurrentSession();
        session.beginTransaction();
        Iterator results = session.createQuery("select cat.id, cat.pageId from Category as cat").list().iterator();
        while (results.hasNext()) {
            Object[] row = (Object[]) results.next();
            // put (pageID, id)
            idMapping.put((Integer) row[1], (Long) row[0]);
        }
        session.getTransaction().commit();
        return idMapping;
    }
738701
protected function getSolrRootlineForCategoryId($categoryId)
    {
        $categoryIdRootline = $this->buildCategoryIdRootline($categoryId);
        $solrRootline = $this->buildSolrHierarchyFromIdRootline($categoryIdRootline);

        return $solrRootline;
    }
1296835
public static com.liferay.commerce.product.model.CPTaxCategory createCPTaxCategory(
		long CPTaxCategoryId) {
		return getService().createCPTaxCategory(CPTaxCategoryId);
	}
1131782
@Override
	public void removeByCPOptionCategoryId(long CPOptionCategoryId) {
		for (CPSpecificationOption cpSpecificationOption : findByCPOptionCategoryId(
				CPOptionCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpSpecificationOption);
		}
	}
548881
@Override
	public List<CPDefinitionOptionRel> findByCPDefinitionId(long CPDefinitionId) {
		return findByCPDefinitionId(CPDefinitionId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
29053
public static GetCategoryResult get_category(String access_token){
		HttpUriRequest httpUriRequest = RequestBuilder.get()
				.setUri(BASE_URI + "/wxa/get_category")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,GetCategoryResult.class);
	}
1234997
@Override
	public List<CommerceTaxFixedRate> findByCPTaxCategoryId(
		long CPTaxCategoryId) {
		return findByCPTaxCategoryId(CPTaxCategoryId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
401647
protected Set<Integer> __getCategories() {

        // TODO this should be replaced with the buffered category iterator, as it might produce an HeapSpace Overflow, if there are too many categories.
        Session session = this.__getHibernateSession();
        session.beginTransaction();
        List<Integer> idList = session.createQuery(
                "select cat.pageId from Category as cat", Integer.class).list();
        Set<Integer> categorySet = new HashSet<Integer>(idList);
        session.getTransaction().commit();

        return categorySet;
    }