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