Creates a new cp definition with the primary key. Does not add the cp definition to the database.

@param CPDefinitionId the primary key for the new cp definition
@return the new cp definition
494217
@Override
	public CPDefinition create(long CPDefinitionId) {
		CPDefinition cpDefinition = new CPDefinitionImpl();

		cpDefinition.setNew(true);
		cpDefinition.setPrimaryKey(CPDefinitionId);

		String uuid = PortalUUIDUtil.generate();

		cpDefinition.setUuid(uuid);

		cpDefinition.setCompanyId(companyProvider.getCompanyId());

		return cpDefinition;
	}
877233
protected SDLDefinition createTypeSystemDefinition(GraphqlParser.TypeSystemDefinitionContext ctx) {
        if (ctx.schemaDefinition() != null) {
            return createSchemaDefinition(ctx.schemaDefinition());
        } else if (ctx.directiveDefinition() != null) {
            return createDirectiveDefinition(ctx.directiveDefinition());
        } else if (ctx.typeDefinition() != null) {
            return createTypeDefinition(ctx.typeDefinition());
        } else if (ctx.typeExtension() != null) {
            return createTypeExtension(ctx.typeExtension());
        } else {
            return assertShouldNeverHappen();
        }
    }
602393
@Override
	public CPDefinitionLink create(long CPDefinitionLinkId) {
		CPDefinitionLink cpDefinitionLink = new CPDefinitionLinkImpl();

		cpDefinitionLink.setNew(true);
		cpDefinitionLink.setPrimaryKey(CPDefinitionLinkId);

		String uuid = PortalUUIDUtil.generate();

		cpDefinitionLink.setUuid(uuid);

		cpDefinitionLink.setCompanyId(companyProvider.getCompanyId());

		return cpDefinitionLink;
	}
1303799
@Override
	public void cacheResult(List<CPDefinition> cpDefinitions) {
		for (CPDefinition cpDefinition : cpDefinitions) {
			if (entityCache.getResult(
						CPDefinitionModelImpl.ENTITY_CACHE_ENABLED,
						CPDefinitionImpl.class, cpDefinition.getPrimaryKey()) == null) {
				cacheResult(cpDefinition);
			}
			else {
				cpDefinition.resetOriginalValues();
			}
		}
	}
23466
@Override
	@Transactional(enabled = false)
	public CPDefinitionInventory createCPDefinitionInventory(
		long CPDefinitionInventoryId) {
		return cpDefinitionInventoryPersistence.create(CPDefinitionInventoryId);
	}
1272413
protected String generateDefinitionId(DeploymentEntity deployment, DefinitionEntity newDefinition, DefinitionEntity latestDefinition) {
    String nextId = idGenerator.getNextId();

    String definitionKey = newDefinition.getKey();
    int definitionVersion = newDefinition.getVersion();

    String definitionId = definitionKey
      + ":" + definitionVersion
      + ":" + nextId;

    // ACT-115: maximum id length is 64 characters
    if (definitionId.length() > 64) {
      definitionId = nextId;
    }
    return definitionId;
  }
501864
@Override
	public void removeByCPDefinitionId(long CPDefinitionId) {
		for (CPDefinitionOptionRel cpDefinitionOptionRel : findByCPDefinitionId(
				CPDefinitionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionOptionRel);
		}
	}
373637
@Override
	public com.liferay.commerce.product.type.grouped.model.CPDefinitionGroupedEntry addCPDefinitionGroupedEntry(
		com.liferay.commerce.product.type.grouped.model.CPDefinitionGroupedEntry cpDefinitionGroupedEntry) {
		return _cpDefinitionGroupedEntryLocalService.addCPDefinitionGroupedEntry(cpDefinitionGroupedEntry);
	}
369782
@Override
	public CPOption create(long CPOptionId) {
		CPOption cpOption = new CPOptionImpl();

		cpOption.setNew(true);
		cpOption.setPrimaryKey(CPOptionId);

		String uuid = PortalUUIDUtil.generate();

		cpOption.setUuid(uuid);

		cpOption.setCompanyId(companyProvider.getCompanyId());

		return cpOption;
	}
548881
@Override
	public List<CPDefinitionOptionRel> findByCPDefinitionId(long CPDefinitionId) {
		return findByCPDefinitionId(CPDefinitionId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
1090934
public static CPDefinitionInventory removeByCPDefinitionId(
		long CPDefinitionId)
		throws com.liferay.commerce.exception.NoSuchCPDefinitionInventoryException {
		return getPersistence().removeByCPDefinitionId(CPDefinitionId);
	}
869697
public static com.liferay.commerce.model.CPDAvailabilityEstimate fetchCPDAvailabilityEstimateByCPDefinitionId(
		long cpDefinitionId)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService()
				   .fetchCPDAvailabilityEstimateByCPDefinitionId(cpDefinitionId);
	}
313841
@Override
	public com.liferay.commerce.product.model.CPFriendlyURLEntry createCPFriendlyURLEntry(
		long CPFriendlyURLEntryId) {
		return _cpFriendlyURLEntryLocalService.createCPFriendlyURLEntry(CPFriendlyURLEntryId);
	}
167742
@Override
	public void removeByCPDefinitionId(long CPDefinitionId) {
		for (CPDefinitionGroupedEntry cpDefinitionGroupedEntry : findByCPDefinitionId(
				CPDefinitionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionGroupedEntry);
		}
	}
181512
public static List<CPDefinitionLink> findByCPD_T(long CPDefinitionId,
		String type) {
		return getPersistence().findByCPD_T(CPDefinitionId, type);
	}
850560
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionLink addCPDefinitionLink(
		CPDefinitionLink cpDefinitionLink) {
		cpDefinitionLink.setNew(true);

		return cpDefinitionLinkPersistence.update(cpDefinitionLink);
	}
930061
@Override
	public CPDefinitionInventory removeByCPDefinitionId(long CPDefinitionId)
		throws NoSuchCPDefinitionInventoryException {
		CPDefinitionInventory cpDefinitionInventory = findByCPDefinitionId(CPDefinitionId);

		return remove(cpDefinitionInventory);
	}