Class CommerceDiscountRelUtil

java.lang.Object
com.liferay.commerce.discount.service.persistence.CommerceDiscountRelUtil

public class CommerceDiscountRelUtil extends Object
The persistence utility for the commerce discount rel service. This utility wraps com.liferay.commerce.discount.service.persistence.impl.CommerceDiscountRelPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
Generated:
  • Constructor Details

    • CommerceDiscountRelUtil

      public CommerceDiscountRelUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
      • BasePersistence.clearCache()
    • clearCache

      public static void clearCache(CommerceDiscountRel commerceDiscountRel)
      See Also:
      • BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
    • countWithDynamicQuery

      public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.countWithDynamicQuery(DynamicQuery)
    • fetchByPrimaryKeys

      public static Map<Serializable,CommerceDiscountRel> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
      • BasePersistence.fetchByPrimaryKeys(Set)
    • findWithDynamicQuery

      public static List<CommerceDiscountRel> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery)
    • findWithDynamicQuery

      public static List<CommerceDiscountRel> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
    • findWithDynamicQuery

      public static List<CommerceDiscountRel> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
    • update

      public static CommerceDiscountRel update(CommerceDiscountRel commerceDiscountRel)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
    • update

      public static CommerceDiscountRel update(CommerceDiscountRel commerceDiscountRel, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByCommerceDiscountId

      public static List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId)
      Returns all the commerce discount rels where commerceDiscountId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      Returns:
      the matching commerce discount rels
    • findByCommerceDiscountId

      public static List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId, int start, int end)
      Returns a range of all the commerce discount rels where commerceDiscountId = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      commerceDiscountId - the commerce discount ID
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      Returns:
      the range of matching commerce discount rels
    • findByCommerceDiscountId

      public static List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns an ordered range of all the commerce discount rels where commerceDiscountId = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      commerceDiscountId - the commerce discount ID
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching commerce discount rels
    • findByCommerceDiscountId

      public static List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce discount rels where commerceDiscountId = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      commerceDiscountId - the commerce discount ID
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching commerce discount rels
    • findByCommerceDiscountId_First

      public static CommerceDiscountRel findByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the first commerce discount rel in the ordered set where commerceDiscountId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a matching commerce discount rel could not be found
      NoSuchDiscountRelException
    • fetchByCommerceDiscountId_First

      public static CommerceDiscountRel fetchByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns the first commerce discount rel in the ordered set where commerceDiscountId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce discount rel, or null if a matching commerce discount rel could not be found
    • findByCommerceDiscountId_Last

      public static CommerceDiscountRel findByCommerceDiscountId_Last(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the last commerce discount rel in the ordered set where commerceDiscountId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a matching commerce discount rel could not be found
      NoSuchDiscountRelException
    • fetchByCommerceDiscountId_Last

      public static CommerceDiscountRel fetchByCommerceDiscountId_Last(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns the last commerce discount rel in the ordered set where commerceDiscountId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce discount rel, or null if a matching commerce discount rel could not be found
    • findByCommerceDiscountId_PrevAndNext

      public static CommerceDiscountRel[] findByCommerceDiscountId_PrevAndNext(long commerceDiscountRelId, long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where commerceDiscountId = ?.
      Parameters:
      commerceDiscountRelId - the primary key of the current commerce discount rel
      commerceDiscountId - the commerce discount ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a commerce discount rel with the primary key could not be found
      NoSuchDiscountRelException
    • removeByCommerceDiscountId

      public static void removeByCommerceDiscountId(long commerceDiscountId)
      Removes all the commerce discount rels where commerceDiscountId = ? from the database.
      Parameters:
      commerceDiscountId - the commerce discount ID
    • countByCommerceDiscountId

      public static int countByCommerceDiscountId(long commerceDiscountId)
      Returns the number of commerce discount rels where commerceDiscountId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      Returns:
      the number of matching commerce discount rels
    • findByCD_CN

      public static List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId)
      Returns all the commerce discount rels where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      Returns:
      the matching commerce discount rels
    • findByCD_CN

      public static List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId, int start, int end)
      Returns a range of all the commerce discount rels where commerceDiscountId = ? and classNameId = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      Returns:
      the range of matching commerce discount rels
    • findByCD_CN

      public static List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns an ordered range of all the commerce discount rels where commerceDiscountId = ? and classNameId = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching commerce discount rels
    • findByCD_CN

      public static List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce discount rels where commerceDiscountId = ? and classNameId = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching commerce discount rels
    • findByCD_CN_First

      public static CommerceDiscountRel findByCD_CN_First(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the first commerce discount rel in the ordered set where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a matching commerce discount rel could not be found
      NoSuchDiscountRelException
    • fetchByCD_CN_First

      public static CommerceDiscountRel fetchByCD_CN_First(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns the first commerce discount rel in the ordered set where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce discount rel, or null if a matching commerce discount rel could not be found
    • findByCD_CN_Last

      public static CommerceDiscountRel findByCD_CN_Last(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the last commerce discount rel in the ordered set where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a matching commerce discount rel could not be found
      NoSuchDiscountRelException
    • fetchByCD_CN_Last

      public static CommerceDiscountRel fetchByCD_CN_Last(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns the last commerce discount rel in the ordered set where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce discount rel, or null if a matching commerce discount rel could not be found
    • findByCD_CN_PrevAndNext

      public static CommerceDiscountRel[] findByCD_CN_PrevAndNext(long commerceDiscountRelId, long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountRelId - the primary key of the current commerce discount rel
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a commerce discount rel with the primary key could not be found
      NoSuchDiscountRelException
    • removeByCD_CN

      public static void removeByCD_CN(long commerceDiscountId, long classNameId)
      Removes all the commerce discount rels where commerceDiscountId = ? and classNameId = ? from the database.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
    • countByCD_CN

      public static int countByCD_CN(long commerceDiscountId, long classNameId)
      Returns the number of commerce discount rels where commerceDiscountId = ? and classNameId = ?.
      Parameters:
      commerceDiscountId - the commerce discount ID
      classNameId - the class name ID
      Returns:
      the number of matching commerce discount rels
    • findByCN_CPK

      public static List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK)
      Returns all the commerce discount rels where classNameId = ? and classPK = ?.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      Returns:
      the matching commerce discount rels
    • findByCN_CPK

      public static List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK, int start, int end)
      Returns a range of all the commerce discount rels where classNameId = ? and classPK = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      Returns:
      the range of matching commerce discount rels
    • findByCN_CPK

      public static List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns an ordered range of all the commerce discount rels where classNameId = ? and classPK = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching commerce discount rels
    • findByCN_CPK

      public static List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce discount rels where classNameId = ? and classPK = ?.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching commerce discount rels
    • findByCN_CPK_First

      public static CommerceDiscountRel findByCN_CPK_First(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the first commerce discount rel in the ordered set where classNameId = ? and classPK = ?.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a matching commerce discount rel could not be found
      NoSuchDiscountRelException
    • fetchByCN_CPK_First

      public static CommerceDiscountRel fetchByCN_CPK_First(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns the first commerce discount rel in the ordered set where classNameId = ? and classPK = ?.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce discount rel, or null if a matching commerce discount rel could not be found
    • findByCN_CPK_Last

      public static CommerceDiscountRel findByCN_CPK_Last(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the last commerce discount rel in the ordered set where classNameId = ? and classPK = ?.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a matching commerce discount rel could not be found
      NoSuchDiscountRelException
    • fetchByCN_CPK_Last

      public static CommerceDiscountRel fetchByCN_CPK_Last(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns the last commerce discount rel in the ordered set where classNameId = ? and classPK = ?.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce discount rel, or null if a matching commerce discount rel could not be found
    • findByCN_CPK_PrevAndNext

      public static CommerceDiscountRel[] findByCN_CPK_PrevAndNext(long commerceDiscountRelId, long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
      Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where classNameId = ? and classPK = ?.
      Parameters:
      commerceDiscountRelId - the primary key of the current commerce discount rel
      classNameId - the class name ID
      classPK - the class pk
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a commerce discount rel with the primary key could not be found
      NoSuchDiscountRelException
    • removeByCN_CPK

      public static void removeByCN_CPK(long classNameId, long classPK)
      Removes all the commerce discount rels where classNameId = ? and classPK = ? from the database.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
    • countByCN_CPK

      public static int countByCN_CPK(long classNameId, long classPK)
      Returns the number of commerce discount rels where classNameId = ? and classPK = ?.
      Parameters:
      classNameId - the class name ID
      classPK - the class pk
      Returns:
      the number of matching commerce discount rels
    • cacheResult

      public static void cacheResult(CommerceDiscountRel commerceDiscountRel)
      Caches the commerce discount rel in the entity cache if it is enabled.
      Parameters:
      commerceDiscountRel - the commerce discount rel
    • cacheResult

      public static void cacheResult(List<CommerceDiscountRel> commerceDiscountRels)
      Caches the commerce discount rels in the entity cache if it is enabled.
      Parameters:
      commerceDiscountRels - the commerce discount rels
    • create

      public static CommerceDiscountRel create(long commerceDiscountRelId)
      Creates a new commerce discount rel with the primary key. Does not add the commerce discount rel to the database.
      Parameters:
      commerceDiscountRelId - the primary key for the new commerce discount rel
      Returns:
      the new commerce discount rel
    • remove

      public static CommerceDiscountRel remove(long commerceDiscountRelId) throws NoSuchDiscountRelException
      Removes the commerce discount rel with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      commerceDiscountRelId - the primary key of the commerce discount rel
      Returns:
      the commerce discount rel that was removed
      Throws:
      NoSuchDiscountRelException - if a commerce discount rel with the primary key could not be found
      NoSuchDiscountRelException
    • updateImpl

      public static CommerceDiscountRel updateImpl(CommerceDiscountRel commerceDiscountRel)
    • findByPrimaryKey

      public static CommerceDiscountRel findByPrimaryKey(long commerceDiscountRelId) throws NoSuchDiscountRelException
      Returns the commerce discount rel with the primary key or throws a NoSuchDiscountRelException if it could not be found.
      Parameters:
      commerceDiscountRelId - the primary key of the commerce discount rel
      Returns:
      the commerce discount rel
      Throws:
      NoSuchDiscountRelException - if a commerce discount rel with the primary key could not be found
      NoSuchDiscountRelException
    • fetchByPrimaryKey

      public static CommerceDiscountRel fetchByPrimaryKey(long commerceDiscountRelId)
      Returns the commerce discount rel with the primary key or returns null if it could not be found.
      Parameters:
      commerceDiscountRelId - the primary key of the commerce discount rel
      Returns:
      the commerce discount rel, or null if a commerce discount rel with the primary key could not be found
    • findAll

      public static List<CommerceDiscountRel> findAll()
      Returns all the commerce discount rels.
      Returns:
      the commerce discount rels
    • findAll

      public static List<CommerceDiscountRel> findAll(int start, int end)
      Returns a range of all the commerce discount rels.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      Returns:
      the range of commerce discount rels
    • findAll

      public static List<CommerceDiscountRel> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
      Returns an ordered range of all the commerce discount rels.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of commerce discount rels
    • findAll

      public static List<CommerceDiscountRel> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce discount rels.

      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 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 CommerceDiscountRelModelImpl.

      Parameters:
      start - the lower bound of the range of commerce discount rels
      end - the upper bound of the range of commerce discount rels (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of commerce discount rels
    • removeAll

      public static void removeAll()
      Removes all the commerce discount rels from the database.
    • countAll

      public static int countAll()
      Returns the number of commerce discount rels.
      Returns:
      the number of commerce discount rels
    • getPersistence

      public static CommerceDiscountRelPersistence getPersistence()
    • setPersistence

      public static void setPersistence(CommerceDiscountRelPersistence persistence)