com.liferay.portlet.shopping.service.persistence
Interface ShoppingCouponPersistence

All Superinterfaces:
BasePersistence

@Transactional(rollbackFor={com.liferay.portal.PortalException.class,com.liferay.portal.SystemException.class})
public interface ShoppingCouponPersistence
extends BasePersistence

View Source

Author:
Brian Wing Shun Chan

Method Summary
 int countAll()
           
 int countByCode(java.lang.String code)
           
 int countByGroupId(long groupId)
           
 ShoppingCoupon create(long couponId)
           
 ShoppingCoupon fetchByCode(java.lang.String code)
           
 ShoppingCoupon fetchByPrimaryKey(long couponId)
           
 java.util.List<ShoppingCoupon> findAll()
           
 java.util.List<ShoppingCoupon> findAll(int start, int end)
           
 java.util.List<ShoppingCoupon> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCoupon findByCode(java.lang.String code)
           
 ShoppingCoupon findByGroupId_First(long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCoupon findByGroupId_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCoupon[] findByGroupId_PrevAndNext(long couponId, long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<ShoppingCoupon> findByGroupId(long groupId)
           
 java.util.List<ShoppingCoupon> findByGroupId(long groupId, int start, int end)
           
 java.util.List<ShoppingCoupon> findByGroupId(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCoupon findByPrimaryKey(long couponId)
           
 java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
           
 java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
           
 ShoppingCoupon remove(long couponId)
           
 ShoppingCoupon remove(ShoppingCoupon shoppingCoupon)
           
 void removeAll()
           
 void removeByCode(java.lang.String code)
           
 void removeByGroupId(long groupId)
           
 ShoppingCoupon update(ShoppingCoupon shoppingCoupon)
          Deprecated. Use update(ShoppingCoupon shoppingCoupon, boolean merge).
 ShoppingCoupon update(ShoppingCoupon shoppingCoupon, boolean merge)
          Add, update, or merge, the entity.
 ShoppingCoupon updateImpl(ShoppingCoupon shoppingCoupon, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
getListeners, registerListener, unregisterListener
 

Method Detail

create

ShoppingCoupon create(long couponId)

remove

ShoppingCoupon remove(long couponId)
                      throws com.liferay.portal.SystemException,
                             NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

remove

ShoppingCoupon remove(ShoppingCoupon shoppingCoupon)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

update

ShoppingCoupon update(ShoppingCoupon shoppingCoupon)
                      throws com.liferay.portal.SystemException
Deprecated. Use update(ShoppingCoupon shoppingCoupon, boolean merge).

Throws:
com.liferay.portal.SystemException

update

ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
                      boolean merge)
                      throws com.liferay.portal.SystemException
Add, update, or merge, the entity. This method also calls the model listeners to trigger the proper events associated with adding, deleting, or updating an entity.

Parameters:
shoppingCoupon - the entity to add, update, or merge
merge - boolean value for whether to merge the entity. The default value is false. Setting merge to true is more expensive and should only be true when shoppingCoupon is transient. See LEP-5473 for a detailed discussion of this method.
Returns:
true if the portlet can be displayed via Ajax
Throws:
com.liferay.portal.SystemException

updateImpl

ShoppingCoupon updateImpl(ShoppingCoupon shoppingCoupon,
                          boolean merge)
                          throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByPrimaryKey

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCoupon findByPrimaryKey(long couponId)
                                throws com.liferay.portal.SystemException,
                                       NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

fetchByPrimaryKey

ShoppingCoupon fetchByPrimaryKey(long couponId)
                                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCoupon> findByGroupId(long groupId)
                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCoupon> findByGroupId(long groupId,
                                                           int start,
                                                           int end)
                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCoupon> findByGroupId(long groupId,
                                                           int start,
                                                           int end,
                                                           com.liferay.portal.kernel.util.OrderByComparator obc)
                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByGroupId_First

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCoupon findByGroupId_First(long groupId,
                                                 com.liferay.portal.kernel.util.OrderByComparator obc)
                                   throws com.liferay.portal.SystemException,
                                          NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

findByGroupId_Last

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCoupon findByGroupId_Last(long groupId,
                                                com.liferay.portal.kernel.util.OrderByComparator obc)
                                  throws com.liferay.portal.SystemException,
                                         NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

findByGroupId_PrevAndNext

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCoupon[] findByGroupId_PrevAndNext(long couponId,
                                                         long groupId,
                                                         com.liferay.portal.kernel.util.OrderByComparator obc)
                                           throws com.liferay.portal.SystemException,
                                                  NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

findByCode

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCoupon findByCode(java.lang.String code)
                          throws com.liferay.portal.SystemException,
                                 NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

fetchByCode

ShoppingCoupon fetchByCode(java.lang.String code)
                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
                                                                    int start,
                                                                    int end)
                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCoupon> findAll()
                                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCoupon> findAll(int start,
                                                     int end)
                                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCoupon> findAll(int start,
                                                     int end,
                                                     com.liferay.portal.kernel.util.OrderByComparator obc)
                                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByGroupId

void removeByGroupId(long groupId)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByCode

void removeByCode(java.lang.String code)
                  throws com.liferay.portal.SystemException,
                         NoSuchCouponException
Throws:
com.liferay.portal.SystemException
NoSuchCouponException

removeAll

void removeAll()
               throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countByGroupId(long groupId)
                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByCode

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countByCode(java.lang.String code)
                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countAll()
             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException