Interface CommerceDiscountLocalService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService
All Known Implementing Classes:
CommerceDiscountLocalServiceWrapper

@ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface CommerceDiscountLocalService extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService
Provides the local service interface for CommerceDiscount. 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 Details

    • addCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(CommerceDiscount commerceDiscount)
      Adds the commerce discount to the database. Also notifies the appropriate model listeners.

      Important: Inspect CommerceDiscountLocalServiceImpl 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:
      commerceDiscount - the commerce discount
      Returns:
      the commerce discount that was added
    • addCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(long userId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(long userId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCommerceDiscount

      @Deprecated @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(long userId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, String externalReferenceCode, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCommerceDiscount

      @Deprecated @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(long userId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, int limitationTimesPerAccount, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, String externalReferenceCode, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      As of Cavanaugh (7.4.x), replaced by #addCommerceDiscount(String, long, String, String, boolean, String, boolean, BigDecimal, String, BigDecimal, BigDecimal, BigDecimal, BigDecimal, BigDecimal, String, int, int, boolean, boolean, int, int, int, int, int, int, int, int, int, int, boolean, ServiceContext)
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(String externalReferenceCode, long userId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addCommerceDiscount(String externalReferenceCode, long userId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, int limitationTimesPerAccount, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addOrUpdateCommerceDiscount(String externalReferenceCode, long userId, long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addOrUpdateCommerceDiscount(String externalReferenceCode, long userId, long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount addOrUpdateCommerceDiscount(String externalReferenceCode, long userId, long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, int limitationTimesPerAccount, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkCommerceDiscounts

      void checkCommerceDiscounts() throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createCommerceDiscount

      @Transactional(enabled=false) CommerceDiscount createCommerceDiscount(long commerceDiscountId)
      Creates a new commerce discount with the primary key. Does not add the commerce discount to the database.
      Parameters:
      commerceDiscountId - the primary key for the new commerce discount
      Returns:
      the new commerce discount
    • 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
    • deleteCommerceDiscount

      @Indexable(type=DELETE) @SystemEvent(type=1) CommerceDiscount deleteCommerceDiscount(CommerceDiscount commerceDiscount) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the commerce discount from the database. Also notifies the appropriate model listeners.

      Important: Inspect CommerceDiscountLocalServiceImpl 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:
      commerceDiscount - the commerce discount
      Returns:
      the commerce discount that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCommerceDiscount

      @Indexable(type=DELETE) CommerceDiscount deleteCommerceDiscount(long commerceDiscountId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the commerce discount with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect CommerceDiscountLocalServiceImpl 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:
      commerceDiscountId - the primary key of the commerce discount
      Returns:
      the commerce discount that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a commerce discount with the primary key could not be found
    • deleteCommerceDiscounts

      void deleteCommerceDiscounts(long companyId) 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.discount.model.impl.CommerceDiscountModelImpl.

      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.discount.model.impl.CommerceDiscountModelImpl.

      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
    • fetchCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount fetchCommerceDiscount(long commerceDiscountId)
    • fetchCommerceDiscountByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount fetchCommerceDiscountByExternalReferenceCode(String externalReferenceCode, long companyId)
    • fetchCommerceDiscountByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount fetchCommerceDiscountByUuidAndCompanyId(String uuid, long companyId)
      Returns the commerce discount with the matching UUID and company.
      Parameters:
      uuid - the commerce discount's UUID
      companyId - the primary key of the company
      Returns:
      the matching commerce discount, or null if a matching commerce discount could not be found
    • fetchDefaultCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount fetchDefaultCommerceDiscount(long commerceChannelAccountEntryRelId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountAndChannelAndOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountAndChannelAndOrderTypeCommerceDiscounts(long commerceAccountId, long commerceChannelId, long commerceOrderTypeId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountAndChannelAndOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountAndChannelAndOrderTypeCommerceDiscounts(long commerceAccountId, long commerceChannelId, long commerceOrderTypeId, String target)
    • getAccountAndChannelCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountAndChannelCommerceDiscounts(long commerceAccountId, long commerceChannelId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountAndChannelCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountAndChannelCommerceDiscounts(long commerceAccountId, long commerceChannelId, String target)
    • getAccountAndOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountAndOrderTypeCommerceDiscounts(long commerceAccountId, long commerceOrderTypeId, String target)
    • getAccountCommerceAndOrderTypeDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountCommerceAndOrderTypeDiscounts(long commerceAccountId, long commerceOrderTypeId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountCommerceDiscounts(long commerceAccountId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountCommerceDiscounts(long commerceAccountId, String target)
    • getAccountGroupAndChannelAndOrderTypeCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupAndChannelAndOrderTypeCommerceDiscount(long[] commerceAccountGroupIds, long commerceChannelId, long commerceOrderTypeId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountGroupAndChannelAndOrderTypeCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupAndChannelAndOrderTypeCommerceDiscount(long[] commerceAccountGroupIds, long commerceChannelId, long commerceOrderTypeId, String target)
    • getAccountGroupAndChannelCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupAndChannelCommerceDiscount(long[] commerceAccountGroupIds, long commerceChannelId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountGroupAndChannelCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupAndChannelCommerceDiscount(long[] commerceAccountGroupIds, long commerceChannelId, String target)
    • getAccountGroupAndOrderTypeCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupAndOrderTypeCommerceDiscount(long[] commerceAccountGroupIds, long commerceOrderTypeId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountGroupAndOrderTypeCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupAndOrderTypeCommerceDiscount(long[] commerceAccountGroupIds, long commerceOrderTypeId, String target)
    • getAccountGroupCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupCommerceDiscount(long[] commerceAccountGroupIds, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getAccountGroupCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getAccountGroupCommerceDiscount(long[] commerceAccountGroupIds, String target)
    • getActionableDynamicQuery

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

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount getActiveCommerceDiscount(long companyId, String couponCode, boolean active) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getActiveCommerceDiscountsCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getActiveCommerceDiscountsCount(long companyId, String couponCode, boolean active)
    • getChannelAndOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getChannelAndOrderTypeCommerceDiscounts(long commerceChannelId, long commerceOrderTypeId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getChannelAndOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getChannelAndOrderTypeCommerceDiscounts(long commerceChannelId, long commerceOrderTypeId, String target)
    • getChannelCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getChannelCommerceDiscounts(long commerceChannelId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getChannelCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getChannelCommerceDiscounts(long commerceChannelId, String target)
    • getCommerceDiscount

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount getCommerceDiscount(long commerceDiscountId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the commerce discount with the primary key.
      Parameters:
      commerceDiscountId - the primary key of the commerce discount
      Returns:
      the commerce discount
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a commerce discount with the primary key could not be found
    • getCommerceDiscountByExternalReferenceCode

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

      @Transactional(propagation=SUPPORTS, readOnly=true) CommerceDiscount getCommerceDiscountByUuidAndCompanyId(String uuid, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the commerce discount with the matching UUID and company.
      Parameters:
      uuid - the commerce discount's UUID
      companyId - the primary key of the company
      Returns:
      the matching commerce discount
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching commerce discount could not be found
    • getCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getCommerceDiscounts(int start, int end)
      Returns a range of all the commerce discounts.

      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.discount.model.impl.CommerceDiscountModelImpl.

      Parameters:
      start - the lower bound of the range of commerce discounts
      end - the upper bound of the range of commerce discounts (not inclusive)
      Returns:
      the range of commerce discounts
    • getCommerceDiscounts

      @Deprecated @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getCommerceDiscounts(long companyId, String couponCode)
      Deprecated.
      As of Athanasius (7.3.x)
    • getCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getCommerceDiscounts(long companyId, String level, boolean active, int status)
    • getCommerceDiscountsCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCommerceDiscountsCount()
      Returns the number of commerce discounts.
      Returns:
      the number of commerce discounts
    • getCommerceDiscountsCount

      @Deprecated @Transactional(propagation=SUPPORTS, readOnly=true) int getCommerceDiscountsCount(long companyId, String couponCode)
      Deprecated.
      As of Athanasius (7.3.x)
    • getCommerceDiscountsCountByPricingClassId

      @Transactional(propagation=SUPPORTS, readOnly=true) int getCommerceDiscountsCountByPricingClassId(long commercePricingClassId, String title)
    • 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()
    • getOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getOrderTypeCommerceDiscounts(long commerceOrderTypeId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getOrderTypeCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getOrderTypeCommerceDiscounts(long commerceOrderTypeId, String target)
    • 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
    • getPriceListCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getPriceListCommerceDiscounts(long[] commerceDiscountIds, long cpDefinitionId)
    • getUnqualifiedCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getUnqualifiedCommerceDiscounts(long companyId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getUnqualifiedCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> getUnqualifiedCommerceDiscounts(long companyId, String target)
    • getValidCommerceDiscountsCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getValidCommerceDiscountsCount(long commerceDiscountId, long cpDefinitionId, long cpInstanceId, String unitOfMeasureKey)
    • getValidCommerceDiscountsCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getValidCommerceDiscountsCount(long commerceAccountId, long[] commerceAccountGroupIds, long commerceChannelId, long commerceDiscountId)
    • incrementCommerceDiscountNumberOfUse

      @Indexable(type=REINDEX) CommerceDiscount incrementCommerceDiscountNumberOfUse(long commerceDiscountId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchByCommercePricingClassId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<CommerceDiscount> searchByCommercePricingClassId(long commercePricingClassId, String title, int start, int end)
    • searchCommerceDiscounts

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.BaseModelSearchResult<CommerceDiscount> searchCommerceDiscounts(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
    • searchCommerceDiscounts

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

      @Indexable(type=REINDEX) CommerceDiscount updateCommerceDiscount(CommerceDiscount commerceDiscount)
      Updates the commerce discount in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect CommerceDiscountLocalServiceImpl 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:
      commerceDiscount - the commerce discount
      Returns:
      the commerce discount that was updated
    • updateCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount updateCommerceDiscount(long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount updateCommerceDiscount(long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCommerceDiscount

      @Indexable(type=REINDEX) CommerceDiscount updateCommerceDiscount(long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, int limitationTimesPerAccount, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCommerceDiscountExternalReferenceCode

      @Deprecated @Indexable(type=REINDEX) CommerceDiscount updateCommerceDiscountExternalReferenceCode(long commerceDiscountId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException
      Deprecated.
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCommerceDiscountExternalReferenceCode

      @Indexable(type=REINDEX) CommerceDiscount updateCommerceDiscountExternalReferenceCode(String externalReferenceCode, long commerceDiscountId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      @Indexable(type=REINDEX) CommerceDiscount updateStatus(long userId, long commerceDiscountId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext, Map<String,Serializable> workflowContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • upsertCommerceDiscount

      @Deprecated @Indexable(type=REINDEX) CommerceDiscount upsertCommerceDiscount(long userId, long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, String externalReferenceCode, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • upsertCommerceDiscount

      @Deprecated @Indexable(type=REINDEX) CommerceDiscount upsertCommerceDiscount(long userId, long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, String externalReferenceCode, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • upsertCommerceDiscount

      @Deprecated @Indexable(type=REINDEX) CommerceDiscount upsertCommerceDiscount(long userId, long commerceDiscountId, String title, String target, boolean useCouponCode, String couponCode, boolean usePercentage, BigDecimal maximumDiscountAmount, String level, BigDecimal level1, BigDecimal level2, BigDecimal level3, BigDecimal level4, String limitationType, int limitationTimes, int limitationTimesPerAccount, boolean rulesConjunction, boolean active, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, String externalReferenceCode, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException