Adds the cp option value to the database. Also notifies the appropriate model listeners.

@param cpOptionValue the cp option value
@return the cp option value that was added
180167
@Override
	public com.liferay.commerce.product.model.CPOptionValue addCPOptionValue(
		com.liferay.commerce.product.model.CPOptionValue cpOptionValue) {
		return _cpOptionValueLocalService.addCPOptionValue(cpOptionValue);
	}
46182
@Override
	public void cacheResult(CPSpecificationOption cpSpecificationOption) {
		entityCache.putResult(CPSpecificationOptionModelImpl.ENTITY_CACHE_ENABLED,
			CPSpecificationOptionImpl.class,
			cpSpecificationOption.getPrimaryKey(), cpSpecificationOption);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] {
				cpSpecificationOption.getUuid(),
				cpSpecificationOption.getGroupId()
			}, cpSpecificationOption);

		finderCache.putResult(FINDER_PATH_FETCH_BY_G_K,
			new Object[] {
				cpSpecificationOption.getGroupId(),
				cpSpecificationOption.getKey()
			}, cpSpecificationOption);

		cpSpecificationOption.resetOriginalValues();
	}
1285106
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPOption addCPOption(CPOption cpOption) {
		cpOption.setNew(true);

		return cpOptionPersistence.update(cpOption);
	}
1176076
public static com.liferay.commerce.model.CPDAvailabilityEstimate addCPDAvailabilityEstimate(
		com.liferay.commerce.model.CPDAvailabilityEstimate cpdAvailabilityEstimate) {
		return getService().addCPDAvailabilityEstimate(cpdAvailabilityEstimate);
	}
1300749
public void setCPOptionLocalService(
		com.liferay.commerce.product.service.CPOptionLocalService cpOptionLocalService) {
		this.cpOptionLocalService = cpOptionLocalService;
	}
1035329
@Override
	public void cacheResult(CPOption cpOption) {
		entityCache.putResult(CPOptionModelImpl.ENTITY_CACHE_ENABLED,
			CPOptionImpl.class, cpOption.getPrimaryKey(), cpOption);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] { cpOption.getUuid(), cpOption.getGroupId() }, cpOption);

		finderCache.putResult(FINDER_PATH_FETCH_BY_G_K,
			new Object[] { cpOption.getGroupId(), cpOption.getKey() }, cpOption);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_ERC,
			new Object[] {
				cpOption.getCompanyId(), cpOption.getExternalReferenceCode()
			}, cpOption);

		cpOption.resetOriginalValues();
	}
1218631
public static com.liferay.commerce.product.model.CPOption createCPOption(
		long CPOptionId) {
		return getService().createCPOption(CPOptionId);
	}
565235
public void setCPOptionValueLocalService(
		com.liferay.commerce.product.service.CPOptionValueLocalService cpOptionValueLocalService) {
		this.cpOptionValueLocalService = cpOptionValueLocalService;
	}
786909
public static com.liferay.commerce.product.model.CPOptionValue addCPOptionValue(
		long cpOptionId, java.util.Map<java.util.Locale, String> titleMap,
		double priority, String key,
		com.liferay.portal.kernel.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService()
				   .addCPOptionValue(cpOptionId, titleMap, priority, key,
			serviceContext);
	}
1177817
@Override
	public com.liferay.commerce.model.CPDAvailabilityEstimate addCPDAvailabilityEstimate(
		com.liferay.commerce.model.CPDAvailabilityEstimate cpdAvailabilityEstimate) {
		return _cpdAvailabilityEstimateLocalService.addCPDAvailabilityEstimate(cpdAvailabilityEstimate);
	}
901457
@Override
	public void setValueMap(Map<java.util.Locale, String> valueMap) {
		_cpDefinitionSpecificationOptionValue.setValueMap(valueMap);
	}
342109
@Override
	public List<CPOptionValue> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
241080
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPOptionValue updateCPOptionValue(CPOptionValue cpOptionValue) {
		return cpOptionValuePersistence.update(cpOptionValue);
	}
310146
@Override
	public List<CPDefinitionSpecificationOptionValue> findByCPDefinitionId(
		long CPDefinitionId) {
		return findByCPDefinitionId(CPDefinitionId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
501738
private void addComplexChoiceValue(CmsAttributeValueView reference, List<String> choicePath) {

        CmsEntity value = m_entityBackEnd.createEntity(null, getAttributeType().getId());
        CmsEntity parentValue = value;
        for (String attributeChoice : choicePath) {
            CmsType choiceType = m_entityBackEnd.getType(parentValue.getTypeName()).getAttributeType(
                CmsType.CHOICE_ATTRIBUTE_NAME);
            CmsEntity choice = m_entityBackEnd.createEntity(null, choiceType.getId());
            parentValue.addAttributeValue(CmsType.CHOICE_ATTRIBUTE_NAME, choice);
            CmsType choiceOptionType = choiceType.getAttributeType(attributeChoice);
            if (choiceOptionType.isSimpleType()) {
                String choiceValue = m_widgetService.getDefaultAttributeValue(attributeChoice, getSimplePath(0));
                choice.addAttributeValue(attributeChoice, choiceValue);
                break;
            } else {
                CmsEntity choiceValue = m_entityBackEnd.createEntity(null, choiceOptionType.getId());
                choice.addAttributeValue(attributeChoice, choiceValue);
                parentValue = choiceValue;
            }
        }
        insertValueAfterReference(value, reference);
        if (getMaxOccurence() == 1) {
            reference.setCollapsed(true);
        }
    }
1363467
public void addNewChoiceAttributeValue(CmsAttributeValueView reference, List<String> choicePath) {

        CmsValueFocusHandler.getInstance().clearFocus();
        m_widgetService.addChangedOrderPath(getSimplePath(-1));
        if (isChoiceHandler()) {
            addChoiceOption(reference, choicePath);
        } else {
            addComplexChoiceValue(reference, choicePath);
        }
        updateButtonVisisbility();
        CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
        if (handler.isIntitalized()) {
            handler.addChange(m_entity.getId(), m_attributeName, reference.getValueIndex() + 1, ChangeType.choice);
        }
    }
1302789
@Override
  protected Object getOptionValue(Queue<String> argq) {
    return Double.parseDouble(argq.remove());
  }