Interface CommerceDiscountRulePersistence
- All Superinterfaces:
com.liferay.portal.kernel.service.persistence.BasePersistence<CommerceDiscountRule>
Caching information and settings can be found in portal.properties
- See Also:
- Generated:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cacheResult
(CommerceDiscountRule commerceDiscountRule) Caches the commerce discount rule in the entity cache if it is enabled.void
cacheResult
(List<CommerceDiscountRule> commerceDiscountRules) Caches the commerce discount rules in the entity cache if it is enabled.int
countAll()
Returns the number of commerce discount rules.int
countByCommerceDiscountId
(long commerceDiscountId) Returns the number of commerce discount rules where commerceDiscountId = ?.create
(long commerceDiscountRuleId) Creates a new commerce discount rule with the primary key.fetchByCommerceDiscountId_First
(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the first commerce discount rule in the ordered set where commerceDiscountId = ?.fetchByCommerceDiscountId_Last
(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the last commerce discount rule in the ordered set where commerceDiscountId = ?.fetchByPrimaryKey
(long commerceDiscountRuleId) Returns the commerce discount rule with the primary key or returnsnull
if it could not be found.findAll()
Returns all the commerce discount rules.findAll
(int start, int end) Returns a range of all the commerce discount rules.findAll
(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns an ordered range of all the commerce discount rules.findAll
(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator, boolean useFinderCache) Returns an ordered range of all the commerce discount rules.findByCommerceDiscountId
(long commerceDiscountId) Returns all the commerce discount rules where commerceDiscountId = ?.findByCommerceDiscountId
(long commerceDiscountId, int start, int end) Returns a range of all the commerce discount rules where commerceDiscountId = ?.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 = ?.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 = ?.findByCommerceDiscountId_First
(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the first commerce discount rule in the ordered set where commerceDiscountId = ?.findByCommerceDiscountId_Last
(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the last commerce discount rule in the ordered set where commerceDiscountId = ?.findByCommerceDiscountId_PrevAndNext
(long commerceDiscountRuleId, long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the commerce discount rules before and after the current commerce discount rule in the ordered set where commerceDiscountId = ?.findByPrimaryKey
(long commerceDiscountRuleId) Returns the commerce discount rule with the primary key or throws aNoSuchDiscountRuleException
if it could not be found.remove
(long commerceDiscountRuleId) Removes the commerce discount rule with the primary key from the database.void
Removes all the commerce discount rules from the database.void
removeByCommerceDiscountId
(long commerceDiscountId) Removes all the commerce discount rules where commerceDiscountId = ? from the database.updateImpl
(CommerceDiscountRule commerceDiscountRule) Methods inherited from interface com.liferay.portal.kernel.service.persistence.BasePersistence
clearCache, clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, dslQuery, dslQueryCount, fetchByPrimaryKey, fetchByPrimaryKeys, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, removeByFunction, setDataSource, unregisterListener, update, update
-
Method Details
-
findByCommerceDiscountId
Returns all the commerce discount rules where commerceDiscountId = ?.- Parameters:
commerceDiscountId
- the commerce discount ID- Returns:
- the matching commerce discount rules
-
findByCommerceDiscountId
Returns a range of all the commerce discount rules where commerceDiscountId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCommerceDiscountRuleModelImpl
.- 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
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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCommerceDiscountRuleModelImpl
.- 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
-
findByCommerceDiscountId
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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCommerceDiscountRuleModelImpl
.- 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
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
- Throws:
NoSuchDiscountRuleException
- if a matching commerce discount rule could not be found
-
fetchByCommerceDiscountId_First
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
null
if a matching commerce discount rule could not be found
-
findByCommerceDiscountId_Last
CommerceDiscountRule findByCommerceDiscountId_Last(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) throws NoSuchDiscountRuleException Returns the last 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 last matching commerce discount rule
- Throws:
NoSuchDiscountRuleException
- if a matching commerce discount rule could not be found
-
fetchByCommerceDiscountId_Last
CommerceDiscountRule fetchByCommerceDiscountId_Last(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns the last 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 last matching commerce discount rule, or
null
if a matching commerce discount rule could not be found
-
findByCommerceDiscountId_PrevAndNext
CommerceDiscountRule[] findByCommerceDiscountId_PrevAndNext(long commerceDiscountRuleId, long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) throws NoSuchDiscountRuleException Returns the commerce discount rules before and after the current commerce discount rule in the ordered set where commerceDiscountId = ?.- Parameters:
commerceDiscountRuleId
- the primary key of the current commerce discount rulecommerceDiscountId
- the commerce discount IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next commerce discount rule
- Throws:
NoSuchDiscountRuleException
- if a commerce discount rule with the primary key could not be found
-
removeByCommerceDiscountId
void removeByCommerceDiscountId(long commerceDiscountId) Removes all the commerce discount rules where commerceDiscountId = ? from the database.- Parameters:
commerceDiscountId
- the commerce discount ID
-
countByCommerceDiscountId
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
-
cacheResult
Caches the commerce discount rule in the entity cache if it is enabled.- Parameters:
commerceDiscountRule
- the commerce discount rule
-
cacheResult
Caches the commerce discount rules in the entity cache if it is enabled.- Parameters:
commerceDiscountRules
- the 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
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
- Throws:
NoSuchDiscountRuleException
- if a commerce discount rule with the primary key could not be found
-
updateImpl
-
findByPrimaryKey
CommerceDiscountRule findByPrimaryKey(long commerceDiscountRuleId) throws NoSuchDiscountRuleException Returns the commerce discount rule with the primary key or throws aNoSuchDiscountRuleException
if it could not be found.- Parameters:
commerceDiscountRuleId
- the primary key of the commerce discount rule- Returns:
- the commerce discount rule
- Throws:
NoSuchDiscountRuleException
- if a commerce discount rule with the primary key could not be found
-
fetchByPrimaryKey
Returns the commerce discount rule with the primary key or returnsnull
if it could not be found.- Parameters:
commerceDiscountRuleId
- the primary key of the commerce discount rule- Returns:
- the commerce discount rule, or
null
if a commerce discount rule with the primary key could not be found
-
findAll
List<CommerceDiscountRule> findAll()Returns all the commerce discount rules.- Returns:
- the commerce discount rules
-
findAll
Returns a range of all the commerce discount rules.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCommerceDiscountRuleModelImpl
.- Parameters:
start
- 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 commerce discount rules
-
findAll
List<CommerceDiscountRule> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator) Returns an ordered range of all the commerce discount rules.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCommerceDiscountRuleModelImpl
.- Parameters:
start
- 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 commerce discount rules
-
findAll
List<CommerceDiscountRule> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRule> orderByComparator, boolean useFinderCache) Returns an ordered range of all the commerce discount rules.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCommerceDiscountRuleModelImpl
.- Parameters:
start
- 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 commerce discount rules
-
removeAll
void removeAll()Removes all the commerce discount rules from the database. -
countAll
int countAll()Returns the number of commerce discount rules.- Returns:
- the number of commerce discount rules
-