|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.shopping.service.persistence.ShoppingCouponUtil
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.
Never modify this class directly. Modify service.xml
and rerun ServiceBuilder to regenerate this 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()
Counts all the shopping coupons. |
static int |
countByCode(String code)
Counts all the shopping coupons where code = ?. |
static int |
countByGroupId(long groupId)
Counts all the shopping coupons where groupId = ?. |
long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static ShoppingCoupon |
create(long couponId)
Creates a new shopping coupon with the primary key. |
static ShoppingCoupon |
fetchByCode(String code)
Finds the shopping coupon where code = ? or returns null if it could not be found. |
static ShoppingCoupon |
fetchByCode(String code,
boolean retrieveFromCache)
Finds the shopping coupon where code = ? or returns null if it could not be found, optionally using the finder cache. |
static ShoppingCoupon |
fetchByPrimaryKey(long couponId)
Finds the shopping coupon with the primary key or returns null if it could not be found. |
static List<ShoppingCoupon> |
findAll()
Finds all the shopping coupons. |
static List<ShoppingCoupon> |
findAll(int start,
int end)
Finds a range of all the shopping coupons. |
static List<ShoppingCoupon> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the shopping coupons. |
static ShoppingCoupon |
findByCode(String code)
Finds the shopping coupon where code = ? or throws a NoSuchCouponException if it could not be found. |
static ShoppingCoupon |
findByGroupId_First(long groupId,
OrderByComparator orderByComparator)
Finds the first shopping coupon in the ordered set where groupId = ?. |
static ShoppingCoupon |
findByGroupId_Last(long groupId,
OrderByComparator orderByComparator)
Finds the last shopping coupon in the ordered set where groupId = ?. |
static ShoppingCoupon[] |
findByGroupId_PrevAndNext(long couponId,
long groupId,
OrderByComparator orderByComparator)
Finds the shopping coupons before and after the current shopping coupon in the ordered set where groupId = ?. |
static List<ShoppingCoupon> |
findByGroupId(long groupId)
Finds all the shopping coupons where groupId = ?. |
static List<ShoppingCoupon> |
findByGroupId(long groupId,
int start,
int end)
Finds a range of all the shopping coupons where groupId = ?. |
static List<ShoppingCoupon> |
findByGroupId(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the shopping coupons where groupId = ?. |
static ShoppingCoupon |
findByPrimaryKey(long couponId)
Finds 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 orderByComparator)
|
static ShoppingCouponPersistence |
getPersistence()
|
static ShoppingCoupon |
remove(long couponId)
Removes the shopping coupon with the primary key from the database. |
static ShoppingCoupon |
remove(ShoppingCoupon shoppingCoupon)
|
static void |
removeAll()
Removes all the shopping coupons from the database. |
static void |
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)
|
static ShoppingCoupon |
update(ShoppingCoupon shoppingCoupon,
boolean merge)
|
static ShoppingCoupon |
update(ShoppingCoupon shoppingCoupon,
boolean merge,
ServiceContext serviceContext)
|
static ShoppingCoupon |
updateImpl(ShoppingCoupon shoppingCoupon,
boolean merge)
|
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 long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<ShoppingCoupon> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<ShoppingCoupon> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<ShoppingCoupon> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static ShoppingCoupon remove(ShoppingCoupon shoppingCoupon) throws SystemException
SystemException
BasePersistence.remove(com.liferay.portal.model.BaseModel)
public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon, boolean merge) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)
public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon, boolean merge, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
public static void cacheResult(ShoppingCoupon shoppingCoupon)
shoppingCoupon
- the shopping coupon to cachepublic static void cacheResult(List<ShoppingCoupon> shoppingCoupons)
shoppingCoupons
- the shopping coupons to cachepublic static ShoppingCoupon create(long couponId)
couponId
- the primary key for the new shopping coupon
public static ShoppingCoupon remove(long couponId) throws SystemException, NoSuchCouponException
couponId
- the primary key of the shopping coupon to remove
NoSuchCouponException
- if a shopping coupon with the primary key could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon updateImpl(ShoppingCoupon shoppingCoupon, boolean merge) throws SystemException
SystemException
public static ShoppingCoupon findByPrimaryKey(long couponId) throws SystemException, NoSuchCouponException
NoSuchCouponException
if it could not be found.
couponId
- the primary key of the shopping coupon to find
NoSuchCouponException
- if a shopping coupon with the primary key could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon fetchByPrimaryKey(long couponId) throws SystemException
null
if it could not be found.
couponId
- the primary key of the shopping coupon to find
null
if a shopping coupon with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCoupon> findByGroupId(long groupId) throws SystemException
groupId
- the group id to search with
SystemException
- if a system exception occurredpublic static List<ShoppingCoupon> findByGroupId(long groupId, int start, int end) throws SystemException
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.
groupId
- the group id to search withstart
- the lower bound of the range of shopping coupons to returnend
- the upper bound of the range of shopping coupons to return (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCoupon> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
groupId
- the group id to search withstart
- the lower bound of the range of shopping coupons to returnend
- the upper bound of the range of shopping coupons to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic static ShoppingCoupon findByGroupId_First(long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCouponException
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.
groupId
- the group id to search withorderByComparator
- the comparator to order the set by
NoSuchCouponException
- if a matching shopping coupon could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon findByGroupId_Last(long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCouponException
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.
groupId
- the group id to search withorderByComparator
- the comparator to order the set by
NoSuchCouponException
- if a matching shopping coupon could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon[] findByGroupId_PrevAndNext(long couponId, long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchCouponException
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.
couponId
- the primary key of the current shopping coupongroupId
- the group id to search withorderByComparator
- the comparator to order the set by
NoSuchCouponException
- if a shopping coupon with the primary key could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon findByCode(String code) throws SystemException, NoSuchCouponException
NoSuchCouponException
if it could not be found.
code
- the code to search with
NoSuchCouponException
- if a matching shopping coupon could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon fetchByCode(String code) throws SystemException
null
if it could not be found. Uses the finder cache.
code
- the code to search with
null
if a matching shopping coupon could not be found
SystemException
- if a system exception occurredpublic static ShoppingCoupon fetchByCode(String code, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
code
- the code to search with
null
if a matching shopping coupon could not be found
SystemException
- if a system exception occurredpublic static List<ShoppingCoupon> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<ShoppingCoupon> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of shopping coupons to returnend
- the upper bound of the range of shopping coupons to return (not inclusive)
SystemException
- if a system exception occurredpublic static List<ShoppingCoupon> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
start
- the lower bound of the range of shopping coupons to returnend
- the upper bound of the range of shopping coupons to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic static void removeByGroupId(long groupId) throws SystemException
groupId
- the group id to search with
SystemException
- if a system exception occurredpublic static void removeByCode(String code) throws SystemException, NoSuchCouponException
code
- the code to search with
SystemException
- if a system exception occurred
NoSuchCouponException
public static void removeAll() throws SystemException
SystemException
- if a system exception occurredpublic static int countByGroupId(long groupId) throws SystemException
groupId
- the group id to search with
SystemException
- if a system exception occurredpublic static int countByCode(String code) throws SystemException
code
- the code to search with
SystemException
- if a system exception occurredpublic static int countAll() throws SystemException
SystemException
- if a system exception occurredpublic static ShoppingCouponPersistence getPersistence()
public void setPersistence(ShoppingCouponPersistence persistence)
|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |