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.journal.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="JournalArticlePersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface JournalArticlePersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.journal.model.JournalArticle journalArticle);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.journal.model.JournalArticle> journalArticles);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.journal.model.JournalArticle create(long id);
43  
44      public com.liferay.portlet.journal.model.JournalArticle remove(long id)
45          throws com.liferay.portal.SystemException,
46              com.liferay.portlet.journal.NoSuchArticleException;
47  
48      public com.liferay.portlet.journal.model.JournalArticle remove(
49          com.liferay.portlet.journal.model.JournalArticle journalArticle)
50          throws com.liferay.portal.SystemException;
51  
52      /**
53       * @deprecated Use <code>update(JournalArticle journalArticle, boolean merge)</code>.
54       */
55      public com.liferay.portlet.journal.model.JournalArticle update(
56          com.liferay.portlet.journal.model.JournalArticle journalArticle)
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        journalArticle 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 journalArticle 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.journal.model.JournalArticle update(
73          com.liferay.portlet.journal.model.JournalArticle journalArticle,
74          boolean merge) throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portlet.journal.model.JournalArticle updateImpl(
77          com.liferay.portlet.journal.model.JournalArticle journalArticle,
78          boolean merge) throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portlet.journal.model.JournalArticle findByPrimaryKey(
81          long id)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.journal.NoSuchArticleException;
84  
85      public com.liferay.portlet.journal.model.JournalArticle fetchByPrimaryKey(
86          long id) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByUuid(
89          java.lang.String uuid) throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portlet.journal.model.JournalArticle> 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.journal.model.JournalArticle> 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.journal.model.JournalArticle 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.journal.NoSuchArticleException;
105 
106     public com.liferay.portlet.journal.model.JournalArticle 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.journal.NoSuchArticleException;
111 
112     public com.liferay.portlet.journal.model.JournalArticle[] findByUuid_PrevAndNext(
113         long id, java.lang.String uuid,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.journal.NoSuchArticleException;
117 
118     public com.liferay.portlet.journal.model.JournalArticle findByUUID_G(
119         java.lang.String uuid, long groupId)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.journal.NoSuchArticleException;
122 
123     public com.liferay.portlet.journal.model.JournalArticle fetchByUUID_G(
124         java.lang.String uuid, long groupId)
125         throws com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.journal.model.JournalArticle 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.journal.model.JournalArticle> findByGroupId(
132         long groupId) throws com.liferay.portal.SystemException;
133 
134     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByGroupId(
135         long groupId, int start, int end)
136         throws com.liferay.portal.SystemException;
137 
138     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByGroupId(
139         long groupId, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException;
142 
143     public com.liferay.portlet.journal.model.JournalArticle findByGroupId_First(
144         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.journal.NoSuchArticleException;
147 
148     public com.liferay.portlet.journal.model.JournalArticle findByGroupId_Last(
149         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.journal.NoSuchArticleException;
152 
153     public com.liferay.portlet.journal.model.JournalArticle[] findByGroupId_PrevAndNext(
154         long id, long groupId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.journal.NoSuchArticleException;
158 
159     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByCompanyId(
160         long companyId) throws com.liferay.portal.SystemException;
161 
162     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByCompanyId(
163         long companyId, int start, int end)
164         throws com.liferay.portal.SystemException;
165 
166     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByCompanyId(
167         long companyId, int start, int end,
168         com.liferay.portal.kernel.util.OrderByComparator obc)
169         throws com.liferay.portal.SystemException;
170 
171     public com.liferay.portlet.journal.model.JournalArticle findByCompanyId_First(
172         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.journal.NoSuchArticleException;
175 
176     public com.liferay.portlet.journal.model.JournalArticle findByCompanyId_Last(
177         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.journal.NoSuchArticleException;
180 
181     public com.liferay.portlet.journal.model.JournalArticle[] findByCompanyId_PrevAndNext(
182         long id, long companyId,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.journal.NoSuchArticleException;
186 
187     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findBySmallImageId(
188         long smallImageId) throws com.liferay.portal.SystemException;
189 
190     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findBySmallImageId(
191         long smallImageId, int start, int end)
192         throws com.liferay.portal.SystemException;
193 
194     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findBySmallImageId(
195         long smallImageId, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException;
198 
199     public com.liferay.portlet.journal.model.JournalArticle findBySmallImageId_First(
200         long smallImageId, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.journal.NoSuchArticleException;
203 
204     public com.liferay.portlet.journal.model.JournalArticle findBySmallImageId_Last(
205         long smallImageId, com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.journal.NoSuchArticleException;
208 
209     public com.liferay.portlet.journal.model.JournalArticle[] findBySmallImageId_PrevAndNext(
210         long id, long smallImageId,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.journal.NoSuchArticleException;
214 
215     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByR_A(
216         long resourcePrimKey, boolean approved)
217         throws com.liferay.portal.SystemException;
218 
219     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByR_A(
220         long resourcePrimKey, boolean approved, int start, int end)
221         throws com.liferay.portal.SystemException;
222 
223     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByR_A(
224         long resourcePrimKey, boolean approved, int start, int end,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException;
227 
228     public com.liferay.portlet.journal.model.JournalArticle findByR_A_First(
229         long resourcePrimKey, boolean approved,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.journal.NoSuchArticleException;
233 
234     public com.liferay.portlet.journal.model.JournalArticle findByR_A_Last(
235         long resourcePrimKey, boolean approved,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.journal.NoSuchArticleException;
239 
240     public com.liferay.portlet.journal.model.JournalArticle[] findByR_A_PrevAndNext(
241         long id, long resourcePrimKey, boolean approved,
242         com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.SystemException,
244             com.liferay.portlet.journal.NoSuchArticleException;
245 
246     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_A(
247         long groupId, java.lang.String articleId)
248         throws com.liferay.portal.SystemException;
249 
250     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_A(
251         long groupId, java.lang.String articleId, int start, int end)
252         throws com.liferay.portal.SystemException;
253 
254     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_A(
255         long groupId, java.lang.String articleId, int start, int end,
256         com.liferay.portal.kernel.util.OrderByComparator obc)
257         throws com.liferay.portal.SystemException;
258 
259     public com.liferay.portlet.journal.model.JournalArticle findByG_A_First(
260         long groupId, java.lang.String articleId,
261         com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.SystemException,
263             com.liferay.portlet.journal.NoSuchArticleException;
264 
265     public com.liferay.portlet.journal.model.JournalArticle findByG_A_Last(
266         long groupId, java.lang.String articleId,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException,
269             com.liferay.portlet.journal.NoSuchArticleException;
270 
271     public com.liferay.portlet.journal.model.JournalArticle[] findByG_A_PrevAndNext(
272         long id, long groupId, java.lang.String articleId,
273         com.liferay.portal.kernel.util.OrderByComparator obc)
274         throws com.liferay.portal.SystemException,
275             com.liferay.portlet.journal.NoSuchArticleException;
276 
277     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_S(
278         long groupId, java.lang.String structureId)
279         throws com.liferay.portal.SystemException;
280 
281     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_S(
282         long groupId, java.lang.String structureId, int start, int end)
283         throws com.liferay.portal.SystemException;
284 
285     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_S(
286         long groupId, java.lang.String structureId, int start, int end,
287         com.liferay.portal.kernel.util.OrderByComparator obc)
288         throws com.liferay.portal.SystemException;
289 
290     public com.liferay.portlet.journal.model.JournalArticle findByG_S_First(
291         long groupId, java.lang.String structureId,
292         com.liferay.portal.kernel.util.OrderByComparator obc)
293         throws com.liferay.portal.SystemException,
294             com.liferay.portlet.journal.NoSuchArticleException;
295 
296     public com.liferay.portlet.journal.model.JournalArticle findByG_S_Last(
297         long groupId, java.lang.String structureId,
298         com.liferay.portal.kernel.util.OrderByComparator obc)
299         throws com.liferay.portal.SystemException,
300             com.liferay.portlet.journal.NoSuchArticleException;
301 
302     public com.liferay.portlet.journal.model.JournalArticle[] findByG_S_PrevAndNext(
303         long id, long groupId, java.lang.String structureId,
304         com.liferay.portal.kernel.util.OrderByComparator obc)
305         throws com.liferay.portal.SystemException,
306             com.liferay.portlet.journal.NoSuchArticleException;
307 
308     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_T(
309         long groupId, java.lang.String templateId)
310         throws com.liferay.portal.SystemException;
311 
312     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_T(
313         long groupId, java.lang.String templateId, int start, int end)
314         throws com.liferay.portal.SystemException;
315 
316     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_T(
317         long groupId, java.lang.String templateId, int start, int end,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException;
320 
321     public com.liferay.portlet.journal.model.JournalArticle findByG_T_First(
322         long groupId, java.lang.String templateId,
323         com.liferay.portal.kernel.util.OrderByComparator obc)
324         throws com.liferay.portal.SystemException,
325             com.liferay.portlet.journal.NoSuchArticleException;
326 
327     public com.liferay.portlet.journal.model.JournalArticle findByG_T_Last(
328         long groupId, java.lang.String templateId,
329         com.liferay.portal.kernel.util.OrderByComparator obc)
330         throws com.liferay.portal.SystemException,
331             com.liferay.portlet.journal.NoSuchArticleException;
332 
333     public com.liferay.portlet.journal.model.JournalArticle[] findByG_T_PrevAndNext(
334         long id, long groupId, java.lang.String templateId,
335         com.liferay.portal.kernel.util.OrderByComparator obc)
336         throws com.liferay.portal.SystemException,
337             com.liferay.portlet.journal.NoSuchArticleException;
338 
339     public com.liferay.portlet.journal.model.JournalArticle findByG_A_V(
340         long groupId, java.lang.String articleId, double version)
341         throws com.liferay.portal.SystemException,
342             com.liferay.portlet.journal.NoSuchArticleException;
343 
344     public com.liferay.portlet.journal.model.JournalArticle fetchByG_A_V(
345         long groupId, java.lang.String articleId, double version)
346         throws com.liferay.portal.SystemException;
347 
348     public com.liferay.portlet.journal.model.JournalArticle fetchByG_A_V(
349         long groupId, java.lang.String articleId, double version,
350         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
351 
352     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_A_A(
353         long groupId, java.lang.String articleId, boolean approved)
354         throws com.liferay.portal.SystemException;
355 
356     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_A_A(
357         long groupId, java.lang.String articleId, boolean approved, int start,
358         int end) throws com.liferay.portal.SystemException;
359 
360     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByG_A_A(
361         long groupId, java.lang.String articleId, boolean approved, int start,
362         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
363         throws com.liferay.portal.SystemException;
364 
365     public com.liferay.portlet.journal.model.JournalArticle findByG_A_A_First(
366         long groupId, java.lang.String articleId, boolean approved,
367         com.liferay.portal.kernel.util.OrderByComparator obc)
368         throws com.liferay.portal.SystemException,
369             com.liferay.portlet.journal.NoSuchArticleException;
370 
371     public com.liferay.portlet.journal.model.JournalArticle findByG_A_A_Last(
372         long groupId, java.lang.String articleId, boolean approved,
373         com.liferay.portal.kernel.util.OrderByComparator obc)
374         throws com.liferay.portal.SystemException,
375             com.liferay.portlet.journal.NoSuchArticleException;
376 
377     public com.liferay.portlet.journal.model.JournalArticle[] findByG_A_A_PrevAndNext(
378         long id, long groupId, java.lang.String articleId, boolean approved,
379         com.liferay.portal.kernel.util.OrderByComparator obc)
380         throws com.liferay.portal.SystemException,
381             com.liferay.portlet.journal.NoSuchArticleException;
382 
383     public java.util.List<Object> findWithDynamicQuery(
384         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
385         throws com.liferay.portal.SystemException;
386 
387     public java.util.List<Object> findWithDynamicQuery(
388         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
389         int end) throws com.liferay.portal.SystemException;
390 
391     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findAll()
392         throws com.liferay.portal.SystemException;
393 
394     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findAll(
395         int start, int end) throws com.liferay.portal.SystemException;
396 
397     public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findAll(
398         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
399         throws com.liferay.portal.SystemException;
400 
401     public void removeByUuid(java.lang.String uuid)
402         throws com.liferay.portal.SystemException;
403 
404     public void removeByUUID_G(java.lang.String uuid, long groupId)
405         throws com.liferay.portal.SystemException,
406             com.liferay.portlet.journal.NoSuchArticleException;
407 
408     public void removeByGroupId(long groupId)
409         throws com.liferay.portal.SystemException;
410 
411     public void removeByCompanyId(long companyId)
412         throws com.liferay.portal.SystemException;
413 
414     public void removeBySmallImageId(long smallImageId)
415         throws com.liferay.portal.SystemException;
416 
417     public void removeByR_A(long resourcePrimKey, boolean approved)
418         throws com.liferay.portal.SystemException;
419 
420     public void removeByG_A(long groupId, java.lang.String articleId)
421         throws com.liferay.portal.SystemException;
422 
423     public void removeByG_S(long groupId, java.lang.String structureId)
424         throws com.liferay.portal.SystemException;
425 
426     public void removeByG_T(long groupId, java.lang.String templateId)
427         throws com.liferay.portal.SystemException;
428 
429     public void removeByG_A_V(long groupId, java.lang.String articleId,
430         double version)
431         throws com.liferay.portal.SystemException,
432             com.liferay.portlet.journal.NoSuchArticleException;
433 
434     public void removeByG_A_A(long groupId, java.lang.String articleId,
435         boolean approved) throws com.liferay.portal.SystemException;
436 
437     public void removeAll() throws com.liferay.portal.SystemException;
438 
439     public int countByUuid(java.lang.String uuid)
440         throws com.liferay.portal.SystemException;
441 
442     public int countByUUID_G(java.lang.String uuid, long groupId)
443         throws com.liferay.portal.SystemException;
444 
445     public int countByGroupId(long groupId)
446         throws com.liferay.portal.SystemException;
447 
448     public int countByCompanyId(long companyId)
449         throws com.liferay.portal.SystemException;
450 
451     public int countBySmallImageId(long smallImageId)
452         throws com.liferay.portal.SystemException;
453 
454     public int countByR_A(long resourcePrimKey, boolean approved)
455         throws com.liferay.portal.SystemException;
456 
457     public int countByG_A(long groupId, java.lang.String articleId)
458         throws com.liferay.portal.SystemException;
459 
460     public int countByG_S(long groupId, java.lang.String structureId)
461         throws com.liferay.portal.SystemException;
462 
463     public int countByG_T(long groupId, java.lang.String templateId)
464         throws com.liferay.portal.SystemException;
465 
466     public int countByG_A_V(long groupId, java.lang.String articleId,
467         double version) throws com.liferay.portal.SystemException;
468 
469     public int countByG_A_A(long groupId, java.lang.String articleId,
470         boolean approved) throws com.liferay.portal.SystemException;
471 
472     public int countAll() throws com.liferay.portal.SystemException;
473 }