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

@param cpDefinitionLink the cp definition link
@return the cp definition link that was added
194876
public static com.liferay.commerce.product.model.CPDefinitionLink addCPDefinitionLink(
		com.liferay.commerce.product.model.CPDefinitionLink cpDefinitionLink) {
		return getService().addCPDefinitionLink(cpDefinitionLink);
	}
590821
public TableDefinition getLinkExtentTableDef(FieldDefinition linkDef) {
        assert linkDef != null;
        assert linkDef.isLinkType();
        assert m_appDef != null;
        
        TableDefinition tableDef = m_appDef.getTableDef(linkDef.getLinkExtent());
        assert tableDef != null;
        return tableDef;
    }
870673
@Override
	public List<CPDefinition> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
422226
public static com.liferay.commerce.product.model.CPDefinitionLink createCPDefinitionLink(
		long CPDefinitionLinkId) {
		return getService().createCPDefinitionLink(CPDefinitionLinkId);
	}
924513
def AddMemberDefinition(self, member_definition):
    
    self.members.append(member_definition)
    member_definition.family_definition = self
548881
@Override
	public List<CPDefinitionOptionRel> findByCPDefinitionId(long CPDefinitionId) {
		return findByCPDefinitionId(CPDefinitionId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
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());
         }
      }

   }
1234868
private static void addRelationPropertyDefinitions(RelationshipTypeDefinitionImpl type) {

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.SOURCE_ID,
                "Source",
                "Source",
                PropertyType.ID,
                Cardinality.SINGLE,
                Updatability.ONCREATE,
                false,
                true));

        type.addPropertyDefinition(
            createPropDef(
                PropertyIds.TARGET_ID,
                "Target",
                "Target",
                PropertyType.ID,
                Cardinality.SINGLE,
                Updatability.ONCREATE,
                false,
                true));

    }
181512
public static List<CPDefinitionLink> findByCPD_T(long CPDefinitionId,
		String type) {
		return getPersistence().findByCPD_T(CPDefinitionId, type);
	}
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);
	}
902694
private void verifyLink(TableDefinition tableDef, FieldDefinition linkDef) {
        String extent = linkDef.getLinkExtent();
        TableDefinition extentTableDef = getTableDef(extent);
        if (extentTableDef == null) {
            extentTableDef = new TableDefinition();
            extentTableDef.setTableName(extent);
            tableDef.getAppDef().addTable(extentTableDef);
        }
        
        String inverse = linkDef.getLinkInverse();
        FieldDefinition inverseLinkDef = extentTableDef.getFieldDef(inverse);
        if (inverseLinkDef == null) {
            inverseLinkDef = new FieldDefinition(inverse);
            inverseLinkDef.setType(linkDef.getType());
            inverseLinkDef.setLinkInverse(linkDef.getName());
            inverseLinkDef.setLinkExtent(tableDef.getTableName());
            extentTableDef.addFieldDefinition(inverseLinkDef);
        } else {
            Utils.require(inverseLinkDef.getType() == linkDef.getType() &&  // both link or xlink
                          inverseLinkDef.getLinkExtent().equals(tableDef.getTableName()) &&
                          inverseLinkDef.getLinkInverse().equals(linkDef.getName()),
                          "Link '%s' in table '%s' conflicts with inverse field '%s' in table '%s'",
                          linkDef.getName(), tableDef.getTableName(),
                          inverseLinkDef.getName(), extentTableDef.getTableName());
        }
    }
375763
public static CPDefinition toModel(CPDefinitionSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CPDefinition model = new CPDefinitionImpl();

		model.setUuid(soapModel.getUuid());
		model.setExternalReferenceCode(soapModel.getExternalReferenceCode());
		model.setDefaultLanguageId(soapModel.getDefaultLanguageId());
		model.setCPDefinitionId(soapModel.getCPDefinitionId());
		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.setCProductId(soapModel.getCProductId());
		model.setCPTaxCategoryId(soapModel.getCPTaxCategoryId());
		model.setProductTypeName(soapModel.getProductTypeName());
		model.setAvailableIndividually(soapModel.isAvailableIndividually());
		model.setIgnoreSKUCombinations(soapModel.isIgnoreSKUCombinations());
		model.setShippable(soapModel.isShippable());
		model.setFreeShipping(soapModel.isFreeShipping());
		model.setShipSeparately(soapModel.isShipSeparately());
		model.setShippingExtraPrice(soapModel.getShippingExtraPrice());
		model.setWidth(soapModel.getWidth());
		model.setHeight(soapModel.getHeight());
		model.setDepth(soapModel.getDepth());
		model.setWeight(soapModel.getWeight());
		model.setTaxExempt(soapModel.isTaxExempt());
		model.setTelcoOrElectronics(soapModel.isTelcoOrElectronics());
		model.setDDMStructureKey(soapModel.getDDMStructureKey());
		model.setPublished(soapModel.isPublished());
		model.setDisplayDate(soapModel.getDisplayDate());
		model.setExpirationDate(soapModel.getExpirationDate());
		model.setLastPublishDate(soapModel.getLastPublishDate());
		model.setSubscriptionEnabled(soapModel.isSubscriptionEnabled());
		model.setSubscriptionLength(soapModel.getSubscriptionLength());
		model.setSubscriptionType(soapModel.getSubscriptionType());
		model.setSubscriptionTypeSettings(soapModel.getSubscriptionTypeSettings());
		model.setMaxSubscriptionCycles(soapModel.getMaxSubscriptionCycles());
		model.setVersion(soapModel.getVersion());
		model.setStatus(soapModel.getStatus());
		model.setStatusByUserId(soapModel.getStatusByUserId());
		model.setStatusByUserName(soapModel.getStatusByUserName());
		model.setStatusDate(soapModel.getStatusDate());

		return model;
	}
556493
@Override
	public void clearCache(CPDefinitionLink cpDefinitionLink) {
		entityCache.removeResult(CPDefinitionLinkModelImpl.ENTITY_CACHE_ENABLED,
			CPDefinitionLinkImpl.class, cpDefinitionLink.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

		clearUniqueFindersCache((CPDefinitionLinkModelImpl)cpDefinitionLink,
			true);
	}
377995
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDefinitionInventory updateCPDefinitionInventory(
		CPDefinitionInventory cpDefinitionInventory) {
		return cpDefinitionInventoryPersistence.update(cpDefinitionInventory);
	}
1234720
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPDefinitionLink deleteCPDefinitionLink(
		CPDefinitionLink cpDefinitionLink) {
		return cpDefinitionLinkPersistence.remove(cpDefinitionLink);
	}
1090934
public static CPDefinitionInventory removeByCPDefinitionId(
		long CPDefinitionId)
		throws com.liferay.commerce.exception.NoSuchCPDefinitionInventoryException {
		return getPersistence().removeByCPDefinitionId(CPDefinitionId);
	}
160035
public static com.liferay.commerce.product.model.CPAttachmentFileEntry addCPAttachmentFileEntry(
		com.liferay.commerce.product.model.CPAttachmentFileEntry cpAttachmentFileEntry) {
		return getService().addCPAttachmentFileEntry(cpAttachmentFileEntry);
	}