1   /**
2    * Copyright (c) 2000-2008 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.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="TasksReviewPersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface TasksReviewPersistence {
39      public com.liferay.portlet.tasks.model.TasksReview create(long reviewId);
40  
41      public com.liferay.portlet.tasks.model.TasksReview remove(long reviewId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.tasks.NoSuchReviewException;
44  
45      public com.liferay.portlet.tasks.model.TasksReview remove(
46          com.liferay.portlet.tasks.model.TasksReview tasksReview)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(TasksReview tasksReview, boolean merge)</code>.
51       */
52      public com.liferay.portlet.tasks.model.TasksReview update(
53          com.liferay.portlet.tasks.model.TasksReview tasksReview)
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        tasksReview 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 tasksReview 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.tasks.model.TasksReview update(
70          com.liferay.portlet.tasks.model.TasksReview tasksReview, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.tasks.model.TasksReview updateImpl(
74          com.liferay.portlet.tasks.model.TasksReview tasksReview, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.tasks.model.TasksReview findByPrimaryKey(
79          long reviewId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portlet.tasks.NoSuchReviewException;
82  
83      public com.liferay.portlet.tasks.model.TasksReview fetchByPrimaryKey(
84          long reviewId) throws com.liferay.portal.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByUserId(
88          long userId) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
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      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96      public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByUserId(
97          long userId, int start, int end,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102     public com.liferay.portlet.tasks.model.TasksReview findByUserId_First(
103         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException,
105             com.liferay.portlet.tasks.NoSuchReviewException;
106 
107     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108     public com.liferay.portlet.tasks.model.TasksReview findByUserId_Last(
109         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.tasks.NoSuchReviewException;
112 
113     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114     public com.liferay.portlet.tasks.model.TasksReview[] findByUserId_PrevAndNext(
115         long reviewId, long userId,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.tasks.NoSuchReviewException;
119 
120     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByProposalId(
122         long proposalId) throws com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByProposalId(
126         long proposalId, int start, int end)
127         throws com.liferay.portal.SystemException;
128 
129     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByProposalId(
131         long proposalId, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public com.liferay.portlet.tasks.model.TasksReview findByProposalId_First(
137         long proposalId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.tasks.NoSuchReviewException;
140 
141     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142     public com.liferay.portlet.tasks.model.TasksReview findByProposalId_Last(
143         long proposalId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.tasks.NoSuchReviewException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public com.liferay.portlet.tasks.model.TasksReview[] findByProposalId_PrevAndNext(
149         long reviewId, long proposalId,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.tasks.NoSuchReviewException;
153 
154     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155     public com.liferay.portlet.tasks.model.TasksReview findByU_P(long userId,
156         long proposalId)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.tasks.NoSuchReviewException;
159 
160     public com.liferay.portlet.tasks.model.TasksReview fetchByU_P(long userId,
161         long proposalId) throws com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S(
165         long proposalId, int stage) throws com.liferay.portal.SystemException;
166 
167     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S(
169         long proposalId, int stage, int start, int end)
170         throws com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S(
174         long proposalId, int stage, int start, int end,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public com.liferay.portlet.tasks.model.TasksReview findByP_S_First(
180         long proposalId, int stage,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.tasks.NoSuchReviewException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public com.liferay.portlet.tasks.model.TasksReview findByP_S_Last(
187         long proposalId, int stage,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.tasks.NoSuchReviewException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public com.liferay.portlet.tasks.model.TasksReview[] findByP_S_PrevAndNext(
194         long reviewId, long proposalId, int stage,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException,
197             com.liferay.portlet.tasks.NoSuchReviewException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C(
201         long proposalId, int stage, boolean completed)
202         throws com.liferay.portal.SystemException;
203 
204     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C(
206         long proposalId, int stage, boolean completed, int start, int end)
207         throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C(
211         long proposalId, int stage, boolean completed, int start, int end,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException;
214 
215     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_First(
217         long proposalId, int stage, boolean completed,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException,
220             com.liferay.portlet.tasks.NoSuchReviewException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_Last(
224         long proposalId, int stage, boolean completed,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException,
227             com.liferay.portlet.tasks.NoSuchReviewException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public com.liferay.portlet.tasks.model.TasksReview[] findByP_S_C_PrevAndNext(
231         long reviewId, long proposalId, int stage, boolean completed,
232         com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException,
234             com.liferay.portlet.tasks.NoSuchReviewException;
235 
236     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C_R(
238         long proposalId, int stage, boolean completed, boolean rejected)
239         throws com.liferay.portal.SystemException;
240 
241     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C_R(
243         long proposalId, int stage, boolean completed, boolean rejected,
244         int start, int end) throws com.liferay.portal.SystemException;
245 
246     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findByP_S_C_R(
248         long proposalId, int stage, boolean completed, boolean rejected,
249         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
250         throws com.liferay.portal.SystemException;
251 
252     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_R_First(
254         long proposalId, int stage, boolean completed, boolean rejected,
255         com.liferay.portal.kernel.util.OrderByComparator obc)
256         throws com.liferay.portal.SystemException,
257             com.liferay.portlet.tasks.NoSuchReviewException;
258 
259     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260     public com.liferay.portlet.tasks.model.TasksReview findByP_S_C_R_Last(
261         long proposalId, int stage, boolean completed, boolean rejected,
262         com.liferay.portal.kernel.util.OrderByComparator obc)
263         throws com.liferay.portal.SystemException,
264             com.liferay.portlet.tasks.NoSuchReviewException;
265 
266     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267     public com.liferay.portlet.tasks.model.TasksReview[] findByP_S_C_R_PrevAndNext(
268         long reviewId, long proposalId, int stage, boolean completed,
269         boolean rejected, com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.SystemException,
271             com.liferay.portlet.tasks.NoSuchReviewException;
272 
273     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274     public java.util.List<Object> findWithDynamicQuery(
275         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
276         throws com.liferay.portal.SystemException;
277 
278     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279     public java.util.List<Object> findWithDynamicQuery(
280         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
281         int end) throws com.liferay.portal.SystemException;
282 
283     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findAll()
285         throws com.liferay.portal.SystemException;
286 
287     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findAll(
289         int start, int end) throws com.liferay.portal.SystemException;
290 
291     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292     public java.util.List<com.liferay.portlet.tasks.model.TasksReview> findAll(
293         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException;
295 
296     public void removeByUserId(long userId)
297         throws com.liferay.portal.SystemException;
298 
299     public void removeByProposalId(long proposalId)
300         throws com.liferay.portal.SystemException;
301 
302     public void removeByU_P(long userId, long proposalId)
303         throws com.liferay.portal.SystemException,
304             com.liferay.portlet.tasks.NoSuchReviewException;
305 
306     public void removeByP_S(long proposalId, int stage)
307         throws com.liferay.portal.SystemException;
308 
309     public void removeByP_S_C(long proposalId, int stage, boolean completed)
310         throws com.liferay.portal.SystemException;
311 
312     public void removeByP_S_C_R(long proposalId, int stage, boolean completed,
313         boolean rejected) throws com.liferay.portal.SystemException;
314 
315     public void removeAll() throws com.liferay.portal.SystemException;
316 
317     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318     public int countByUserId(long userId)
319         throws com.liferay.portal.SystemException;
320 
321     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322     public int countByProposalId(long proposalId)
323         throws com.liferay.portal.SystemException;
324 
325     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326     public int countByU_P(long userId, long proposalId)
327         throws com.liferay.portal.SystemException;
328 
329     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330     public int countByP_S(long proposalId, int stage)
331         throws com.liferay.portal.SystemException;
332 
333     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334     public int countByP_S_C(long proposalId, int stage, boolean completed)
335         throws com.liferay.portal.SystemException;
336 
337     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338     public int countByP_S_C_R(long proposalId, int stage, boolean completed,
339         boolean rejected) throws com.liferay.portal.SystemException;
340 
341     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
342     public int countAll() throws com.liferay.portal.SystemException;
343 
344     public void registerListener(
345         com.liferay.portal.model.ModelListener listener);
346 
347     public void unregisterListener(
348         com.liferay.portal.model.ModelListener listener);
349 }