|
Liferay 7.0-ce-m3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portlet.shopping.service.persistence.ShoppingCouponUtil
@ProviderType public class ShoppingCouponUtil
The persistence utility for the shopping coupon service. This utility wraps ShoppingCouponPersistenceImpl 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
ShoppingCouponPersistence,
ShoppingCouponPersistenceImpl| Constructor Summary | |
|---|---|
ShoppingCouponUtil()
|
|
| Method Summary | |
|---|---|
static void |
cacheResult(List<ShoppingCoupon> shoppingCoupons)
Caches the shopping coupons in the entity cache if it is enabled. |
static void |
cacheResult(ShoppingCoupon shoppingCoupon)
Caches the shopping coupon in the entity cache if it is enabled. |
static void |
clearCache()
|
static void |
clearCache(ShoppingCoupon shoppingCoupon)
|
static int |
countAll()
Returns the number of shopping coupons. |
static int |
countByCode(String code)
Returns the number of shopping coupons where code = ?. |
static int |
countByGroupId(long groupId)
Returns the number of shopping coupons where groupId = ?. |
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static ShoppingCoupon |
create(long couponId)
Creates a new shopping coupon with the primary key. |
static ShoppingCoupon |
fetchByCode(String code)
Returns the shopping coupon where code = ? or returns null if it could not be found. |
static ShoppingCoupon |
fetchByCode(String code,
boolean retrieveFromCache)
Returns the shopping coupon where code = ? or returns null if it could not be found, optionally using the finder cache. |
static ShoppingCoupon |
fetchByGroupId_First(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns the first shopping coupon in the ordered set where groupId = ?. |
static ShoppingCoupon |
fetchByGroupId_Last(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns the last shopping coupon in the ordered set where groupId = ?. |
static ShoppingCoupon |
fetchByPrimaryKey(long couponId)
Returns the shopping coupon with the primary key or returns null if it could not be found. |
static Map<Serializable,ShoppingCoupon> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys)
|
static List<ShoppingCoupon> |
findAll()
Returns all the shopping coupons. |
static List<ShoppingCoupon> |
findAll(int start,
int end)
Returns a range of all the shopping coupons. |
static List<ShoppingCoupon> |
findAll(int start,
int end,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns an ordered range of all the shopping coupons. |
static ShoppingCoupon |
findByCode(String code)
Returns the shopping coupon where code = ? or throws a NoSuchCouponException if it could not be found. |
static ShoppingCoupon |
findByGroupId_First(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns the first shopping coupon in the ordered set where groupId = ?. |
static ShoppingCoupon |
findByGroupId_Last(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns the last shopping coupon in the ordered set where groupId = ?. |
static ShoppingCoupon[] |
findByGroupId_PrevAndNext(long couponId,
long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns the shopping coupons before and after the current shopping coupon in the ordered set where groupId = ?. |
static List<ShoppingCoupon> |
findByGroupId(long groupId)
Returns all the shopping coupons where groupId = ?. |
static List<ShoppingCoupon> |
findByGroupId(long groupId,
int start,
int end)
Returns a range of all the shopping coupons where groupId = ?. |
static List<ShoppingCoupon> |
findByGroupId(long groupId,
int start,
int end,
OrderByComparator<ShoppingCoupon> orderByComparator)
Returns an ordered range of all the shopping coupons where groupId = ?. |
static ShoppingCoupon |
findByPrimaryKey(long couponId)
Returns the shopping coupon with the primary key or throws a NoSuchCouponException if it could not be found. |
static List<ShoppingCoupon> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<ShoppingCoupon> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List<ShoppingCoupon> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<ShoppingCoupon> orderByComparator)
|
static ShoppingCouponPersistence |
getPersistence()
|
static ShoppingCoupon |
remove(long couponId)
Removes the shopping coupon with the primary key from the database. |
static void |
removeAll()
Removes all the shopping coupons from the database. |
static ShoppingCoupon |
removeByCode(String code)
Removes the shopping coupon where code = ? from the database. |
static void |
removeByGroupId(long groupId)
Removes all the shopping coupons where groupId = ? from the database. |
void |
setPersistence(ShoppingCouponPersistence persistence)
Deprecated. As of 6.2.0 |
static ShoppingCoupon |
update(ShoppingCoupon shoppingCoupon)
|
static ShoppingCoupon |
update(ShoppingCoupon shoppingCoupon,
ServiceContext serviceContext)
|
static ShoppingCoupon |
updateImpl(ShoppingCoupon shoppingCoupon)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShoppingCouponUtil()
| Method Detail |
|---|
public static void clearCache()
BasePersistence.clearCache()public static void clearCache(ShoppingCoupon shoppingCoupon)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)public static List<ShoppingCoupon> findWithDynamicQuery(DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<ShoppingCoupon> findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<ShoppingCoupon> findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<ShoppingCoupon> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon)
BasePersistence.update(com.liferay.portal.model.BaseModel)
public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)public static List<ShoppingCoupon> findByGroupId(long groupId)
groupId - the group ID
public static List<ShoppingCoupon> findByGroupId(long groupId,
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 com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl. 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.
groupId - the group IDstart - the lower bound of the range of shopping couponsend - the upper bound of the range of shopping coupons (not inclusive)
public static List<ShoppingCoupon> findByGroupId(long groupId,
int start,
int end,
OrderByComparator<ShoppingCoupon> 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 com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl. 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.
groupId - the group IDstart - the lower bound of the range of shopping couponsend - the upper bound of the range of shopping coupons (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
public static ShoppingCoupon findByGroupId_First(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
throws NoSuchCouponException
groupId - the group IDorderByComparator - the comparator to order the set by (optionally null)
NoSuchCouponException - if a matching shopping coupon could not be found
public static ShoppingCoupon fetchByGroupId_First(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
groupId - the group IDorderByComparator - the comparator to order the set by (optionally null)
null if a matching shopping coupon could not be found
public static ShoppingCoupon findByGroupId_Last(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
throws NoSuchCouponException
groupId - the group IDorderByComparator - the comparator to order the set by (optionally null)
NoSuchCouponException - if a matching shopping coupon could not be found
public static ShoppingCoupon fetchByGroupId_Last(long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
groupId - the group IDorderByComparator - the comparator to order the set by (optionally null)
null if a matching shopping coupon could not be found
public static ShoppingCoupon[] findByGroupId_PrevAndNext(long couponId,
long groupId,
OrderByComparator<ShoppingCoupon> orderByComparator)
throws NoSuchCouponException
couponId - the primary key of the current shopping coupongroupId - the group IDorderByComparator - the comparator to order the set by (optionally null)
NoSuchCouponException - if a shopping coupon with the primary key could not be foundpublic static void removeByGroupId(long groupId)
groupId - the group IDpublic static int countByGroupId(long groupId)
groupId - the group ID
public static ShoppingCoupon findByCode(String code)
throws NoSuchCouponException
NoSuchCouponException if it could not be found.
code - the code
NoSuchCouponException - if a matching shopping coupon could not be foundpublic static ShoppingCoupon fetchByCode(String code)
null if it could not be found. Uses the finder cache.
code - the code
null if a matching shopping coupon could not be found
public static ShoppingCoupon fetchByCode(String code,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
code - the coderetrieveFromCache - whether to use the finder cache
null if a matching shopping coupon could not be found
public static ShoppingCoupon removeByCode(String code)
throws NoSuchCouponException
code - the code
NoSuchCouponExceptionpublic static int countByCode(String code)
code - the code
public static void cacheResult(ShoppingCoupon shoppingCoupon)
shoppingCoupon - the shopping couponpublic static void cacheResult(List<ShoppingCoupon> shoppingCoupons)
shoppingCoupons - the shopping couponspublic static ShoppingCoupon create(long couponId)
couponId - the primary key for the new shopping coupon
public static ShoppingCoupon remove(long couponId)
throws NoSuchCouponException
couponId - the primary key of the shopping coupon
NoSuchCouponException - if a shopping coupon with the primary key could not be foundpublic static ShoppingCoupon updateImpl(ShoppingCoupon shoppingCoupon)
public static ShoppingCoupon findByPrimaryKey(long couponId)
throws NoSuchCouponException
NoSuchCouponException if it could not be found.
couponId - the primary key of the shopping coupon
NoSuchCouponException - if a shopping coupon with the primary key could not be foundpublic static ShoppingCoupon fetchByPrimaryKey(long couponId)
null if it could not be found.
couponId - the primary key of the shopping coupon
null if a shopping coupon with the primary key could not be foundpublic static Map<Serializable,ShoppingCoupon> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
public static List<ShoppingCoupon> findAll()
public static List<ShoppingCoupon> 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 com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl. 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 shopping couponsend - the upper bound of the range of shopping coupons (not inclusive)
public static List<ShoppingCoupon> findAll(int start,
int end,
OrderByComparator<ShoppingCoupon> 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 com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl. 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 shopping couponsend - the upper bound of the range of shopping coupons (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
public static void removeAll()
public static int countAll()
public static ShoppingCouponPersistence getPersistence()
@Deprecated public void setPersistence(ShoppingCouponPersistence persistence)
|
Liferay 7.0-ce-m3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||