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