1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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.tasks.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="TasksReviewPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface TasksReviewPersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.tasks.model.TasksReview tasksReview);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.tasks.model.TasksReview> tasksReviews);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.tasks.model.TasksReview create(long reviewId);
43  
44      public com.liferay.portlet.tasks.model.TasksReview remove(long reviewId)
45          throws com.liferay.portal.SystemException,
46              com.liferay.portlet.tasks.NoSuchReviewException;
47  
48      public com.liferay.portlet.tasks.model.TasksReview remove(
49          com.liferay.portlet.tasks.model.TasksReview tasksReview)
50          throws com.liferay.portal.SystemException;
51  
52      /**
53       * @deprecated Use <code>update(TasksReview tasksReview, boolean merge)</code>.
54       */
55      public com.liferay.portlet.tasks.model.TasksReview update(
56          com.liferay.portlet.tasks.model.TasksReview tasksReview)
57          throws com.liferay.portal.SystemException;
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        tasksReview the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when tasksReview is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public com.liferay.portlet.tasks.model.TasksReview update(
73          com.liferay.portlet.tasks.model.TasksReview tasksReview, boolean merge)
74          throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portlet.tasks.model.TasksReview updateImpl(
77          com.liferay.portlet.tasks.model.TasksReview tasksReview, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portlet.tasks.model.TasksReview findByPrimaryKey(
81          long reviewId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.tasks.NoSuchReviewException;
84  
85      public com.liferay.portlet.tasks.model.TasksReview fetchByPrimaryKey(
86          long reviewId) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByUserId(
89          long userId) throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByUserId(
92          long userId, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByUserId(
96          long userId, int start, int end,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException;
99  
100     public com.liferay.portlet.tasks.model.TasksReview findByUserId_First(
101         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.tasks.NoSuchReviewException;
104 
105     public com.liferay.portlet.tasks.model.TasksReview findByUserId_Last(
106         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.tasks.NoSuchReviewException;
109 
110     public com.liferay.portlet.tasks.model.TasksReview[] findByUserId_PrevAndNext(
111         long reviewId, long userId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.tasks.NoSuchReviewException;
115 
116     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByProposalId(
117         long proposalId) throws com.liferay.portal.SystemException;
118 
119     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByProposalId(
120         long proposalId, int start, int end)
121         throws com.liferay.portal.SystemException;
122 
123     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByProposalId(
124         long proposalId, int start, int end,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException;
127 
128     public com.liferay.portlet.tasks.model.TasksReview findByProposalId_First(
129         long proposalId, com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.tasks.NoSuchReviewException;
132 
133     public com.liferay.portlet.tasks.model.TasksReview findByProposalId_Last(
134         long proposalId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException,
136             com.liferay.portlet.tasks.NoSuchReviewException;
137 
138     public com.liferay.portlet.tasks.model.TasksReview[] findByProposalId_PrevAndNext(
139         long reviewId, long proposalId,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException,
142             com.liferay.portlet.tasks.NoSuchReviewException;
143 
144     public com.liferay.portlet.tasks.model.TasksReview findByU_P(long userId,
145         long proposalId)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.tasks.NoSuchReviewException;
148 
149     public com.liferay.portlet.tasks.model.TasksReview fetchByU_P(long userId,
150         long proposalId) throws com.liferay.portal.SystemException;
151 
152     public com.liferay.portlet.tasks.model.TasksReview fetchByU_P(long userId,
153         long proposalId, boolean retrieveFromCache)
154         throws com.liferay.portal.SystemException;
155 
156     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S(
157         long proposalId, int stage) throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S(
160         long proposalId, int stage, int start, int end)
161         throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S(
164         long proposalId, int stage, int start, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException;
167 
168     public com.liferay.portlet.tasks.model.TasksReview findByP_S_First(
169         long proposalId, int stage,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.tasks.NoSuchReviewException;
173 
174     public com.liferay.portlet.tasks.model.TasksReview findByP_S_Last(
175         long proposalId, int stage,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.tasks.NoSuchReviewException;
179 
180     public com.liferay.portlet.tasks.model.TasksReview[] findByP_S_PrevAndNext(
181         long reviewId, long proposalId, int stage,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.tasks.NoSuchReviewException;
185 
186     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C(
187         long proposalId, int stage, boolean completed)
188         throws com.liferay.portal.SystemException;
189 
190     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C(
191         long proposalId, int stage, boolean completed, int start, int end)
192         throws com.liferay.portal.SystemException;
193 
194     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C(
195         long proposalId, int stage, boolean completed, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException;
198 
199     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_First(
200         long proposalId, int stage, boolean completed,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.tasks.NoSuchReviewException;
204 
205     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_Last(
206         long proposalId, int stage, boolean completed,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.tasks.NoSuchReviewException;
210 
211     public com.liferay.portlet.tasks.model.TasksReview[] findByP_S_C_PrevAndNext(
212         long reviewId, long proposalId, int stage, boolean completed,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.tasks.NoSuchReviewException;
216 
217     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C_R(
218         long proposalId, int stage, boolean completed, boolean rejected)
219         throws com.liferay.portal.SystemException;
220 
221     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C_R(
222         long proposalId, int stage, boolean completed, boolean rejected,
223         int start, int end) throws com.liferay.portal.SystemException;
224 
225     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C_R(
226         long proposalId, int stage, boolean completed, boolean rejected,
227         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException;
229 
230     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_R_First(
231         long proposalId, int stage, boolean completed, boolean rejected,
232         com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException,
234             com.liferay.portlet.tasks.NoSuchReviewException;
235 
236     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_R_Last(
237         long proposalId, int stage, boolean completed, boolean rejected,
238         com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.tasks.NoSuchReviewException;
241 
242     public com.liferay.portlet.tasks.model.TasksReview[] findByP_S_C_R_PrevAndNext(
243         long reviewId, long proposalId, int stage, boolean completed,
244         boolean rejected, com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.SystemException,
246             com.liferay.portlet.tasks.NoSuchReviewException;
247 
248     public java.util.List<Object> findWithDynamicQuery(
249         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
250         throws com.liferay.portal.SystemException;
251 
252     public java.util.List<Object> findWithDynamicQuery(
253         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
254         int end) throws com.liferay.portal.SystemException;
255 
256     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findAll()
257         throws com.liferay.portal.SystemException;
258 
259     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findAll(
260         int start, int end) throws com.liferay.portal.SystemException;
261 
262     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findAll(
263         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException;
265 
266     public void removeByUserId(long userId)
267         throws com.liferay.portal.SystemException;
268 
269     public void removeByProposalId(long proposalId)
270         throws com.liferay.portal.SystemException;
271 
272     public void removeByU_P(long userId, long proposalId)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.tasks.NoSuchReviewException;
275 
276     public void removeByP_S(long proposalId, int stage)
277         throws com.liferay.portal.SystemException;
278 
279     public void removeByP_S_C(long proposalId, int stage, boolean completed)
280         throws com.liferay.portal.SystemException;
281 
282     public void removeByP_S_C_R(long proposalId, int stage, boolean completed,
283         boolean rejected) throws com.liferay.portal.SystemException;
284 
285     public void removeAll() throws com.liferay.portal.SystemException;
286 
287     public int countByUserId(long userId)
288         throws com.liferay.portal.SystemException;
289 
290     public int countByProposalId(long proposalId)
291         throws com.liferay.portal.SystemException;
292 
293     public int countByU_P(long userId, long proposalId)
294         throws com.liferay.portal.SystemException;
295 
296     public int countByP_S(long proposalId, int stage)
297         throws com.liferay.portal.SystemException;
298 
299     public int countByP_S_C(long proposalId, int stage, boolean completed)
300         throws com.liferay.portal.SystemException;
301 
302     public int countByP_S_C_R(long proposalId, int stage, boolean completed,
303         boolean rejected) throws com.liferay.portal.SystemException;
304 
305     public int countAll() throws com.liferay.portal.SystemException;
306 }