Interface CPInstanceLocalService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>, com.liferay.portal.kernel.service.PersistedModelLocalService
All Known Implementing Classes:
CPInstanceLocalServiceWrapper

@CTAware @ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface CPInstanceLocalService extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>, com.liferay.portal.kernel.service.PersistedModelLocalService
Provides the local service interface for CPInstance. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
See Also:
Generated:
  • Method Summary

    Modifier and Type
    Method
    Description
    Adds the cp instance to the database.
    addCPInstance(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, Map<Long,List<Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    addOrUpdateCPInstance(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, String json, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    buildCPInstances(long cpDefinitionId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    void
    checkCPInstances(long cpDefinitionId)
     
    void
    checkCPInstancesByDisplayDate(long cpDefinitionId)
     
    createCPInstance(long CPInstanceId)
    Creates a new cp instance with the primary key.
    com.liferay.portal.kernel.model.PersistedModel
     
    deleteCPInstance(long CPInstanceId)
    Deletes the cp instance with the primary key from the database.
    Deletes the cp instance from the database.
    deleteCPInstance(CPInstance cpInstance, boolean makeCopy)
     
    void
    deleteCPInstances(long cpDefinitionId)
     
    com.liferay.portal.kernel.model.PersistedModel
    deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel)
     
    <T> T
    dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    int
    dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    com.liferay.portal.kernel.dao.orm.DynamicQuery
     
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Performs a dynamic query on the database and returns the matching rows.
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
    Performs a dynamic query on the database and returns a range of the matching rows.
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
    Performs a dynamic query on the database and returns an ordered range of the matching rows.
    long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Returns the number of rows matching the dynamic query.
    long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
    Returns the number of rows matching the dynamic query.
    fetchCPInstance(long CPInstanceId)
     
    fetchCPInstance(long cProductId, String cpInstanceUuid)
     
    fetchCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId)
     
    Returns the cp instance matching the UUID and group.
    fetchCProductInstance(long cProductId, String cpInstanceUuid)
     
    fetchDefaultCPInstance(long cpDefinitionId)
     
    com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
     
     
    getCPDefinitionInstances(long cpDefinitionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator)
     
    int
    getCPDefinitionInstancesCount(long cpDefinitionId, int status)
     
    getCPInstance(long CPInstanceId)
    Returns the cp instance with the primary key.
    getCPInstance(long cpDefinitionId, String sku)
     
    getCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId)
     
    Returns the cp instance matching the UUID and group.
    getCPInstances(int start, int end)
    Returns a range of all the cp instances.
    getCPInstances(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator)
     
    getCPInstances(long companyId, String sku)
     
    getCPInstances(String replacementCPInstanceUuid, long replacementCProductId, int status)
     
    Returns all the cp instances matching the UUID and company.
    getCPInstancesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator)
    Returns a range of cp instances matching the UUID and company.
    int
    Returns the number of cp instances.
    int
    getCPInstancesCount(long groupId, int status)
     
    int
    getCPInstancesCount(String cpInstanceUuid)
     
    getCProductInstance(long cProductId, String cpInstanceUuid)
     
    com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance>
     
    com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
    getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
     
    com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
     
     
    Returns the OSGi service identifier.
    com.liferay.portal.kernel.model.PersistedModel
     
    getSKUs(long cpDefinitionId)
     
    void
    inactivateCPDefinitionOptionRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionRelId)
     
    void
    inactivateCPDefinitionOptionValueRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionValueRelId)
     
    void
    inactivateIncompatibleCPInstances(long userId, long cpDefinitionId)
     
    com.liferay.portal.kernel.search.Hits
    search(com.liferay.portal.kernel.search.SearchContext searchContext)
     
    com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
    searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort)
     
    com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
    searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, com.liferay.portal.kernel.search.Sort sort)
     
    com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
    searchCPInstances(long companyId, long[] groupIds, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort)
     
    com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
    searchCPInstances(long companyId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort)
     
    com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
    searchCPInstances(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort)
     
    com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
    searchCPInstances(com.liferay.portal.kernel.search.SearchContext searchContext)
     
    int
    searchCPInstancesCount(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status)
     
    Updates the cp instance in the database or adds it if it does not yet exist.
    updateCPInstance(String externalReferenceCode, long cpInstanceId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    updateExternalReferenceCode(long cpInstanceId, String externalReferenceCode)
     
    updatePricingInfo(long cpInstanceId, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    updateShippingInfo(long cpInstanceId, double width, double height, double depth, double weight, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    updateStatus(long userId, long cpInstanceId, int status)
     
    updateSubscriptionInfo(long cpInstanceId, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles)
     
    <R, E extends Throwable>
    R
    updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance>,R,E> updateUnsafeFunction)
     

    Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService

    fetchPersistedModel, getBasePersistence
  • Method Details

    • addCPInstance

      @Indexable(type=REINDEX) CPInstance addCPInstance(CPInstance cpInstance)
      Adds the cp instance to the database. Also notifies the appropriate model listeners.

      Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      cpInstance - the cp instance
      Returns:
      the cp instance that was added
    • addCPInstance

      @Indexable(type=REINDEX) CPInstance addCPInstance(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, Map<Long,List<Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCPInstance

      CPInstance addOrUpdateCPInstance(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, String json, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • buildCPInstances

      List<CPInstance> buildCPInstances(long cpDefinitionId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkCPInstances

      void checkCPInstances(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkCPInstancesByDisplayDate

      void checkCPInstancesByDisplayDate(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createCPInstance

      @Transactional(enabled=false) CPInstance createCPInstance(long CPInstanceId)
      Creates a new cp instance with the primary key. Does not add the cp instance to the database.
      Parameters:
      CPInstanceId - the primary key for the new cp instance
      Returns:
      the new cp instance
    • createPersistedModel

      com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCPInstance

      @Indexable(type=DELETE) @SystemEvent(type=1) CPInstance deleteCPInstance(CPInstance cpInstance) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the cp instance from the database. Also notifies the appropriate model listeners.

      Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      cpInstance - the cp instance
      Returns:
      the cp instance that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCPInstance

      @Indexable(type=DELETE) @SystemEvent(type=1) CPInstance deleteCPInstance(CPInstance cpInstance, boolean makeCopy) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCPInstance

      @Indexable(type=DELETE) CPInstance deleteCPInstance(long CPInstanceId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the cp instance with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      CPInstanceId - the primary key of the cp instance
      Returns:
      the cp instance that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a cp instance with the primary key could not be found
    • deleteCPInstances

      void deleteCPInstances(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deletePersistedModel

      com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dslQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.commerce.product.model.impl.CPInstanceModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.commerce.product.model.impl.CPInstanceModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchCPInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstance(long CPInstanceId)
    • fetchCPInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstance(long cProductId, String cpInstanceUuid)
    • fetchCPInstanceByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId)
    • fetchCPInstanceByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstanceByUuidAndGroupId(String uuid, long groupId)
      Returns the cp instance matching the UUID and group.
      Parameters:
      uuid - the cp instance's UUID
      groupId - the primary key of the group
      Returns:
      the matching cp instance, or null if a matching cp instance could not be found
    • fetchCProductInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCProductInstance(long cProductId, String cpInstanceUuid)
    • fetchDefaultCPInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchDefaultCPInstance(long cpDefinitionId)
    • getActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getCPDefinitionApprovedCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPDefinitionApprovedCPInstances(long cpDefinitionId)
    • getCPDefinitionInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPDefinitionInstances(long cpDefinitionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator)
    • getCPDefinitionInstancesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCPDefinitionInstancesCount(long cpDefinitionId, int status)
    • getCPInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCPInstance(long CPInstanceId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the cp instance with the primary key.
      Parameters:
      CPInstanceId - the primary key of the cp instance
      Returns:
      the cp instance
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a cp instance with the primary key could not be found
    • getCPInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCPInstance(long cpDefinitionId, String sku) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCPInstanceByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCPInstanceByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCPInstanceByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the cp instance matching the UUID and group.
      Parameters:
      uuid - the cp instance's UUID
      groupId - the primary key of the group
      Returns:
      the matching cp instance
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching cp instance could not be found
    • getCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(int start, int end)
      Returns a range of all the cp instances.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.commerce.product.model.impl.CPInstanceModelImpl.

      Parameters:
      start - the lower bound of the range of cp instances
      end - the upper bound of the range of cp instances (not inclusive)
      Returns:
      the range of cp instances
    • getCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(long companyId, String sku)
    • getCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(String replacementCPInstanceUuid, long replacementCProductId, int status)
    • getCPInstancesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstancesByUuidAndCompanyId(String uuid, long companyId)
      Returns all the cp instances matching the UUID and company.
      Parameters:
      uuid - the UUID of the cp instances
      companyId - the primary key of the company
      Returns:
      the matching cp instances, or an empty list if no matches were found
    • getCPInstancesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstancesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator)
      Returns a range of cp instances matching the UUID and company.
      Parameters:
      uuid - the UUID of the cp instances
      companyId - the primary key of the company
      start - the lower bound of the range of cp instances
      end - the upper bound of the range of cp instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching cp instances, or an empty list if no matches were found
    • getCPInstancesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCPInstancesCount()
      Returns the number of cp instances.
      Returns:
      the number of cp instances
    • getCPInstancesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCPInstancesCount(long groupId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCPInstancesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCPInstancesCount(String cpInstanceUuid)
    • getCProductInstance

      @Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCProductInstance(long cProductId, String cpInstanceUuid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getExportActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getIndexableActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

      String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getSKUs

      @Transactional(propagation=SUPPORTS, readOnly=true) String[] getSKUs(long cpDefinitionId)
    • inactivateCPDefinitionOptionRelCPInstances

      void inactivateCPDefinitionOptionRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionRelId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • inactivateCPDefinitionOptionValueRelCPInstances

      void inactivateCPDefinitionOptionValueRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionValueRelId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • inactivateIncompatibleCPInstances

      void inactivateIncompatibleCPInstances(long userId, long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.Hits search(com.liferay.portal.kernel.search.SearchContext searchContext)
    • searchCPDefinitionInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPDefinitionInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(long companyId, long[] groupIds, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(long companyId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPInstances

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(com.liferay.portal.kernel.search.SearchContext searchContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPInstancesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int searchCPInstancesCount(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPInstance

      @Indexable(type=REINDEX) CPInstance updateCPInstance(CPInstance cpInstance)
      Updates the cp instance in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      cpInstance - the cp instance
      Returns:
      the cp instance that was updated
    • updateCPInstance

      @Indexable(type=REINDEX) CPInstance updateCPInstance(String externalReferenceCode, long cpInstanceId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateExternalReferenceCode

      CPInstance updateExternalReferenceCode(long cpInstanceId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updatePricingInfo

      CPInstance updatePricingInfo(long cpInstanceId, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateShippingInfo

      CPInstance updateShippingInfo(long cpInstanceId, double width, double height, double depth, double weight, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      @Indexable(type=REINDEX) CPInstance updateStatus(long userId, long cpInstanceId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateSubscriptionInfo

      @Indexable(type=REINDEX) CPInstance updateSubscriptionInfo(long cpInstanceId, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCTPersistence

      @Transactional(enabled=false) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance> getCTPersistence()
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>
    • getModelClass

      @Transactional(enabled=false) Class<CPInstance> getModelClass()
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>
    • updateWithUnsafeFunction

      @Transactional(rollbackFor=java.lang.Throwable.class) <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>
      Throws:
      E extends Throwable