1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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="SocialRelationPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       SocialRelationPersistenceImpl
37   * @see       SocialRelationUtil
38   * @generated
39   */
40  public interface SocialRelationPersistence extends BasePersistence {
41      public void cacheResult(
42          com.liferay.portlet.social.model.SocialRelation socialRelation);
43  
44      public void cacheResult(
45          java.util.List<com.liferay.portlet.social.model.SocialRelation> socialRelations);
46  
47      public void clearCache();
48  
49      public com.liferay.portlet.social.model.SocialRelation create(
50          long relationId);
51  
52      public com.liferay.portlet.social.model.SocialRelation remove(
53          long relationId)
54          throws com.liferay.portal.SystemException,
55              com.liferay.portlet.social.NoSuchRelationException;
56  
57      public com.liferay.portlet.social.model.SocialRelation remove(
58          com.liferay.portlet.social.model.SocialRelation socialRelation)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * @deprecated Use {@link #update(SocialRelation, boolean merge)}.
63       */
64      public com.liferay.portlet.social.model.SocialRelation update(
65          com.liferay.portlet.social.model.SocialRelation socialRelation)
66          throws com.liferay.portal.SystemException;
67  
68      /**
69       * Add, update, or merge, the entity. This method also calls the model
70       * listeners to trigger the proper events associated with adding, deleting,
71       * or updating an entity.
72       *
73       * @param  socialRelation the entity to add, update, or merge
74       * @param  merge boolean value for whether to merge the entity. The default
75       *         value is false. Setting merge to true is more expensive and
76       *         should only be true when socialRelation is transient. See
77       *         LEP-5473 for a detailed discussion of this method.
78       * @return the entity that was added, updated, or merged
79       */
80      public com.liferay.portlet.social.model.SocialRelation update(
81          com.liferay.portlet.social.model.SocialRelation socialRelation,
82          boolean merge) throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portlet.social.model.SocialRelation updateImpl(
85          com.liferay.portlet.social.model.SocialRelation socialRelation,
86          boolean merge) throws com.liferay.portal.SystemException;
87  
88      public com.liferay.portlet.social.model.SocialRelation findByPrimaryKey(
89          long relationId)
90          throws com.liferay.portal.SystemException,
91              com.liferay.portlet.social.NoSuchRelationException;
92  
93      public com.liferay.portlet.social.model.SocialRelation fetchByPrimaryKey(
94          long relationId) throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
97          java.lang.String uuid) throws com.liferay.portal.SystemException;
98  
99      public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
100         java.lang.String uuid, int start, int end)
101         throws com.liferay.portal.SystemException;
102 
103     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
104         java.lang.String uuid, int start, int end,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException;
107 
108     public com.liferay.portlet.social.model.SocialRelation findByUuid_First(
109         java.lang.String uuid,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.social.NoSuchRelationException;
113 
114     public com.liferay.portlet.social.model.SocialRelation findByUuid_Last(
115         java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.social.NoSuchRelationException;
119 
120     public com.liferay.portlet.social.model.SocialRelation[] findByUuid_PrevAndNext(
121         long relationId, java.lang.String uuid,
122         com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.social.NoSuchRelationException;
125 
126     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
127         long companyId) throws com.liferay.portal.SystemException;
128 
129     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
130         long companyId, int start, int end)
131         throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
134         long companyId, int start, int end,
135         com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException;
137 
138     public com.liferay.portlet.social.model.SocialRelation findByCompanyId_First(
139         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.social.NoSuchRelationException;
142 
143     public com.liferay.portlet.social.model.SocialRelation findByCompanyId_Last(
144         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.social.NoSuchRelationException;
147 
148     public com.liferay.portlet.social.model.SocialRelation[] findByCompanyId_PrevAndNext(
149         long relationId, long companyId,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.social.NoSuchRelationException;
153 
154     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
155         long userId1) throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
158         long userId1, int start, int end)
159         throws com.liferay.portal.SystemException;
160 
161     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
162         long userId1, int start, int end,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException;
165 
166     public com.liferay.portlet.social.model.SocialRelation findByUserId1_First(
167         long userId1, com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException,
169             com.liferay.portlet.social.NoSuchRelationException;
170 
171     public com.liferay.portlet.social.model.SocialRelation findByUserId1_Last(
172         long userId1, com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.social.NoSuchRelationException;
175 
176     public com.liferay.portlet.social.model.SocialRelation[] findByUserId1_PrevAndNext(
177         long relationId, long userId1,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException,
180             com.liferay.portlet.social.NoSuchRelationException;
181 
182     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
183         long userId2) throws com.liferay.portal.SystemException;
184 
185     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
186         long userId2, int start, int end)
187         throws com.liferay.portal.SystemException;
188 
189     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
190         long userId2, int start, int end,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException;
193 
194     public com.liferay.portlet.social.model.SocialRelation findByUserId2_First(
195         long userId2, com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException,
197             com.liferay.portlet.social.NoSuchRelationException;
198 
199     public com.liferay.portlet.social.model.SocialRelation findByUserId2_Last(
200         long userId2, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.social.NoSuchRelationException;
203 
204     public com.liferay.portlet.social.model.SocialRelation[] findByUserId2_PrevAndNext(
205         long relationId, long userId2,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException,
208             com.liferay.portlet.social.NoSuchRelationException;
209 
210     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
211         int type) throws com.liferay.portal.SystemException;
212 
213     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
214         int type, int start, int end) throws com.liferay.portal.SystemException;
215 
216     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
217         int type, int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException;
220 
221     public com.liferay.portlet.social.model.SocialRelation findByType_First(
222         int type, com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException,
224             com.liferay.portlet.social.NoSuchRelationException;
225 
226     public com.liferay.portlet.social.model.SocialRelation findByType_Last(
227         int type, com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.social.NoSuchRelationException;
230 
231     public com.liferay.portlet.social.model.SocialRelation[] findByType_PrevAndNext(
232         long relationId, int type,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException,
235             com.liferay.portlet.social.NoSuchRelationException;
236 
237     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
238         long companyId, int type) throws com.liferay.portal.SystemException;
239 
240     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
241         long companyId, int type, int start, int end)
242         throws com.liferay.portal.SystemException;
243 
244     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
245         long companyId, int type, int start, int end,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.SystemException;
248 
249     public com.liferay.portlet.social.model.SocialRelation findByC_T_First(
250         long companyId, int type,
251         com.liferay.portal.kernel.util.OrderByComparator obc)
252         throws com.liferay.portal.SystemException,
253             com.liferay.portlet.social.NoSuchRelationException;
254 
255     public com.liferay.portlet.social.model.SocialRelation findByC_T_Last(
256         long companyId, int type,
257         com.liferay.portal.kernel.util.OrderByComparator obc)
258         throws com.liferay.portal.SystemException,
259             com.liferay.portlet.social.NoSuchRelationException;
260 
261     public com.liferay.portlet.social.model.SocialRelation[] findByC_T_PrevAndNext(
262         long relationId, long companyId, int type,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.social.NoSuchRelationException;
266 
267     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_T(
268         long userId1, int type) throws com.liferay.portal.SystemException;
269 
270     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_T(
271         long userId1, int type, int start, int end)
272         throws com.liferay.portal.SystemException;
273 
274     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_T(
275         long userId1, int type, int start, int end,
276         com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.SystemException;
278 
279     public com.liferay.portlet.social.model.SocialRelation findByU1_T_First(
280         long userId1, int type,
281         com.liferay.portal.kernel.util.OrderByComparator obc)
282         throws com.liferay.portal.SystemException,
283             com.liferay.portlet.social.NoSuchRelationException;
284 
285     public com.liferay.portlet.social.model.SocialRelation findByU1_T_Last(
286         long userId1, int type,
287         com.liferay.portal.kernel.util.OrderByComparator obc)
288         throws com.liferay.portal.SystemException,
289             com.liferay.portlet.social.NoSuchRelationException;
290 
291     public com.liferay.portlet.social.model.SocialRelation[] findByU1_T_PrevAndNext(
292         long relationId, long userId1, int type,
293         com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException,
295             com.liferay.portlet.social.NoSuchRelationException;
296 
297     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
298         long userId2, int type) throws com.liferay.portal.SystemException;
299 
300     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
301         long userId2, int type, int start, int end)
302         throws com.liferay.portal.SystemException;
303 
304     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
305         long userId2, int type, int start, int end,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException;
308 
309     public com.liferay.portlet.social.model.SocialRelation findByU2_T_First(
310         long userId2, int type,
311         com.liferay.portal.kernel.util.OrderByComparator obc)
312         throws com.liferay.portal.SystemException,
313             com.liferay.portlet.social.NoSuchRelationException;
314 
315     public com.liferay.portlet.social.model.SocialRelation findByU2_T_Last(
316         long userId2, int type,
317         com.liferay.portal.kernel.util.OrderByComparator obc)
318         throws com.liferay.portal.SystemException,
319             com.liferay.portlet.social.NoSuchRelationException;
320 
321     public com.liferay.portlet.social.model.SocialRelation[] findByU2_T_PrevAndNext(
322         long relationId, long userId2, int type,
323         com.liferay.portal.kernel.util.OrderByComparator obc)
324         throws com.liferay.portal.SystemException,
325             com.liferay.portlet.social.NoSuchRelationException;
326 
327     public com.liferay.portlet.social.model.SocialRelation findByU1_U2_T(
328         long userId1, long userId2, int type)
329         throws com.liferay.portal.SystemException,
330             com.liferay.portlet.social.NoSuchRelationException;
331 
332     public com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_T(
333         long userId1, long userId2, int type)
334         throws com.liferay.portal.SystemException;
335 
336     public com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_T(
337         long userId1, long userId2, int type, boolean retrieveFromCache)
338         throws com.liferay.portal.SystemException;
339 
340     public java.util.List<Object> findWithDynamicQuery(
341         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
342         throws com.liferay.portal.SystemException;
343 
344     public java.util.List<Object> findWithDynamicQuery(
345         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
346         int end) throws com.liferay.portal.SystemException;
347 
348     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll()
349         throws com.liferay.portal.SystemException;
350 
351     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll(
352         int start, int end) throws com.liferay.portal.SystemException;
353 
354     public java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll(
355         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
356         throws com.liferay.portal.SystemException;
357 
358     public void removeByUuid(java.lang.String uuid)
359         throws com.liferay.portal.SystemException;
360 
361     public void removeByCompanyId(long companyId)
362         throws com.liferay.portal.SystemException;
363 
364     public void removeByUserId1(long userId1)
365         throws com.liferay.portal.SystemException;
366 
367     public void removeByUserId2(long userId2)
368         throws com.liferay.portal.SystemException;
369 
370     public void removeByType(int type)
371         throws com.liferay.portal.SystemException;
372 
373     public void removeByC_T(long companyId, int type)
374         throws com.liferay.portal.SystemException;
375 
376     public void removeByU1_T(long userId1, int type)
377         throws com.liferay.portal.SystemException;
378 
379     public void removeByU2_T(long userId2, int type)
380         throws com.liferay.portal.SystemException;
381 
382     public void removeByU1_U2_T(long userId1, long userId2, int type)
383         throws com.liferay.portal.SystemException,
384             com.liferay.portlet.social.NoSuchRelationException;
385 
386     public void removeAll() throws com.liferay.portal.SystemException;
387 
388     public int countByUuid(java.lang.String uuid)
389         throws com.liferay.portal.SystemException;
390 
391     public int countByCompanyId(long companyId)
392         throws com.liferay.portal.SystemException;
393 
394     public int countByUserId1(long userId1)
395         throws com.liferay.portal.SystemException;
396 
397     public int countByUserId2(long userId2)
398         throws com.liferay.portal.SystemException;
399 
400     public int countByType(int type) throws com.liferay.portal.SystemException;
401 
402     public int countByC_T(long companyId, int type)
403         throws com.liferay.portal.SystemException;
404 
405     public int countByU1_T(long userId1, int type)
406         throws com.liferay.portal.SystemException;
407 
408     public int countByU2_T(long userId2, int type)
409         throws com.liferay.portal.SystemException;
410 
411     public int countByU1_U2_T(long userId1, long userId2, int type)
412         throws com.liferay.portal.SystemException;
413 
414     public int countAll() throws com.liferay.portal.SystemException;
415 }