public class CommerceDiscountUsageEntryUtil
extends java.lang.Object
com.liferay.commerce.discount.service.persistence.impl.CommerceDiscountUsageEntryPersistenceImpl 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
CommerceDiscountUsageEntryPersistence| Constructor and Description |
|---|
CommerceDiscountUsageEntryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cacheResult(CommerceDiscountUsageEntry commerceDiscountUsageEntry)
Caches the commerce discount usage entry in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CommerceDiscountUsageEntry> commerceDiscountUsageEntries)
Caches the commerce discount usage entries in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CommerceDiscountUsageEntry commerceDiscountUsageEntry) |
static int |
countAll()
Returns the number of commerce discount usage entries.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CommerceDiscountUsageEntry |
create(long commerceDiscountUsageEntryId)
Creates a new commerce discount usage entry with the primary key.
|
static CommerceDiscountUsageEntry |
fetchByPrimaryKey(long commerceDiscountUsageEntryId)
Returns the commerce discount usage entry with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CommerceDiscountUsageEntry> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CommerceDiscountUsageEntry> |
findAll()
Returns all the commerce discount usage entries.
|
static java.util.List<CommerceDiscountUsageEntry> |
findAll(int start,
int end)
Returns a range of all the commerce discount usage entries.
|
static java.util.List<CommerceDiscountUsageEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountUsageEntry> orderByComparator)
Returns an ordered range of all the commerce discount usage entries.
|
static java.util.List<CommerceDiscountUsageEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountUsageEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the commerce discount usage entries.
|
static CommerceDiscountUsageEntry |
findByPrimaryKey(long commerceDiscountUsageEntryId)
Returns the commerce discount usage entry with the primary key or throws a
NoSuchDiscountUsageEntryException if it could not be found. |
static java.util.List<CommerceDiscountUsageEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CommerceDiscountUsageEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CommerceDiscountUsageEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountUsageEntry> orderByComparator) |
static CommerceDiscountUsageEntryPersistence |
getPersistence() |
static CommerceDiscountUsageEntry |
remove(long commerceDiscountUsageEntryId)
Removes the commerce discount usage entry with the primary key from the database.
|
static void |
removeAll()
Removes all the commerce discount usage entries from the database.
|
static CommerceDiscountUsageEntry |
update(CommerceDiscountUsageEntry commerceDiscountUsageEntry) |
static CommerceDiscountUsageEntry |
update(CommerceDiscountUsageEntry commerceDiscountUsageEntry,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CommerceDiscountUsageEntry |
updateImpl(CommerceDiscountUsageEntry commerceDiscountUsageEntry) |
public static void clearCache()
BasePersistence.clearCache()public static void clearCache(CommerceDiscountUsageEntry commerceDiscountUsageEntry)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)public static java.util.Map<java.io.Serializable,CommerceDiscountUsageEntry> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)public static java.util.List<CommerceDiscountUsageEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)public static java.util.List<CommerceDiscountUsageEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)public static java.util.List<CommerceDiscountUsageEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountUsageEntry> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)public static CommerceDiscountUsageEntry update(CommerceDiscountUsageEntry commerceDiscountUsageEntry)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)public static CommerceDiscountUsageEntry update(CommerceDiscountUsageEntry commerceDiscountUsageEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)public static void cacheResult(CommerceDiscountUsageEntry commerceDiscountUsageEntry)
commerceDiscountUsageEntry - the commerce discount usage entrypublic static void cacheResult(java.util.List<CommerceDiscountUsageEntry> commerceDiscountUsageEntries)
commerceDiscountUsageEntries - the commerce discount usage entriespublic static CommerceDiscountUsageEntry create(long commerceDiscountUsageEntryId)
commerceDiscountUsageEntryId - the primary key for the new commerce discount usage entrypublic static CommerceDiscountUsageEntry remove(long commerceDiscountUsageEntryId) throws NoSuchDiscountUsageEntryException
commerceDiscountUsageEntryId - the primary key of the commerce discount usage entryNoSuchDiscountUsageEntryException - if a commerce discount usage entry with the primary key could not be foundpublic static CommerceDiscountUsageEntry updateImpl(CommerceDiscountUsageEntry commerceDiscountUsageEntry)
public static CommerceDiscountUsageEntry findByPrimaryKey(long commerceDiscountUsageEntryId) throws NoSuchDiscountUsageEntryException
NoSuchDiscountUsageEntryException if it could not be found.commerceDiscountUsageEntryId - the primary key of the commerce discount usage entryNoSuchDiscountUsageEntryException - if a commerce discount usage entry with the primary key could not be foundpublic static CommerceDiscountUsageEntry fetchByPrimaryKey(long commerceDiscountUsageEntryId)
null if it could not be found.commerceDiscountUsageEntryId - the primary key of the commerce discount usage entrynull if a commerce discount usage entry with the primary key could not be foundpublic static java.util.List<CommerceDiscountUsageEntry> findAll()
public static java.util.List<CommerceDiscountUsageEntry> findAll(int start, int end)
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 and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from CommerceDiscountUsageEntryModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start - the lower bound of the range of commerce discount usage entriesend - the upper bound of the range of commerce discount usage entries (not inclusive)public static java.util.List<CommerceDiscountUsageEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountUsageEntry> orderByComparator)
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 and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from CommerceDiscountUsageEntryModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start - the lower bound of the range of commerce discount usage entriesend - the upper bound of the range of commerce discount usage entries (not inclusive)orderByComparator - the comparator to order the results by (optionally null)public static java.util.List<CommerceDiscountUsageEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountUsageEntry> orderByComparator, boolean useFinderCache)
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 and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from CommerceDiscountUsageEntryModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start - the lower bound of the range of commerce discount usage entriesend - the upper bound of the range of commerce discount usage entries (not inclusive)orderByComparator - the comparator to order the results by (optionally null)useFinderCache - whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static CommerceDiscountUsageEntryPersistence getPersistence()