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.social.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="SocialRequestPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface SocialRequestPersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.social.model.SocialRequest socialRequest);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.social.model.SocialRequest> socialRequests);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.social.model.SocialRequest create(long requestId);
43  
44      public com.liferay.portlet.social.model.SocialRequest remove(long requestId)
45          throws com.liferay.portal.SystemException,
46              com.liferay.portlet.social.NoSuchRequestException;
47  
48      public com.liferay.portlet.social.model.SocialRequest remove(
49          com.liferay.portlet.social.model.SocialRequest socialRequest)
50          throws com.liferay.portal.SystemException;
51  
52      /**
53       * @deprecated Use <code>update(SocialRequest socialRequest, boolean merge)</code>.
54       */
55      public com.liferay.portlet.social.model.SocialRequest update(
56          com.liferay.portlet.social.model.SocialRequest socialRequest)
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        socialRequest 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 socialRequest 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.social.model.SocialRequest update(
73          com.liferay.portlet.social.model.SocialRequest socialRequest,
74          boolean merge) throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portlet.social.model.SocialRequest updateImpl(
77          com.liferay.portlet.social.model.SocialRequest socialRequest,
78          boolean merge) throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portlet.social.model.SocialRequest findByPrimaryKey(
81          long requestId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.social.NoSuchRequestException;
84  
85      public com.liferay.portlet.social.model.SocialRequest fetchByPrimaryKey(
86          long requestId) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByUuid(
89          java.lang.String uuid) throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByUuid(
92          java.lang.String uuid, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByUuid(
96          java.lang.String uuid, int start, int end,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException;
99  
100     public com.liferay.portlet.social.model.SocialRequest findByUuid_First(
101         java.lang.String uuid,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.social.NoSuchRequestException;
105 
106     public com.liferay.portlet.social.model.SocialRequest findByUuid_Last(
107         java.lang.String uuid,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException,
110             com.liferay.portlet.social.NoSuchRequestException;
111 
112     public com.liferay.portlet.social.model.SocialRequest[] findByUuid_PrevAndNext(
113         long requestId, java.lang.String uuid,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.social.NoSuchRequestException;
117 
118     public com.liferay.portlet.social.model.SocialRequest findByUUID_G(
119         java.lang.String uuid, long groupId)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.social.NoSuchRequestException;
122 
123     public com.liferay.portlet.social.model.SocialRequest fetchByUUID_G(
124         java.lang.String uuid, long groupId)
125         throws com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.social.model.SocialRequest fetchByUUID_G(
128         java.lang.String uuid, long groupId, boolean retrieveFromCache)
129         throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByCompanyId(
132         long companyId) throws com.liferay.portal.SystemException;
133 
134     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByCompanyId(
135         long companyId, int start, int end)
136         throws com.liferay.portal.SystemException;
137 
138     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByCompanyId(
139         long companyId, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException;
142 
143     public com.liferay.portlet.social.model.SocialRequest findByCompanyId_First(
144         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.social.NoSuchRequestException;
147 
148     public com.liferay.portlet.social.model.SocialRequest findByCompanyId_Last(
149         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.social.NoSuchRequestException;
152 
153     public com.liferay.portlet.social.model.SocialRequest[] findByCompanyId_PrevAndNext(
154         long requestId, long companyId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.social.NoSuchRequestException;
158 
159     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByUserId(
160         long userId) throws com.liferay.portal.SystemException;
161 
162     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByUserId(
163         long userId, int start, int end)
164         throws com.liferay.portal.SystemException;
165 
166     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByUserId(
167         long userId, int start, int end,
168         com.liferay.portal.kernel.util.OrderByComparator obc)
169         throws com.liferay.portal.SystemException;
170 
171     public com.liferay.portlet.social.model.SocialRequest findByUserId_First(
172         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.social.NoSuchRequestException;
175 
176     public com.liferay.portlet.social.model.SocialRequest findByUserId_Last(
177         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.social.NoSuchRequestException;
180 
181     public com.liferay.portlet.social.model.SocialRequest[] findByUserId_PrevAndNext(
182         long requestId, long userId,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.social.NoSuchRequestException;
186 
187     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByReceiverUserId(
188         long receiverUserId) throws com.liferay.portal.SystemException;
189 
190     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByReceiverUserId(
191         long receiverUserId, int start, int end)
192         throws com.liferay.portal.SystemException;
193 
194     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByReceiverUserId(
195         long receiverUserId, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException;
198 
199     public com.liferay.portlet.social.model.SocialRequest findByReceiverUserId_First(
200         long receiverUserId,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.social.NoSuchRequestException;
204 
205     public com.liferay.portlet.social.model.SocialRequest findByReceiverUserId_Last(
206         long receiverUserId,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.social.NoSuchRequestException;
210 
211     public com.liferay.portlet.social.model.SocialRequest[] findByReceiverUserId_PrevAndNext(
212         long requestId, long receiverUserId,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.social.NoSuchRequestException;
216 
217     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByU_S(
218         long userId, int status) throws com.liferay.portal.SystemException;
219 
220     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByU_S(
221         long userId, int status, int start, int end)
222         throws com.liferay.portal.SystemException;
223 
224     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByU_S(
225         long userId, int status, int start, int end,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException;
228 
229     public com.liferay.portlet.social.model.SocialRequest findByU_S_First(
230         long userId, int status,
231         com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.social.NoSuchRequestException;
234 
235     public com.liferay.portlet.social.model.SocialRequest findByU_S_Last(
236         long userId, int status,
237         com.liferay.portal.kernel.util.OrderByComparator obc)
238         throws com.liferay.portal.SystemException,
239             com.liferay.portlet.social.NoSuchRequestException;
240 
241     public com.liferay.portlet.social.model.SocialRequest[] findByU_S_PrevAndNext(
242         long requestId, long userId, int status,
243         com.liferay.portal.kernel.util.OrderByComparator obc)
244         throws com.liferay.portal.SystemException,
245             com.liferay.portlet.social.NoSuchRequestException;
246 
247     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByR_S(
248         long receiverUserId, int status)
249         throws com.liferay.portal.SystemException;
250 
251     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByR_S(
252         long receiverUserId, int status, int start, int end)
253         throws com.liferay.portal.SystemException;
254 
255     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByR_S(
256         long receiverUserId, int status, int start, int end,
257         com.liferay.portal.kernel.util.OrderByComparator obc)
258         throws com.liferay.portal.SystemException;
259 
260     public com.liferay.portlet.social.model.SocialRequest findByR_S_First(
261         long receiverUserId, int status,
262         com.liferay.portal.kernel.util.OrderByComparator obc)
263         throws com.liferay.portal.SystemException,
264             com.liferay.portlet.social.NoSuchRequestException;
265 
266     public com.liferay.portlet.social.model.SocialRequest findByR_S_Last(
267         long receiverUserId, int status,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException,
270             com.liferay.portlet.social.NoSuchRequestException;
271 
272     public com.liferay.portlet.social.model.SocialRequest[] findByR_S_PrevAndNext(
273         long requestId, long receiverUserId, int status,
274         com.liferay.portal.kernel.util.OrderByComparator obc)
275         throws com.liferay.portal.SystemException,
276             com.liferay.portlet.social.NoSuchRequestException;
277 
278     public com.liferay.portlet.social.model.SocialRequest findByU_C_C_T_R(
279         long userId, long classNameId, long classPK, int type,
280         long receiverUserId)
281         throws com.liferay.portal.SystemException,
282             com.liferay.portlet.social.NoSuchRequestException;
283 
284     public com.liferay.portlet.social.model.SocialRequest fetchByU_C_C_T_R(
285         long userId, long classNameId, long classPK, int type,
286         long receiverUserId) throws com.liferay.portal.SystemException;
287 
288     public com.liferay.portlet.social.model.SocialRequest fetchByU_C_C_T_R(
289         long userId, long classNameId, long classPK, int type,
290         long receiverUserId, boolean retrieveFromCache)
291         throws com.liferay.portal.SystemException;
292 
293     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByU_C_C_T_S(
294         long userId, long classNameId, long classPK, int type, int status)
295         throws com.liferay.portal.SystemException;
296 
297     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByU_C_C_T_S(
298         long userId, long classNameId, long classPK, int type, int status,
299         int start, int end) throws com.liferay.portal.SystemException;
300 
301     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByU_C_C_T_S(
302         long userId, long classNameId, long classPK, int type, int status,
303         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
304         throws com.liferay.portal.SystemException;
305 
306     public com.liferay.portlet.social.model.SocialRequest findByU_C_C_T_S_First(
307         long userId, long classNameId, long classPK, int type, int status,
308         com.liferay.portal.kernel.util.OrderByComparator obc)
309         throws com.liferay.portal.SystemException,
310             com.liferay.portlet.social.NoSuchRequestException;
311 
312     public com.liferay.portlet.social.model.SocialRequest findByU_C_C_T_S_Last(
313         long userId, long classNameId, long classPK, int type, int status,
314         com.liferay.portal.kernel.util.OrderByComparator obc)
315         throws com.liferay.portal.SystemException,
316             com.liferay.portlet.social.NoSuchRequestException;
317 
318     public com.liferay.portlet.social.model.SocialRequest[] findByU_C_C_T_S_PrevAndNext(
319         long requestId, long userId, long classNameId, long classPK, int type,
320         int status, com.liferay.portal.kernel.util.OrderByComparator obc)
321         throws com.liferay.portal.SystemException,
322             com.liferay.portlet.social.NoSuchRequestException;
323 
324     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByC_C_T_R_S(
325         long classNameId, long classPK, int type, long receiverUserId,
326         int status) throws com.liferay.portal.SystemException;
327 
328     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByC_C_T_R_S(
329         long classNameId, long classPK, int type, long receiverUserId,
330         int status, int start, int end)
331         throws com.liferay.portal.SystemException;
332 
333     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findByC_C_T_R_S(
334         long classNameId, long classPK, int type, long receiverUserId,
335         int status, int start, int end,
336         com.liferay.portal.kernel.util.OrderByComparator obc)
337         throws com.liferay.portal.SystemException;
338 
339     public com.liferay.portlet.social.model.SocialRequest findByC_C_T_R_S_First(
340         long classNameId, long classPK, int type, long receiverUserId,
341         int status, com.liferay.portal.kernel.util.OrderByComparator obc)
342         throws com.liferay.portal.SystemException,
343             com.liferay.portlet.social.NoSuchRequestException;
344 
345     public com.liferay.portlet.social.model.SocialRequest findByC_C_T_R_S_Last(
346         long classNameId, long classPK, int type, long receiverUserId,
347         int status, com.liferay.portal.kernel.util.OrderByComparator obc)
348         throws com.liferay.portal.SystemException,
349             com.liferay.portlet.social.NoSuchRequestException;
350 
351     public com.liferay.portlet.social.model.SocialRequest[] findByC_C_T_R_S_PrevAndNext(
352         long requestId, long classNameId, long classPK, int type,
353         long receiverUserId, int status,
354         com.liferay.portal.kernel.util.OrderByComparator obc)
355         throws com.liferay.portal.SystemException,
356             com.liferay.portlet.social.NoSuchRequestException;
357 
358     public java.util.List<Object> findWithDynamicQuery(
359         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
360         throws com.liferay.portal.SystemException;
361 
362     public java.util.List<Object> findWithDynamicQuery(
363         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
364         int end) throws com.liferay.portal.SystemException;
365 
366     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findAll()
367         throws com.liferay.portal.SystemException;
368 
369     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findAll(
370         int start, int end) throws com.liferay.portal.SystemException;
371 
372     public java.util.List<com.liferay.portlet.social.model.SocialRequest> findAll(
373         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
374         throws com.liferay.portal.SystemException;
375 
376     public void removeByUuid(java.lang.String uuid)
377         throws com.liferay.portal.SystemException;
378 
379     public void removeByUUID_G(java.lang.String uuid, long groupId)
380         throws com.liferay.portal.SystemException,
381             com.liferay.portlet.social.NoSuchRequestException;
382 
383     public void removeByCompanyId(long companyId)
384         throws com.liferay.portal.SystemException;
385 
386     public void removeByUserId(long userId)
387         throws com.liferay.portal.SystemException;
388 
389     public void removeByReceiverUserId(long receiverUserId)
390         throws com.liferay.portal.SystemException;
391 
392     public void removeByU_S(long userId, int status)
393         throws com.liferay.portal.SystemException;
394 
395     public void removeByR_S(long receiverUserId, int status)
396         throws com.liferay.portal.SystemException;
397 
398     public void removeByU_C_C_T_R(long userId, long classNameId, long classPK,
399         int type, long receiverUserId)
400         throws com.liferay.portal.SystemException,
401             com.liferay.portlet.social.NoSuchRequestException;
402 
403     public void removeByU_C_C_T_S(long userId, long classNameId, long classPK,
404         int type, int status) throws com.liferay.portal.SystemException;
405 
406     public void removeByC_C_T_R_S(long classNameId, long classPK, int type,
407         long receiverUserId, int status)
408         throws com.liferay.portal.SystemException;
409 
410     public void removeAll() throws com.liferay.portal.SystemException;
411 
412     public int countByUuid(java.lang.String uuid)
413         throws com.liferay.portal.SystemException;
414 
415     public int countByUUID_G(java.lang.String uuid, long groupId)
416         throws com.liferay.portal.SystemException;
417 
418     public int countByCompanyId(long companyId)
419         throws com.liferay.portal.SystemException;
420 
421     public int countByUserId(long userId)
422         throws com.liferay.portal.SystemException;
423 
424     public int countByReceiverUserId(long receiverUserId)
425         throws com.liferay.portal.SystemException;
426 
427     public int countByU_S(long userId, int status)
428         throws com.liferay.portal.SystemException;
429 
430     public int countByR_S(long receiverUserId, int status)
431         throws com.liferay.portal.SystemException;
432 
433     public int countByU_C_C_T_R(long userId, long classNameId, long classPK,
434         int type, long receiverUserId)
435         throws com.liferay.portal.SystemException;
436 
437     public int countByU_C_C_T_S(long userId, long classNameId, long classPK,
438         int type, int status) throws com.liferay.portal.SystemException;
439 
440     public int countByC_C_T_R_S(long classNameId, long classPK, int type,
441         long receiverUserId, int status)
442         throws com.liferay.portal.SystemException;
443 
444     public int countAll() throws com.liferay.portal.SystemException;
445 }