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

All Superinterfaces:
BasePersistence

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

View Source

Author:
Brian Wing Shun Chan

Method Summary
 int countAll()
           
 int countByG_U(long groupId, long userId)
           
 int countByGroupId(long groupId)
           
 int countByUserId(long userId)
           
 ShoppingCart create(long cartId)
           
 ShoppingCart fetchByG_U(long groupId, long userId)
           
 ShoppingCart fetchByPrimaryKey(long cartId)
           
 java.util.List<ShoppingCart> findAll()
           
 java.util.List<ShoppingCart> findAll(int start, int end)
           
 java.util.List<ShoppingCart> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCart findByG_U(long groupId, long userId)
           
 ShoppingCart findByGroupId_First(long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCart findByGroupId_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCart[] findByGroupId_PrevAndNext(long cartId, long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<ShoppingCart> findByGroupId(long groupId)
           
 java.util.List<ShoppingCart> findByGroupId(long groupId, int start, int end)
           
 java.util.List<ShoppingCart> findByGroupId(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCart findByPrimaryKey(long cartId)
           
 ShoppingCart findByUserId_First(long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCart findByUserId_Last(long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 ShoppingCart[] findByUserId_PrevAndNext(long cartId, long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<ShoppingCart> findByUserId(long userId)
           
 java.util.List<ShoppingCart> findByUserId(long userId, int start, int end)
           
 java.util.List<ShoppingCart> findByUserId(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 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)
           
 ShoppingCart remove(long cartId)
           
 ShoppingCart remove(ShoppingCart shoppingCart)
           
 void removeAll()
           
 void removeByG_U(long groupId, long userId)
           
 void removeByGroupId(long groupId)
           
 void removeByUserId(long userId)
           
 ShoppingCart update(ShoppingCart shoppingCart)
          Deprecated. Use update(ShoppingCart shoppingCart, boolean merge).
 ShoppingCart update(ShoppingCart shoppingCart, boolean merge)
          Add, update, or merge, the entity.
 ShoppingCart updateImpl(ShoppingCart shoppingCart, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
getListeners, registerListener, unregisterListener
 

Method Detail

create

ShoppingCart create(long cartId)

remove

ShoppingCart remove(long cartId)
                    throws com.liferay.portal.SystemException,
                           NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

remove

ShoppingCart remove(ShoppingCart shoppingCart)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

update

ShoppingCart update(ShoppingCart shoppingCart)
                    throws com.liferay.portal.SystemException
Deprecated. Use update(ShoppingCart shoppingCart, boolean merge).

Throws:
com.liferay.portal.SystemException

update

ShoppingCart update(ShoppingCart shoppingCart,
                    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:
shoppingCart - 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 shoppingCart 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

ShoppingCart updateImpl(ShoppingCart shoppingCart,
                        boolean merge)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByPrimaryKey

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCart findByPrimaryKey(long cartId)
                              throws com.liferay.portal.SystemException,
                                     NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

fetchByPrimaryKey

ShoppingCart fetchByPrimaryKey(long cartId)
                               throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByGroupId

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

findByGroupId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCart> 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<ShoppingCart> 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)
ShoppingCart findByGroupId_First(long groupId,
                                               com.liferay.portal.kernel.util.OrderByComparator obc)
                                 throws com.liferay.portal.SystemException,
                                        NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

findByGroupId_Last

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

findByGroupId_PrevAndNext

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

findByUserId

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

findByUserId

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

findByUserId

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

findByUserId_First

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCart findByUserId_First(long userId,
                                              com.liferay.portal.kernel.util.OrderByComparator obc)
                                throws com.liferay.portal.SystemException,
                                       NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

findByUserId_Last

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCart findByUserId_Last(long userId,
                                             com.liferay.portal.kernel.util.OrderByComparator obc)
                               throws com.liferay.portal.SystemException,
                                      NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

findByUserId_PrevAndNext

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCart[] findByUserId_PrevAndNext(long cartId,
                                                      long userId,
                                                      com.liferay.portal.kernel.util.OrderByComparator obc)
                                        throws com.liferay.portal.SystemException,
                                               NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

findByG_U

@Transactional(propagation=SUPPORTS,
               readOnly=true)
ShoppingCart findByG_U(long groupId,
                                     long userId)
                       throws com.liferay.portal.SystemException,
                              NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

fetchByG_U

ShoppingCart fetchByG_U(long groupId,
                        long userId)
                        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<ShoppingCart> findAll()
                                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

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

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<ShoppingCart> 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

removeByUserId

void removeByUserId(long userId)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByG_U

void removeByG_U(long groupId,
                 long userId)
                 throws com.liferay.portal.SystemException,
                        NoSuchCartException
Throws:
com.liferay.portal.SystemException
NoSuchCartException

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

countByUserId

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

countByG_U

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countByG_U(long groupId,
                             long userId)
               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