Adds the cp definition virtual setting to the database. Also notifies the appropriate model listeners.

@param cpDefinitionVirtualSetting the cp definition virtual setting
@return the cp definition virtual setting that was added
428460
public static com.liferay.commerce.product.type.virtual.model.CPDefinitionVirtualSetting addCPDefinitionVirtualSetting(
		com.liferay.commerce.product.type.virtual.model.CPDefinitionVirtualSetting cpDefinitionVirtualSetting) {
		return getService()
				   .addCPDefinitionVirtualSetting(cpDefinitionVirtualSetting);
	}
779119
@Override
	public CPDefinitionInventory create(long CPDefinitionInventoryId) {
		CPDefinitionInventory cpDefinitionInventory = new CPDefinitionInventoryImpl();

		cpDefinitionInventory.setNew(true);
		cpDefinitionInventory.setPrimaryKey(CPDefinitionInventoryId);

		String uuid = PortalUUIDUtil.generate();

		cpDefinitionInventory.setUuid(uuid);

		cpDefinitionInventory.setCompanyId(companyProvider.getCompanyId());

		return cpDefinitionInventory;
	}
332680
@Override
	public void cacheResult(
		CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue) {
		entityCache.putResult(CPDefinitionSpecificationOptionValueModelImpl.ENTITY_CACHE_ENABLED,
			CPDefinitionSpecificationOptionValueImpl.class,
			cpDefinitionSpecificationOptionValue.getPrimaryKey(),
			cpDefinitionSpecificationOptionValue);

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

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_CSOVI,
			new Object[] {
				cpDefinitionSpecificationOptionValue.getCPDefinitionId(),
				cpDefinitionSpecificationOptionValue.getCPDefinitionSpecificationOptionValueId()
			}, cpDefinitionSpecificationOptionValue);

		cpDefinitionSpecificationOptionValue.resetOriginalValues();
	}
1228679
public void setCPDefinitionVirtualSettingLocalService(
		com.liferay.commerce.product.type.virtual.service.CPDefinitionVirtualSettingLocalService cpDefinitionVirtualSettingLocalService) {
		this.cpDefinitionVirtualSettingLocalService = cpDefinitionVirtualSettingLocalService;
	}
55102
public void setCPDefinitionLinkLocalService(
		com.liferay.commerce.product.service.CPDefinitionLinkLocalService cpDefinitionLinkLocalService) {
		this.cpDefinitionLinkLocalService = cpDefinitionLinkLocalService;
	}
1336570
public static com.liferay.commerce.model.CPDAvailabilityEstimate updateCPDAvailabilityEstimate(
		com.liferay.commerce.model.CPDAvailabilityEstimate cpdAvailabilityEstimate) {
		return getService()
				   .updateCPDAvailabilityEstimate(cpdAvailabilityEstimate);
	}
1233631
public static com.liferay.commerce.product.type.grouped.model.CPDefinitionGroupedEntry addCPDefinitionGroupedEntry(
		com.liferay.commerce.product.type.grouped.model.CPDefinitionGroupedEntry cpDefinitionGroupedEntry) {
		return getService().addCPDefinitionGroupedEntry(cpDefinitionGroupedEntry);
	}
180167
@Override
	public com.liferay.commerce.product.model.CPOptionValue addCPOptionValue(
		com.liferay.commerce.product.model.CPOptionValue cpOptionValue) {
		return _cpOptionValueLocalService.addCPOptionValue(cpOptionValue);
	}
36844
public void addStoreDefinition(StoreDefinition storeDef) {
        // acquire write lock
        writeLock.lock();

        try {
            // Check if store already exists
            if(this.storeNames.contains(storeDef.getName())) {
                throw new VoldemortException("Store already exists !");
            }

            // Check for backwards compatibility
            StoreDefinitionUtils.validateSchemaAsNeeded(storeDef);

            // Otherwise add to the STORES directory
            StoreDefinitionsMapper mapper = new StoreDefinitionsMapper();
            String storeDefStr = mapper.writeStore(storeDef);
            Versioned<String> versionedValueStr = new Versioned<String>(storeDefStr);
            this.storeDefinitionsStorageEngine.put(storeDef.getName(), versionedValueStr, null);

            // Update the metadata cache
            this.metadataCache.put(storeDef.getName(), new Versioned<Object>(storeDefStr));

            // Re-initialize the store definitions. This is primarily required
            // to re-create the value for key: 'stores.xml'. This is necessary
            // for backwards compatibility.
            initStoreDefinitions(null);

            updateRoutingStrategies(getCluster(), getStoreDefList());
        } finally {
            writeLock.unlock();
        }
    }
194162
public void setCPDefinitionSpecificationOptionValueService(
		com.liferay.commerce.product.service.CPDefinitionSpecificationOptionValueService cpDefinitionSpecificationOptionValueService) {
		this.cpDefinitionSpecificationOptionValueService = cpDefinitionSpecificationOptionValueService;
	}
933572
public void setCPDefinitionOptionValueRelService(
		com.liferay.commerce.product.service.CPDefinitionOptionValueRelService cpDefinitionOptionValueRelService) {
		this.cpDefinitionOptionValueRelService = cpDefinitionOptionValueRelService;
	}
289270
void putDefinitions(InternalQName name, NodeTypeData nodeType)
   {

      // put child node defs
      NodeDefinitionData[] nodeDefs = nodeType.getDeclaredChildNodeDefinitions();
      for (NodeDefinitionData nodeDef : nodeDefs)
      {
         // put required node type defs
         for (InternalQName rnt : nodeDef.getRequiredPrimaryTypes())
         {
            addNodeDefinitionDataInternal(name, nodeDef.getName(), rnt, nodeDef);
            if (LOG.isDebugEnabled())
            {
               LOG.debug("NodeDef added: parent NT: " + name.getAsString() + " child nodeName: "
                  + nodeDef.getName().getAsString() + " childNT: " + rnt.getAsString());
            }
         }

         // put default node definition
         addNodeDefinitionDataInternal(name, nodeDef.getName(), nodeDef);

         if (LOG.isDebugEnabled())
         {
            LOG.debug("Default NodeDef added: parent NT: " + name.getAsString() + " child nodeName: "
               + nodeDef.getName());
         }
      }

      // put prop defs
      PropertyDefinitionData[] propDefs = nodeType.getDeclaredPropertyDefinitions();
      for (PropertyDefinitionData propDef : propDefs)
      {
         addPropertyDefinitionInternal(name, propDef.getName(), propDef.isMultiple(), propDef);

         if (LOG.isDebugEnabled())
         {
            LOG.debug("PropDef added: parent NT: " + name.getAsString() + " child propName: "
               + propDef.getName().getAsString() + " isMultiple: " + propDef.isMultiple());
         }
      }

   }
65058
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionOptionRel addCPDefinitionOptionRel(
		CPDefinitionOptionRel cpDefinitionOptionRel) {
		cpDefinitionOptionRel.setNew(true);

		return cpDefinitionOptionRelPersistence.update(cpDefinitionOptionRel);
	}
1354360
function _gpfDefineEntitiesAdd (entityDefinition) {
    _gpfAssert(entityDefinition._instanceBuilder !== null, "Instance builder must be set");
    _gpfAssert(!_gpfDefineEntitiesFindByConstructor(entityDefinition.getInstanceBuilder()), "Already added");
    _gpfDefinedEntities.push(entityDefinition);
}
1194265
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionOptionRel updateCPDefinitionOptionRel(
		CPDefinitionOptionRel cpDefinitionOptionRel) {
		return cpDefinitionOptionRelPersistence.update(cpDefinitionOptionRel);
	}
377995
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionInventory updateCPDefinitionInventory(
		CPDefinitionInventory cpDefinitionInventory) {
		return cpDefinitionInventoryPersistence.update(cpDefinitionInventory);
	}
842612
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionLink updateCPDefinitionLink(
		CPDefinitionLink cpDefinitionLink) {
		return cpDefinitionLinkPersistence.update(cpDefinitionLink);
	}