1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.shopping.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="ShoppingOrderPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface ShoppingOrderPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> shoppingOrders);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.shopping.model.ShoppingOrder create(long orderId);
40  
41      public com.liferay.portlet.shopping.model.ShoppingOrder remove(long orderId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.shopping.NoSuchOrderException;
44  
45      public com.liferay.portlet.shopping.model.ShoppingOrder remove(
46          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(ShoppingOrder shoppingOrder, boolean merge)</code>.
51       */
52      public com.liferay.portlet.shopping.model.ShoppingOrder update(
53          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        shoppingOrder the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when shoppingOrder is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portlet.shopping.model.ShoppingOrder update(
70          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.shopping.model.ShoppingOrder updateImpl(
74          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portlet.shopping.model.ShoppingOrder findByPrimaryKey(
78          long orderId)
79          throws com.liferay.portal.SystemException,
80              com.liferay.portlet.shopping.NoSuchOrderException;
81  
82      public com.liferay.portlet.shopping.model.ShoppingOrder fetchByPrimaryKey(
83          long orderId) throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByGroupId(
86          long groupId) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByGroupId(
89          long groupId, int start, int end)
90          throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByGroupId(
93          long groupId, int start, int end,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.shopping.model.ShoppingOrder findByGroupId_First(
98          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException,
100             com.liferay.portlet.shopping.NoSuchOrderException;
101 
102     public com.liferay.portlet.shopping.model.ShoppingOrder findByGroupId_Last(
103         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException,
105             com.liferay.portlet.shopping.NoSuchOrderException;
106 
107     public com.liferay.portlet.shopping.model.ShoppingOrder[] findByGroupId_PrevAndNext(
108         long orderId, long groupId,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.shopping.NoSuchOrderException;
112 
113     public com.liferay.portlet.shopping.model.ShoppingOrder findByNumber(
114         java.lang.String number)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.shopping.NoSuchOrderException;
117 
118     public com.liferay.portlet.shopping.model.ShoppingOrder fetchByNumber(
119         java.lang.String number) throws com.liferay.portal.SystemException;
120 
121     public com.liferay.portlet.shopping.model.ShoppingOrder fetchByNumber(
122         java.lang.String number, boolean retrieveFromCache)
123         throws com.liferay.portal.SystemException;
124 
125     public com.liferay.portlet.shopping.model.ShoppingOrder findByPPTxnId(
126         java.lang.String ppTxnId)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.shopping.NoSuchOrderException;
129 
130     public com.liferay.portlet.shopping.model.ShoppingOrder fetchByPPTxnId(
131         java.lang.String ppTxnId) throws com.liferay.portal.SystemException;
132 
133     public com.liferay.portlet.shopping.model.ShoppingOrder fetchByPPTxnId(
134         java.lang.String ppTxnId, boolean retrieveFromCache)
135         throws com.liferay.portal.SystemException;
136 
137     public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByG_U_PPPS(
138         long groupId, long userId, java.lang.String ppPaymentStatus)
139         throws com.liferay.portal.SystemException;
140 
141     public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByG_U_PPPS(
142         long groupId, long userId, java.lang.String ppPaymentStatus, int start,
143         int end) throws com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByG_U_PPPS(
146         long groupId, long userId, java.lang.String ppPaymentStatus, int start,
147         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException;
149 
150     public com.liferay.portlet.shopping.model.ShoppingOrder findByG_U_PPPS_First(
151         long groupId, long userId, java.lang.String ppPaymentStatus,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.shopping.NoSuchOrderException;
155 
156     public com.liferay.portlet.shopping.model.ShoppingOrder findByG_U_PPPS_Last(
157         long groupId, long userId, java.lang.String ppPaymentStatus,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.shopping.NoSuchOrderException;
161 
162     public com.liferay.portlet.shopping.model.ShoppingOrder[] findByG_U_PPPS_PrevAndNext(
163         long orderId, long groupId, long userId,
164         java.lang.String ppPaymentStatus,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.shopping.NoSuchOrderException;
168 
169     public java.util.List<Object> findWithDynamicQuery(
170         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
171         throws com.liferay.portal.SystemException;
172 
173     public java.util.List<Object> findWithDynamicQuery(
174         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
175         int end) throws com.liferay.portal.SystemException;
176 
177     public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findAll()
178         throws com.liferay.portal.SystemException;
179 
180     public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findAll(
181         int start, int end) throws com.liferay.portal.SystemException;
182 
183     public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findAll(
184         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException;
186 
187     public void removeByGroupId(long groupId)
188         throws com.liferay.portal.SystemException;
189 
190     public void removeByNumber(java.lang.String number)
191         throws com.liferay.portal.SystemException,
192             com.liferay.portlet.shopping.NoSuchOrderException;
193 
194     public void removeByPPTxnId(java.lang.String ppTxnId)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.shopping.NoSuchOrderException;
197 
198     public void removeByG_U_PPPS(long groupId, long userId,
199         java.lang.String ppPaymentStatus)
200         throws com.liferay.portal.SystemException;
201 
202     public void removeAll() throws com.liferay.portal.SystemException;
203 
204     public int countByGroupId(long groupId)
205         throws com.liferay.portal.SystemException;
206 
207     public int countByNumber(java.lang.String number)
208         throws com.liferay.portal.SystemException;
209 
210     public int countByPPTxnId(java.lang.String ppTxnId)
211         throws com.liferay.portal.SystemException;
212 
213     public int countByG_U_PPPS(long groupId, long userId,
214         java.lang.String ppPaymentStatus)
215         throws com.liferay.portal.SystemException;
216 
217     public int countAll() throws com.liferay.portal.SystemException;
218 }