1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  import com.liferay.portlet.shopping.model.ShoppingCart;
28  
29  /**
30   * <a href="ShoppingCartPersistence.java.html"><b><i>View Source</i></b></a>
31   *
32   * <p>
33   * ServiceBuilder generated this class. Modifications in this class will be
34   * overwritten the next time is generated.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       ShoppingCartPersistenceImpl
39   * @see       ShoppingCartUtil
40   * @generated
41   */
42  public interface ShoppingCartPersistence extends BasePersistence<ShoppingCart> {
43      public void cacheResult(
44          com.liferay.portlet.shopping.model.ShoppingCart shoppingCart);
45  
46      public void cacheResult(
47          java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> shoppingCarts);
48  
49      public com.liferay.portlet.shopping.model.ShoppingCart create(long cartId);
50  
51      public com.liferay.portlet.shopping.model.ShoppingCart remove(long cartId)
52          throws com.liferay.portal.SystemException,
53              com.liferay.portlet.shopping.NoSuchCartException;
54  
55      /**
56       * @deprecated Use {@link BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)}.
57       */
58      public com.liferay.portlet.shopping.model.ShoppingCart update(
59          com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
60          throws com.liferay.portal.SystemException;
61  
62      public com.liferay.portlet.shopping.model.ShoppingCart updateImpl(
63          com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
64          boolean merge) throws com.liferay.portal.SystemException;
65  
66      public com.liferay.portlet.shopping.model.ShoppingCart findByPrimaryKey(
67          long cartId)
68          throws com.liferay.portal.SystemException,
69              com.liferay.portlet.shopping.NoSuchCartException;
70  
71      public com.liferay.portlet.shopping.model.ShoppingCart fetchByPrimaryKey(
72          long cartId) throws com.liferay.portal.SystemException;
73  
74      public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
75          long groupId) throws com.liferay.portal.SystemException;
76  
77      public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
78          long groupId, int start, int end)
79          throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
82          long groupId, int start, int end,
83          com.liferay.portal.kernel.util.OrderByComparator obc)
84          throws com.liferay.portal.SystemException;
85  
86      public com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_First(
87          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
88          throws com.liferay.portal.SystemException,
89              com.liferay.portlet.shopping.NoSuchCartException;
90  
91      public com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
92          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
93          throws com.liferay.portal.SystemException,
94              com.liferay.portlet.shopping.NoSuchCartException;
95  
96      public com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
97          long cartId, long groupId,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException,
100             com.liferay.portlet.shopping.NoSuchCartException;
101 
102     public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
103         long userId) throws com.liferay.portal.SystemException;
104 
105     public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
106         long userId, int start, int end)
107         throws com.liferay.portal.SystemException;
108 
109     public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
110         long userId, int start, int end,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException;
113 
114     public com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
115         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.shopping.NoSuchCartException;
118 
119     public com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
120         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.shopping.NoSuchCartException;
123 
124     public com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
125         long cartId, long userId,
126         com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.shopping.NoSuchCartException;
129 
130     public com.liferay.portlet.shopping.model.ShoppingCart findByG_U(
131         long groupId, long userId)
132         throws com.liferay.portal.SystemException,
133             com.liferay.portlet.shopping.NoSuchCartException;
134 
135     public com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
136         long groupId, long userId) throws com.liferay.portal.SystemException;
137 
138     public com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
139         long groupId, long userId, boolean retrieveFromCache)
140         throws com.liferay.portal.SystemException;
141 
142     public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll()
143         throws com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
146         int start, int end) throws com.liferay.portal.SystemException;
147 
148     public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
149         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException;
151 
152     public void removeByGroupId(long groupId)
153         throws com.liferay.portal.SystemException;
154 
155     public void removeByUserId(long userId)
156         throws com.liferay.portal.SystemException;
157 
158     public void removeByG_U(long groupId, long userId)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.shopping.NoSuchCartException;
161 
162     public void removeAll() throws com.liferay.portal.SystemException;
163 
164     public int countByGroupId(long groupId)
165         throws com.liferay.portal.SystemException;
166 
167     public int countByUserId(long userId)
168         throws com.liferay.portal.SystemException;
169 
170     public int countByG_U(long groupId, long userId)
171         throws com.liferay.portal.SystemException;
172 
173     public int countAll() throws com.liferay.portal.SystemException;
174 }