Class CommerceDiscountRuleUtil
com.liferay.commerce.discount.service.persistence.impl.CommerceDiscountRulePersistenceImpl 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(CommerceDiscountRule commerceDiscountRule) static voidcacheResult(List<CommerceDiscountRule> commerceDiscountRules) static voidstatic voidclearCache(CommerceDiscountRule commerceDiscountRule) static intcountByCommerceDiscountId(long commerceDiscountId) Returns the number of commerce discount rules where commerceDiscountId = ?.static longcountWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static CommerceDiscountRulecreate(long commerceDiscountRuleId) Creates a new commerce discount rule with the primary key.static CommerceDiscountRulefetchByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the first commerce discount rule in the ordered set where commerceDiscountId = ?.static CommerceDiscountRulefetchByPrimaryKey(long commerceDiscountRuleId) Returns the commerce discount rule with the primary key or returnsnullif it could not be found.static Map<Serializable, CommerceDiscountRule> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId) Returns all the commerce discount rules where commerceDiscountId = ?.static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId, int start, int end) Returns a range of all the commerce discount rules where commerceDiscountId = ?.static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns an ordered range of all the commerce discount rules where commerceDiscountId = ?.static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator, boolean useFinderCache) Returns an ordered range of all the commerce discount rules where commerceDiscountId = ?.static CommerceDiscountRulefindByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the first commerce discount rule in the ordered set where commerceDiscountId = ?.static CommerceDiscountRulefindByPrimaryKey(long commerceDiscountRuleId) Returns the commerce discount rule with the primary key or throws aNoSuchDiscountRuleExceptionif it could not be found.static List<CommerceDiscountRule> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static List<CommerceDiscountRule> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) static List<CommerceDiscountRule> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) static CommerceDiscountRuleremove(long commerceDiscountRuleId) Removes the commerce discount rule with the primary key from the database.static voidremoveByCommerceDiscountId(long commerceDiscountId) Removes all the commerce discount rules where commerceDiscountId = ? from the database.static voidsetPersistence(CommerceDiscountRulePersistence persistence) static CommerceDiscountRuleupdate(CommerceDiscountRule commerceDiscountRule) static CommerceDiscountRuleupdate(CommerceDiscountRule commerceDiscountRule, com.liferay.portal.kernel.service.ServiceContext serviceContext) static CommerceDiscountRuleupdateImpl(CommerceDiscountRule commerceDiscountRule)
-
Constructor Details
-
CommerceDiscountRuleUtil
public CommerceDiscountRuleUtil()
-
-
Method Details
-
cacheResult
- See Also:
-
cacheResult
- See Also:
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
fetchByPrimaryKeys
public static Map<Serializable,CommerceDiscountRule> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
public static List<CommerceDiscountRule> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
findWithDynamicQuery
public static List<CommerceDiscountRule> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
findWithDynamicQuery
public static List<CommerceDiscountRule> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) - See Also:
-
update
- See Also:
-
update
public static CommerceDiscountRule update(CommerceDiscountRule commerceDiscountRule, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
findByCommerceDiscountId
public static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator, boolean useFinderCache) Returns an ordered range of all the commerce discount rules where commerceDiscountId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.commerce.discount.model.impl.CommerceDiscountRuleModelImpl.- Parameters:
commerceDiscountId- the commerce discount IDstart- the lower bound of the range of commerce discount rulesend- the upper bound of the range of commerce discount rules (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching commerce discount rules
-
findByCommerceDiscountId_First
public static CommerceDiscountRule findByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) throws NoSuchDiscountRuleException Returns the first commerce discount rule in the ordered set where commerceDiscountId = ?.- Parameters:
commerceDiscountId- the commerce discount IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching commerce discount rule
-
fetchByCommerceDiscountId_First
public static CommerceDiscountRule fetchByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the first commerce discount rule in the ordered set where commerceDiscountId = ?.- Parameters:
commerceDiscountId- the commerce discount IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching commerce discount rule, or
nullif a matching commerce discount rule could not be found
-
removeByCommerceDiscountId
public static void removeByCommerceDiscountId(long commerceDiscountId) Removes all the commerce discount rules where commerceDiscountId = ? from the database.- Parameters:
commerceDiscountId- the commerce discount ID
-
countByCommerceDiscountId
public static int countByCommerceDiscountId(long commerceDiscountId) Returns the number of commerce discount rules where commerceDiscountId = ?.- Parameters:
commerceDiscountId- the commerce discount ID- Returns:
- the number of matching commerce discount rules
-
create
Creates a new commerce discount rule with the primary key. Does not add the commerce discount rule to the database.- Parameters:
commerceDiscountRuleId- the primary key for the new commerce discount rule- Returns:
- the new commerce discount rule
-
remove
public static CommerceDiscountRule remove(long commerceDiscountRuleId) throws NoSuchDiscountRuleException Removes the commerce discount rule with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
commerceDiscountRuleId- the primary key of the commerce discount rule- Returns:
- the commerce discount rule that was removed
-
updateImpl
-
findByPrimaryKey
public static CommerceDiscountRule findByPrimaryKey(long commerceDiscountRuleId) throws NoSuchDiscountRuleException Returns the commerce discount rule with the primary key or throws aNoSuchDiscountRuleExceptionif it could not be found.- Parameters:
commerceDiscountRuleId- the primary key of the commerce discount rule- Returns:
- the commerce discount rule
-
fetchByPrimaryKey
Returns the commerce discount rule with the primary key or returnsnullif it could not be found.- Parameters:
commerceDiscountRuleId- the primary key of the commerce discount rule- Returns:
- the commerce discount rule, or
nullif a commerce discount rule with the primary key could not be found
-
findByCommerceDiscountId
Returns all the commerce discount rules where commerceDiscountId = ?.- Parameters:
commerceDiscountId- the commerce discount ID- Returns:
- the matching commerce discount rules
-
findByCommerceDiscountId
public static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId, int start, int end) Returns a range of all the commerce discount rules where commerceDiscountId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.commerce.discount.model.impl.CommerceDiscountRuleModelImpl.- Parameters:
commerceDiscountId- the commerce discount IDstart- the lower bound of the range of commerce discount rulesend- the upper bound of the range of commerce discount rules (not inclusive)- Returns:
- the range of matching commerce discount rules
-
findByCommerceDiscountId
public static List<CommerceDiscountRule> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns an ordered range of all the commerce discount rules where commerceDiscountId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.commerce.discount.model.impl.CommerceDiscountRuleModelImpl.- Parameters:
commerceDiscountId- the commerce discount IDstart- the lower bound of the range of commerce discount rulesend- the upper bound of the range of commerce discount rules (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching commerce discount rules
-
getPersistence
-
setPersistence
-