Updates the cp option category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

@param cpOptionCategory the cp option category
@return the cp option category that was updated
4015
@Override
	public com.liferay.commerce.product.model.CPOptionCategory updateCPOptionCategory(
		com.liferay.commerce.product.model.CPOptionCategory cpOptionCategory) {
		return _cpOptionCategoryLocalService.updateCPOptionCategory(cpOptionCategory);
	}
786021
@Override
	@Transactional(enabled = false)
	public CPOption createCPOption(long CPOptionId) {
		return cpOptionPersistence.create(CPOptionId);
	}
330811
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPOption updateCPOption(CPOption cpOption) {
		return cpOptionPersistence.update(cpOption);
	}
1192283
public static CPOptionCategory toModel(CPOptionCategorySoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CPOptionCategory model = new CPOptionCategoryImpl();

		model.setUuid(soapModel.getUuid());
		model.setCPOptionCategoryId(soapModel.getCPOptionCategoryId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setTitle(soapModel.getTitle());
		model.setDescription(soapModel.getDescription());
		model.setPriority(soapModel.getPriority());
		model.setKey(soapModel.getKey());
		model.setLastPublishDate(soapModel.getLastPublishDate());

		return model;
	}
1007292
@Override
	public com.liferay.commerce.product.model.CPDefinition updateCPDefinition(
		com.liferay.commerce.product.model.CPDefinition cpDefinition) {
		return _cpDefinitionLocalService.updateCPDefinition(cpDefinition);
	}
842411
@Override
	public List<CPOptionCategory> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
856026
@Override
	public CPOptionCategory removeByG_K(long groupId, String key)
		throws NoSuchCPOptionCategoryException {
		CPOptionCategory cpOptionCategory = findByG_K(groupId, key);

		return remove(cpOptionCategory);
	}
690638
private EventComponentChangeDto setChangeCategory(String changeCategory) {
    this.category = ChangeCategory.fromDbValue(changeCategory)
      .orElseThrow(() -> new IllegalArgumentException("Unsupported changeCategory DB value: " + changeCategory));
    return this;
  }
631907
@Override
	public com.liferay.commerce.product.model.CPOptionCategory createCPOptionCategory(
		long CPOptionCategoryId) {
		return _cpOptionCategoryLocalService.createCPOptionCategory(CPOptionCategoryId);
	}
400735
public static com.liferay.commerce.product.model.CPTaxCategory updateCPTaxCategory(
		com.liferay.commerce.product.model.CPTaxCategory cpTaxCategory) {
		return getService().updateCPTaxCategory(cpTaxCategory);
	}
238609
public static com.liferay.commerce.model.CPDefinitionInventory updateCPDefinitionInventory(
		com.liferay.commerce.model.CPDefinitionInventory cpDefinitionInventory) {
		return getService().updateCPDefinitionInventory(cpDefinitionInventory);
	}
88362
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPSpecificationOption addCPSpecificationOption(
		CPSpecificationOption cpSpecificationOption) {
		cpSpecificationOption.setNew(true);

		return cpSpecificationOptionPersistence.update(cpSpecificationOption);
	}
209745
public static com.liferay.commerce.product.model.CProduct updateCProduct(
		com.liferay.commerce.product.model.CProduct cProduct) {
		return getService().updateCProduct(cProduct);
	}
919140
private void addChoiceOption(CmsAttributeValueView reference, List<String> choicePath) {

        String attributeChoice = choicePath.get(0);
        CmsType optionType = getAttributeType().getAttributeType(attributeChoice);
        int valueIndex = reference.getValueIndex() + 1;
        CmsEntity choiceEntity = m_entityBackEnd.createEntity(null, getAttributeType().getId());
        CmsAttributeValueView valueWidget = reference;
        if (reference.hasValue()) {
            valueWidget = new CmsAttributeValueView(
                this,
                m_widgetService.getAttributeLabel(attributeChoice),
                m_widgetService.getAttributeHelp(attributeChoice));
            if (optionType.isSimpleType() && m_widgetService.isDisplaySingleLine(attributeChoice)) {
                valueWidget.setCompactMode(CmsAttributeValueView.COMPACT_MODE_SINGLE_LINE);
            }
        }

        List<CmsChoiceMenuEntryBean> menuEntries = CmsRenderer.getChoiceEntries(getAttributeType(), true);
        for (CmsChoiceMenuEntryBean menuEntry : menuEntries) {
            valueWidget.addChoice(m_widgetService, menuEntry);
        }

        m_entity.insertAttributeValue(m_attributeName, choiceEntity, valueIndex);
        ((FlowPanel)reference.getParent()).insert(valueWidget, valueIndex);
        insertHandlers(valueWidget.getValueIndex());

        if (optionType.isSimpleType()) {
            String defaultValue = m_widgetService.getDefaultAttributeValue(attributeChoice, getSimplePath(valueIndex));
            I_CmsFormEditWidget widget = m_widgetService.getAttributeFormWidget(attributeChoice);
            choiceEntity.addAttributeValue(attributeChoice, defaultValue);
            valueWidget.setValueWidget(widget, defaultValue, defaultValue, true);
        } else {
            CmsEntity value = m_entityBackEnd.createEntity(null, optionType.getId());
            choiceEntity.addAttributeValue(attributeChoice, value);
            List<String> remainingAttributeNames = tail(choicePath);
            createNestedEntitiesForChoicePath(value, remainingAttributeNames);
            I_CmsEntityRenderer renderer = m_widgetService.getRendererForAttribute(attributeChoice, optionType);
            valueWidget.setValueEntity(renderer, value);
        }
        updateButtonVisisbility();

    }
850560
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionLink addCPDefinitionLink(
		CPDefinitionLink cpDefinitionLink) {
		cpDefinitionLink.setNew(true);

		return cpDefinitionLinkPersistence.update(cpDefinitionLink);
	}
174493
def update_catagory(netid, category_code, status):
    
    url = "{0}/category".format(url_version())
    body = {
        "categoryCode": category_code,
        "status": status,
        "categoryList": [{"netid": netid}]
    }

    response = post_resource(url, json.dumps(body))
    return json.loads(response)
910097
public void addCategory(String category) throws JSONException {
		logger.debug("Adding category [" + category + "]");
		put("category", category, this.apsDictionary, true);
	}