Class CommercePriceEntryLocalServiceUtil

java.lang.Object
com.liferay.commerce.price.list.service.CommercePriceEntryLocalServiceUtil

public class CommercePriceEntryLocalServiceUtil extends Object
Provides the local service utility for CommercePriceEntry. This utility wraps com.liferay.commerce.price.list.service.impl.CommercePriceEntryLocalServiceImpl and is an access point for service operations in application layer code running on the local server. 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:
  • Constructor Details

    • CommercePriceEntryLocalServiceUtil

      public CommercePriceEntryLocalServiceUtil()
  • Method Details

    • addCommercePriceEntry

      public static CommercePriceEntry addCommercePriceEntry(CommercePriceEntry commercePriceEntry)
      Adds the commerce price entry to the database. Also notifies the appropriate model listeners.

      Important: Inspect CommercePriceEntryLocalServiceImpl 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:
      commercePriceEntry - the commerce price entry
      Returns:
      the commerce price entry that was added
    • addCommercePriceEntry

      public static CommercePriceEntry addCommercePriceEntry(String externalReferenceCode, long cProductId, String cpInstanceUuid, long commercePriceListId, BigDecimal price, boolean priceOnApplication, BigDecimal promoPrice, String unitOfMeasureKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCommercePriceEntry

      public static CommercePriceEntry addCommercePriceEntry(String externalReferenceCode, long cProductId, String cpInstanceUuid, long commercePriceListId, boolean discountDiscovery, BigDecimal discountLevel1, BigDecimal discountLevel2, BigDecimal discountLevel3, BigDecimal discountLevel4, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, BigDecimal price, boolean priceOnApplication, BigDecimal promoPrice, String unitOfMeasureKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCommercePriceEntry

      public static CommercePriceEntry addOrUpdateCommercePriceEntry(String externalReferenceCode, long commercePriceEntryId, long cProductId, String cpInstanceUuid, long commercePriceListId, boolean discountDiscovery, BigDecimal discountLevel1, BigDecimal discountLevel2, BigDecimal discountLevel3, BigDecimal discountLevel4, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, BigDecimal price, boolean priceOnApplication, BigDecimal promoPrice, String skuExternalReferenceCode, String unitOfMeasureKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkCommercePriceEntries

      public static void checkCommercePriceEntries() throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createCommercePriceEntry

      public static CommercePriceEntry createCommercePriceEntry(long commercePriceEntryId)
      Creates a new commerce price entry with the primary key. Does not add the commerce price entry to the database.
      Parameters:
      commercePriceEntryId - the primary key for the new commerce price entry
      Returns:
      the new commerce price entry
    • createPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCommercePriceEntries

      public static void deleteCommercePriceEntries(long commercePriceListId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCommercePriceEntries

      public static void deleteCommercePriceEntries(String cpInstanceUuid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCommercePriceEntries

      public static void deleteCommercePriceEntries(String cpInstanceUuid, BigDecimal quantity, String unitOfMeasureKey) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCommercePriceEntry

      public static CommercePriceEntry deleteCommercePriceEntry(CommercePriceEntry commercePriceEntry) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the commerce price entry from the database. Also notifies the appropriate model listeners.

      Important: Inspect CommercePriceEntryLocalServiceImpl 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:
      commercePriceEntry - the commerce price entry
      Returns:
      the commerce price entry that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCommercePriceEntry

      public static CommercePriceEntry deleteCommercePriceEntry(long commercePriceEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the commerce price entry with the primary key from the database. Also notifies the appropriate model listeners.

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

      public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dslQueryCount

      public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dynamicQuery

      public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <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

      public static <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.price.list.model.impl.CommercePriceEntryModelImpl.

      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

      public static <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.price.list.model.impl.CommercePriceEntryModelImpl.

      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

      public static 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

      public static 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
    • fetchCommercePriceEntry

      public static CommercePriceEntry fetchCommercePriceEntry(long commercePriceEntryId)
    • fetchCommercePriceEntry

      public static CommercePriceEntry fetchCommercePriceEntry(long commercePriceListId, String cpInstanceUuid, int status, String unitOfMeasureKey)
    • fetchCommercePriceEntry

      public static CommercePriceEntry fetchCommercePriceEntry(long commercePriceListId, String cpInstanceUuid, String unitOfMeasureKey)
    • fetchCommercePriceEntry

      public static CommercePriceEntry fetchCommercePriceEntry(long commercePriceListId, String cpInstanceUuid, String unitOfMeasureKey, boolean useAncestor)
    • fetchCommercePriceEntryByExternalReferenceCode

      public static CommercePriceEntry fetchCommercePriceEntryByExternalReferenceCode(String externalReferenceCode, long companyId)
    • fetchCommercePriceEntryByUuidAndCompanyId

      public static CommercePriceEntry fetchCommercePriceEntryByUuidAndCompanyId(String uuid, long companyId)
      Returns the commerce price entry with the matching UUID and company.
      Parameters:
      uuid - the commerce price entry's UUID
      companyId - the primary key of the company
      Returns:
      the matching commerce price entry, or null if a matching commerce price entry could not be found
    • getActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getCommercePriceEntries

      public static List<CommercePriceEntry> getCommercePriceEntries(int start, int end)
      Returns a range of all the commerce price entries.

      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.price.list.model.impl.CommercePriceEntryModelImpl.

      Parameters:
      start - the lower bound of the range of commerce price entries
      end - the upper bound of the range of commerce price entries (not inclusive)
      Returns:
      the range of commerce price entries
    • getCommercePriceEntries

      public static List<CommercePriceEntry> getCommercePriceEntries(long commercePriceListId, int start, int end)
    • getCommercePriceEntries

      public static List<CommercePriceEntry> getCommercePriceEntries(long commercePriceListId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommercePriceEntry> orderByComparator)
    • getCommercePriceEntries

      public static List<CommercePriceEntry> getCommercePriceEntries(String cpInstanceUuid, BigDecimal quantity, String unitOfMeasureKey)
    • getCommercePriceEntriesByCompanyId

      public static List<CommercePriceEntry> getCommercePriceEntriesByCompanyId(long companyId, int start, int end)
    • getCommercePriceEntriesCount

      public static int getCommercePriceEntriesCount()
      Returns the number of commerce price entries.
      Returns:
      the number of commerce price entries
    • getCommercePriceEntriesCount

      public static int getCommercePriceEntriesCount(long commercePriceListId)
    • getCommercePriceEntriesCountByCompanyId

      public static int getCommercePriceEntriesCountByCompanyId(long companyId)
    • getCommercePriceEntry

      public static CommercePriceEntry getCommercePriceEntry(long commercePriceEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the commerce price entry with the primary key.
      Parameters:
      commercePriceEntryId - the primary key of the commerce price entry
      Returns:
      the commerce price entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a commerce price entry with the primary key could not be found
    • getCommercePriceEntryByExternalReferenceCode

      public static CommercePriceEntry getCommercePriceEntryByExternalReferenceCode(String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCommercePriceEntryByUuidAndCompanyId

      public static CommercePriceEntry getCommercePriceEntryByUuidAndCompanyId(String uuid, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the commerce price entry with the matching UUID and company.
      Parameters:
      uuid - the commerce price entry's UUID
      companyId - the primary key of the company
      Returns:
      the matching commerce price entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching commerce price entry could not be found
    • getExportActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getIndexableActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getInstanceBaseCommercePriceEntry

      public static CommercePriceEntry getInstanceBaseCommercePriceEntry(String cpInstanceUuid, String priceListType, String unitOfMeasureKey)
    • getInstanceCommercePriceEntries

      public static List<CommercePriceEntry> getInstanceCommercePriceEntries(String cpInstanceUuid, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommercePriceEntry> orderByComparator)
    • getInstanceCommercePriceEntriesCount

      public static int getInstanceCommercePriceEntriesCount(String cpInstanceUuid)
    • getOSGiServiceIdentifier

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

      public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public static com.liferay.portal.kernel.search.Hits search(com.liferay.portal.kernel.search.SearchContext searchContext)
    • searchCommercePriceEntries

      public static com.liferay.portal.kernel.search.BaseModelSearchResult<CommercePriceEntry> searchCommercePriceEntries(long companyId, long commercePriceListId, String keywords, 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
    • searchCommercePriceEntriesCount

      public static int searchCommercePriceEntriesCount(long companyId, long commercePriceListId, String keywords) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • setHasTierPrice

      public static CommercePriceEntry setHasTierPrice(long commercePriceEntryId, boolean hasTierPrice) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • setHasTierPrice

      public static CommercePriceEntry setHasTierPrice(long commercePriceEntryId, boolean hasTierPrice, boolean bulkPricing) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCommercePriceEntry

      public static CommercePriceEntry updateCommercePriceEntry(CommercePriceEntry commercePriceEntry)
      Updates the commerce price entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect CommercePriceEntryLocalServiceImpl 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:
      commercePriceEntry - the commerce price entry
      Returns:
      the commerce price entry that was updated
    • updateCommercePriceEntry

      public static CommercePriceEntry updateCommercePriceEntry(long commercePriceEntryId, boolean bulkPricing, boolean discountDiscovery, BigDecimal discountLevel1, BigDecimal discountLevel2, BigDecimal discountLevel3, BigDecimal discountLevel4, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, BigDecimal price, boolean priceOnApplication, BigDecimal promoPrice, String unitOfMeasureKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateExternalReferenceCode

      public static CommercePriceEntry updateExternalReferenceCode(String externalReferenceCode, CommercePriceEntry commercePriceEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updatePricingInfo

      public static CommercePriceEntry updatePricingInfo(long commercePriceEntryId, boolean bulkPricing, BigDecimal price, boolean priceOnApplication, BigDecimal promoPrice, String unitOfMeasureKey, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      public static CommercePriceEntry updateStatus(long userId, long commercePriceEntryId, 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
    • getService

      public static CommercePriceEntryLocalService getService()