public class CommerceDiscountRelUtil
extends java.lang.Object
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
CommerceDiscountRelPersistence
Constructor and Description |
---|
CommerceDiscountRelUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CommerceDiscountRel commerceDiscountRel)
Caches the commerce discount rel in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CommerceDiscountRel> commerceDiscountRels)
Caches the commerce discount rels in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CommerceDiscountRel commerceDiscountRel) |
static int |
countAll()
Returns the number of commerce discount rels.
|
static int |
countByCD_CN(long commerceDiscountId,
long classNameId)
Returns the number of commerce discount rels where commerceDiscountId = ? and classNameId = ?.
|
static int |
countByCN_CPK(long classNameId,
long classPK)
Returns the number of commerce discount rels where classNameId = ? and classPK = ?.
|
static int |
countByCommerceDiscountId(long commerceDiscountId)
Returns the number of commerce discount rels where commerceDiscountId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CommerceDiscountRel |
create(long commerceDiscountRelId)
Creates a new commerce discount rel with the primary key.
|
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 = ?.
|
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 = ?.
|
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 = ?.
|
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 = ?.
|
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 = ?.
|
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 = ?.
|
static CommerceDiscountRel |
fetchByPrimaryKey(long commerceDiscountRelId)
Returns the commerce discount rel with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CommerceDiscountRel> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CommerceDiscountRel> |
findAll()
Returns all the commerce discount rels.
|
static java.util.List<CommerceDiscountRel> |
findAll(int start,
int end)
Returns a range of all the commerce discount rels.
|
static java.util.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.
|
static java.util.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.
|
static CommerceDiscountRel |
findByCD_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 = ?.
|
static CommerceDiscountRel |
findByCD_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 = ?.
|
static CommerceDiscountRel[] |
findByCD_CN_PrevAndNext(long commerceDiscountRelId,
long commerceDiscountId,
long classNameId,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where commerceDiscountId = ? and classNameId = ?.
|
static java.util.List<CommerceDiscountRel> |
findByCD_CN(long commerceDiscountId,
long classNameId)
Returns all the commerce discount rels where commerceDiscountId = ? and classNameId = ?.
|
static java.util.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 = ?.
|
static java.util.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 = ?.
|
static java.util.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 = ?.
|
static CommerceDiscountRel |
findByCN_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 = ?.
|
static CommerceDiscountRel |
findByCN_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 = ?.
|
static CommerceDiscountRel[] |
findByCN_CPK_PrevAndNext(long commerceDiscountRelId,
long classNameId,
long classPK,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where classNameId = ? and classPK = ?.
|
static java.util.List<CommerceDiscountRel> |
findByCN_CPK(long classNameId,
long classPK)
Returns all the commerce discount rels where classNameId = ? and classPK = ?.
|
static java.util.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 = ?.
|
static java.util.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 = ?.
|
static java.util.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 = ?.
|
static CommerceDiscountRel |
findByCommerceDiscountId_First(long commerceDiscountId,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
Returns the first commerce discount rel in the ordered set where commerceDiscountId = ?.
|
static CommerceDiscountRel |
findByCommerceDiscountId_Last(long commerceDiscountId,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
Returns the last commerce discount rel in the ordered set where commerceDiscountId = ?.
|
static CommerceDiscountRel[] |
findByCommerceDiscountId_PrevAndNext(long commerceDiscountRelId,
long commerceDiscountId,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where commerceDiscountId = ?.
|
static java.util.List<CommerceDiscountRel> |
findByCommerceDiscountId(long commerceDiscountId)
Returns all the commerce discount rels where commerceDiscountId = ?.
|
static java.util.List<CommerceDiscountRel> |
findByCommerceDiscountId(long commerceDiscountId,
int start,
int end)
Returns a range of all the commerce discount rels where commerceDiscountId = ?.
|
static java.util.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 = ?.
|
static java.util.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 = ?.
|
static CommerceDiscountRel |
findByPrimaryKey(long commerceDiscountRelId)
Returns the commerce discount rel with the primary key or throws a
NoSuchDiscountRelException if it could not be found. |
static java.util.List<CommerceDiscountRel> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CommerceDiscountRel> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CommerceDiscountRel> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) |
static CommerceDiscountRelPersistence |
getPersistence() |
static CommerceDiscountRel |
remove(long commerceDiscountRelId)
Removes the commerce discount rel with the primary key from the database.
|
static void |
removeAll()
Removes all the commerce discount rels from the database.
|
static void |
removeByCD_CN(long commerceDiscountId,
long classNameId)
Removes all the commerce discount rels where commerceDiscountId = ? and classNameId = ? from the database.
|
static void |
removeByCN_CPK(long classNameId,
long classPK)
Removes all the commerce discount rels where classNameId = ? and classPK = ? from the database.
|
static void |
removeByCommerceDiscountId(long commerceDiscountId)
Removes all the commerce discount rels where commerceDiscountId = ? from the database.
|
static CommerceDiscountRel |
update(CommerceDiscountRel commerceDiscountRel) |
static CommerceDiscountRel |
update(CommerceDiscountRel commerceDiscountRel,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CommerceDiscountRel |
updateImpl(CommerceDiscountRel commerceDiscountRel) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CommerceDiscountRel commerceDiscountRel)
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,CommerceDiscountRel> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CommerceDiscountRel> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CommerceDiscountRel> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CommerceDiscountRel> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CommerceDiscountRel update(CommerceDiscountRel commerceDiscountRel)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CommerceDiscountRel update(CommerceDiscountRel commerceDiscountRel, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId)
commerceDiscountId
- the commerce discount IDpublic static java.util.List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId, 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
commerceDiscountId
- the commerce discount IDstart
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)public static java.util.List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
commerceDiscountId
- the commerce discount IDstart
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CommerceDiscountRel> findByCommerceDiscountId(long commerceDiscountId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
commerceDiscountId
- the commerce discount IDstart
- the lower bound of the range of commerce discount relsend
- 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 cachepublic static CommerceDiscountRel findByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountId
- the commerce discount IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel fetchByCommerceDiscountId_First(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
commerceDiscountId
- the commerce discount IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel findByCommerceDiscountId_Last(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountId
- the commerce discount IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel fetchByCommerceDiscountId_Last(long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
commerceDiscountId
- the commerce discount IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel[] findByCommerceDiscountId_PrevAndNext(long commerceDiscountRelId, long commerceDiscountId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountRelId
- the primary key of the current commerce discount relcommerceDiscountId
- the commerce discount IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a commerce discount rel with the primary key could not be foundpublic static void removeByCommerceDiscountId(long commerceDiscountId)
commerceDiscountId
- the commerce discount IDpublic static int countByCommerceDiscountId(long commerceDiscountId)
commerceDiscountId
- the commerce discount IDpublic static java.util.List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId)
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDpublic static java.util.List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId, 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDstart
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)public static java.util.List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDstart
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDstart
- the lower bound of the range of commerce discount relsend
- 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 cachepublic static CommerceDiscountRel findByCD_CN_First(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel fetchByCD_CN_First(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel findByCD_CN_Last(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel fetchByCD_CN_Last(long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel[] findByCD_CN_PrevAndNext(long commerceDiscountRelId, long commerceDiscountId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountRelId
- the primary key of the current commerce discount relcommerceDiscountId
- the commerce discount IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a commerce discount rel with the primary key could not be foundpublic static void removeByCD_CN(long commerceDiscountId, long classNameId)
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDpublic static int countByCD_CN(long commerceDiscountId, long classNameId)
commerceDiscountId
- the commerce discount IDclassNameId
- the class name IDpublic static java.util.List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static java.util.List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK, 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
classNameId
- the class name IDclassPK
- the class pkstart
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)public static java.util.List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
classNameId
- the class name IDclassPK
- the class pkstart
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CommerceDiscountRel> findByCN_CPK(long classNameId, long classPK, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
classNameId
- the class name IDclassPK
- the class pkstart
- the lower bound of the range of commerce discount relsend
- 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 cachepublic static CommerceDiscountRel findByCN_CPK_First(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel fetchByCN_CPK_First(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel findByCN_CPK_Last(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel fetchByCN_CPK_Last(long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator)
classNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching commerce discount rel could not be foundpublic static CommerceDiscountRel[] findByCN_CPK_PrevAndNext(long commerceDiscountRelId, long classNameId, long classPK, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> orderByComparator) throws NoSuchDiscountRelException
commerceDiscountRelId
- the primary key of the current commerce discount relclassNameId
- the class name IDclassPK
- the class pkorderByComparator
- the comparator to order the set by (optionally null
)NoSuchDiscountRelException
- if a commerce discount rel with the primary key could not be foundpublic static void removeByCN_CPK(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static int countByCN_CPK(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static void cacheResult(CommerceDiscountRel commerceDiscountRel)
commerceDiscountRel
- the commerce discount relpublic static void cacheResult(java.util.List<CommerceDiscountRel> commerceDiscountRels)
commerceDiscountRels
- the commerce discount relspublic static CommerceDiscountRel create(long commerceDiscountRelId)
commerceDiscountRelId
- the primary key for the new commerce discount relpublic static CommerceDiscountRel remove(long commerceDiscountRelId) throws NoSuchDiscountRelException
commerceDiscountRelId
- the primary key of the commerce discount relNoSuchDiscountRelException
- if a commerce discount rel with the primary key could not be foundpublic static CommerceDiscountRel updateImpl(CommerceDiscountRel commerceDiscountRel)
public static CommerceDiscountRel findByPrimaryKey(long commerceDiscountRelId) throws NoSuchDiscountRelException
NoSuchDiscountRelException
if it could not be found.commerceDiscountRelId
- the primary key of the commerce discount relNoSuchDiscountRelException
- if a commerce discount rel with the primary key could not be foundpublic static CommerceDiscountRel fetchByPrimaryKey(long commerceDiscountRelId)
null
if it could not be found.commerceDiscountRelId
- the primary key of the commerce discount relnull
if a commerce discount rel with the primary key could not be foundpublic static java.util.List<CommerceDiscountRel> findAll()
public static java.util.List<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
start
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)public static java.util.List<CommerceDiscountRel> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
start
- the lower bound of the range of commerce discount relsend
- the upper bound of the range of commerce discount rels (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CommerceDiscountRel> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceDiscountRel> 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, then the query will include the default ORDER BY logic from CommerceDiscountRelModelImpl
.
start
- the lower bound of the range of commerce discount relsend
- 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 cachepublic static void removeAll()
public static int countAll()
public static CommerceDiscountRelPersistence getPersistence()