1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.journal.service.persistence;
21  
22  /**
23   * <a href="JournalContentSearchUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class JournalContentSearchUtil {
29      public static void cacheResult(
30          com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch) {
31          getPersistence().cacheResult(journalContentSearch);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> journalContentSearchs) {
36          getPersistence().cacheResult(journalContentSearchs);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.journal.model.JournalContentSearch create(
44          long contentSearchId) {
45          return getPersistence().create(contentSearchId);
46      }
47  
48      public static com.liferay.portlet.journal.model.JournalContentSearch remove(
49          long contentSearchId)
50          throws com.liferay.portal.SystemException,
51              com.liferay.portlet.journal.NoSuchContentSearchException {
52          return getPersistence().remove(contentSearchId);
53      }
54  
55      public static com.liferay.portlet.journal.model.JournalContentSearch remove(
56          com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(journalContentSearch);
59      }
60  
61      /**
62       * @deprecated Use <code>update(JournalContentSearch journalContentSearch, boolean merge)</code>.
63       */
64      public static com.liferay.portlet.journal.model.JournalContentSearch update(
65          com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(journalContentSearch);
68      }
69  
70      /**
71       * Add, update, or merge, the entity. This method also calls the model
72       * listeners to trigger the proper events associated with adding, deleting,
73       * or updating an entity.
74       *
75       * @param        journalContentSearch the entity to add, update, or merge
76       * @param        merge boolean value for whether to merge the entity. The
77       *                default value is false. Setting merge to true is more
78       *                expensive and should only be true when journalContentSearch is
79       *                transient. See LEP-5473 for a detailed discussion of this
80       *                method.
81       * @return        true if the portlet can be displayed via Ajax
82       */
83      public static com.liferay.portlet.journal.model.JournalContentSearch update(
84          com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch,
85          boolean merge) throws com.liferay.portal.SystemException {
86          return getPersistence().update(journalContentSearch, merge);
87      }
88  
89      public static com.liferay.portlet.journal.model.JournalContentSearch updateImpl(
90          com.liferay.portlet.journal.model.JournalContentSearch journalContentSearch,
91          boolean merge) throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(journalContentSearch, merge);
93      }
94  
95      public static com.liferay.portlet.journal.model.JournalContentSearch findByPrimaryKey(
96          long contentSearchId)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.journal.NoSuchContentSearchException {
99          return getPersistence().findByPrimaryKey(contentSearchId);
100     }
101 
102     public static com.liferay.portlet.journal.model.JournalContentSearch fetchByPrimaryKey(
103         long contentSearchId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(contentSearchId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P(
108         long groupId, boolean privateLayout)
109         throws com.liferay.portal.SystemException {
110         return getPersistence().findByG_P(groupId, privateLayout);
111     }
112 
113     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P(
114         long groupId, boolean privateLayout, int start, int end)
115         throws com.liferay.portal.SystemException {
116         return getPersistence().findByG_P(groupId, privateLayout, start, end);
117     }
118 
119     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P(
120         long groupId, boolean privateLayout, int start, int end,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException {
123         return getPersistence()
124                    .findByG_P(groupId, privateLayout, start, end, obc);
125     }
126 
127     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_First(
128         long groupId, boolean privateLayout,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.journal.NoSuchContentSearchException {
132         return getPersistence().findByG_P_First(groupId, privateLayout, obc);
133     }
134 
135     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_Last(
136         long groupId, boolean privateLayout,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.journal.NoSuchContentSearchException {
140         return getPersistence().findByG_P_Last(groupId, privateLayout, obc);
141     }
142 
143     public static com.liferay.portlet.journal.model.JournalContentSearch[] findByG_P_PrevAndNext(
144         long contentSearchId, long groupId, boolean privateLayout,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.journal.NoSuchContentSearchException {
148         return getPersistence()
149                    .findByG_P_PrevAndNext(contentSearchId, groupId,
150             privateLayout, obc);
151     }
152 
153     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_A(
154         long groupId, java.lang.String articleId)
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findByG_A(groupId, articleId);
157     }
158 
159     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_A(
160         long groupId, java.lang.String articleId, int start, int end)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findByG_A(groupId, articleId, start, end);
163     }
164 
165     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_A(
166         long groupId, java.lang.String articleId, int start, int end,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException {
169         return getPersistence().findByG_A(groupId, articleId, start, end, obc);
170     }
171 
172     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_A_First(
173         long groupId, java.lang.String articleId,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.journal.NoSuchContentSearchException {
177         return getPersistence().findByG_A_First(groupId, articleId, obc);
178     }
179 
180     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_A_Last(
181         long groupId, java.lang.String articleId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.journal.NoSuchContentSearchException {
185         return getPersistence().findByG_A_Last(groupId, articleId, obc);
186     }
187 
188     public static com.liferay.portlet.journal.model.JournalContentSearch[] findByG_A_PrevAndNext(
189         long contentSearchId, long groupId, java.lang.String articleId,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException,
192             com.liferay.portlet.journal.NoSuchContentSearchException {
193         return getPersistence()
194                    .findByG_A_PrevAndNext(contentSearchId, groupId, articleId,
195             obc);
196     }
197 
198     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_L(
199         long groupId, boolean privateLayout, long layoutId)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().findByG_P_L(groupId, privateLayout, layoutId);
202     }
203 
204     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_L(
205         long groupId, boolean privateLayout, long layoutId, int start, int end)
206         throws com.liferay.portal.SystemException {
207         return getPersistence()
208                    .findByG_P_L(groupId, privateLayout, layoutId, start, end);
209     }
210 
211     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_L(
212         long groupId, boolean privateLayout, long layoutId, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException {
215         return getPersistence()
216                    .findByG_P_L(groupId, privateLayout, layoutId, start, end,
217             obc);
218     }
219 
220     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_L_First(
221         long groupId, boolean privateLayout, long layoutId,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException,
224             com.liferay.portlet.journal.NoSuchContentSearchException {
225         return getPersistence()
226                    .findByG_P_L_First(groupId, privateLayout, layoutId, obc);
227     }
228 
229     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_L_Last(
230         long groupId, boolean privateLayout, long layoutId,
231         com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.journal.NoSuchContentSearchException {
234         return getPersistence()
235                    .findByG_P_L_Last(groupId, privateLayout, layoutId, obc);
236     }
237 
238     public static com.liferay.portlet.journal.model.JournalContentSearch[] findByG_P_L_PrevAndNext(
239         long contentSearchId, long groupId, boolean privateLayout,
240         long layoutId, com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException,
242             com.liferay.portlet.journal.NoSuchContentSearchException {
243         return getPersistence()
244                    .findByG_P_L_PrevAndNext(contentSearchId, groupId,
245             privateLayout, layoutId, obc);
246     }
247 
248     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_A(
249         long groupId, boolean privateLayout, java.lang.String articleId)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().findByG_P_A(groupId, privateLayout, articleId);
252     }
253 
254     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_A(
255         long groupId, boolean privateLayout, java.lang.String articleId,
256         int start, int end) throws com.liferay.portal.SystemException {
257         return getPersistence()
258                    .findByG_P_A(groupId, privateLayout, articleId, start, end);
259     }
260 
261     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_A(
262         long groupId, boolean privateLayout, java.lang.String articleId,
263         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException {
265         return getPersistence()
266                    .findByG_P_A(groupId, privateLayout, articleId, start, end,
267             obc);
268     }
269 
270     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_A_First(
271         long groupId, boolean privateLayout, java.lang.String articleId,
272         com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.journal.NoSuchContentSearchException {
275         return getPersistence()
276                    .findByG_P_A_First(groupId, privateLayout, articleId, obc);
277     }
278 
279     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_A_Last(
280         long groupId, boolean privateLayout, java.lang.String articleId,
281         com.liferay.portal.kernel.util.OrderByComparator obc)
282         throws com.liferay.portal.SystemException,
283             com.liferay.portlet.journal.NoSuchContentSearchException {
284         return getPersistence()
285                    .findByG_P_A_Last(groupId, privateLayout, articleId, obc);
286     }
287 
288     public static com.liferay.portlet.journal.model.JournalContentSearch[] findByG_P_A_PrevAndNext(
289         long contentSearchId, long groupId, boolean privateLayout,
290         java.lang.String articleId,
291         com.liferay.portal.kernel.util.OrderByComparator obc)
292         throws com.liferay.portal.SystemException,
293             com.liferay.portlet.journal.NoSuchContentSearchException {
294         return getPersistence()
295                    .findByG_P_A_PrevAndNext(contentSearchId, groupId,
296             privateLayout, articleId, obc);
297     }
298 
299     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_L_P(
300         long groupId, boolean privateLayout, long layoutId,
301         java.lang.String portletId) throws com.liferay.portal.SystemException {
302         return getPersistence()
303                    .findByG_P_L_P(groupId, privateLayout, layoutId, portletId);
304     }
305 
306     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_L_P(
307         long groupId, boolean privateLayout, long layoutId,
308         java.lang.String portletId, int start, int end)
309         throws com.liferay.portal.SystemException {
310         return getPersistence()
311                    .findByG_P_L_P(groupId, privateLayout, layoutId, portletId,
312             start, end);
313     }
314 
315     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findByG_P_L_P(
316         long groupId, boolean privateLayout, long layoutId,
317         java.lang.String portletId, int start, int end,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException {
320         return getPersistence()
321                    .findByG_P_L_P(groupId, privateLayout, layoutId, portletId,
322             start, end, obc);
323     }
324 
325     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_L_P_First(
326         long groupId, boolean privateLayout, long layoutId,
327         java.lang.String portletId,
328         com.liferay.portal.kernel.util.OrderByComparator obc)
329         throws com.liferay.portal.SystemException,
330             com.liferay.portlet.journal.NoSuchContentSearchException {
331         return getPersistence()
332                    .findByG_P_L_P_First(groupId, privateLayout, layoutId,
333             portletId, obc);
334     }
335 
336     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_L_P_Last(
337         long groupId, boolean privateLayout, long layoutId,
338         java.lang.String portletId,
339         com.liferay.portal.kernel.util.OrderByComparator obc)
340         throws com.liferay.portal.SystemException,
341             com.liferay.portlet.journal.NoSuchContentSearchException {
342         return getPersistence()
343                    .findByG_P_L_P_Last(groupId, privateLayout, layoutId,
344             portletId, obc);
345     }
346 
347     public static com.liferay.portlet.journal.model.JournalContentSearch[] findByG_P_L_P_PrevAndNext(
348         long contentSearchId, long groupId, boolean privateLayout,
349         long layoutId, java.lang.String portletId,
350         com.liferay.portal.kernel.util.OrderByComparator obc)
351         throws com.liferay.portal.SystemException,
352             com.liferay.portlet.journal.NoSuchContentSearchException {
353         return getPersistence()
354                    .findByG_P_L_P_PrevAndNext(contentSearchId, groupId,
355             privateLayout, layoutId, portletId, obc);
356     }
357 
358     public static com.liferay.portlet.journal.model.JournalContentSearch findByG_P_L_P_A(
359         long groupId, boolean privateLayout, long layoutId,
360         java.lang.String portletId, java.lang.String articleId)
361         throws com.liferay.portal.SystemException,
362             com.liferay.portlet.journal.NoSuchContentSearchException {
363         return getPersistence()
364                    .findByG_P_L_P_A(groupId, privateLayout, layoutId,
365             portletId, articleId);
366     }
367 
368     public static com.liferay.portlet.journal.model.JournalContentSearch fetchByG_P_L_P_A(
369         long groupId, boolean privateLayout, long layoutId,
370         java.lang.String portletId, java.lang.String articleId)
371         throws com.liferay.portal.SystemException {
372         return getPersistence()
373                    .fetchByG_P_L_P_A(groupId, privateLayout, layoutId,
374             portletId, articleId);
375     }
376 
377     public static com.liferay.portlet.journal.model.JournalContentSearch fetchByG_P_L_P_A(
378         long groupId, boolean privateLayout, long layoutId,
379         java.lang.String portletId, java.lang.String articleId,
380         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
381         return getPersistence()
382                    .fetchByG_P_L_P_A(groupId, privateLayout, layoutId,
383             portletId, articleId, retrieveFromCache);
384     }
385 
386     public static java.util.List<Object> findWithDynamicQuery(
387         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
388         throws com.liferay.portal.SystemException {
389         return getPersistence().findWithDynamicQuery(dynamicQuery);
390     }
391 
392     public static java.util.List<Object> findWithDynamicQuery(
393         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
394         int end) throws com.liferay.portal.SystemException {
395         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
396     }
397 
398     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findAll()
399         throws com.liferay.portal.SystemException {
400         return getPersistence().findAll();
401     }
402 
403     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findAll(
404         int start, int end) throws com.liferay.portal.SystemException {
405         return getPersistence().findAll(start, end);
406     }
407 
408     public static java.util.List<com.liferay.portlet.journal.model.JournalContentSearch> findAll(
409         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
410         throws com.liferay.portal.SystemException {
411         return getPersistence().findAll(start, end, obc);
412     }
413 
414     public static void removeByG_P(long groupId, boolean privateLayout)
415         throws com.liferay.portal.SystemException {
416         getPersistence().removeByG_P(groupId, privateLayout);
417     }
418 
419     public static void removeByG_A(long groupId, java.lang.String articleId)
420         throws com.liferay.portal.SystemException {
421         getPersistence().removeByG_A(groupId, articleId);
422     }
423 
424     public static void removeByG_P_L(long groupId, boolean privateLayout,
425         long layoutId) throws com.liferay.portal.SystemException {
426         getPersistence().removeByG_P_L(groupId, privateLayout, layoutId);
427     }
428 
429     public static void removeByG_P_A(long groupId, boolean privateLayout,
430         java.lang.String articleId) throws com.liferay.portal.SystemException {
431         getPersistence().removeByG_P_A(groupId, privateLayout, articleId);
432     }
433 
434     public static void removeByG_P_L_P(long groupId, boolean privateLayout,
435         long layoutId, java.lang.String portletId)
436         throws com.liferay.portal.SystemException {
437         getPersistence()
438             .removeByG_P_L_P(groupId, privateLayout, layoutId, portletId);
439     }
440 
441     public static void removeByG_P_L_P_A(long groupId, boolean privateLayout,
442         long layoutId, java.lang.String portletId, java.lang.String articleId)
443         throws com.liferay.portal.SystemException,
444             com.liferay.portlet.journal.NoSuchContentSearchException {
445         getPersistence()
446             .removeByG_P_L_P_A(groupId, privateLayout, layoutId, portletId,
447             articleId);
448     }
449 
450     public static void removeAll() throws com.liferay.portal.SystemException {
451         getPersistence().removeAll();
452     }
453 
454     public static int countByG_P(long groupId, boolean privateLayout)
455         throws com.liferay.portal.SystemException {
456         return getPersistence().countByG_P(groupId, privateLayout);
457     }
458 
459     public static int countByG_A(long groupId, java.lang.String articleId)
460         throws com.liferay.portal.SystemException {
461         return getPersistence().countByG_A(groupId, articleId);
462     }
463 
464     public static int countByG_P_L(long groupId, boolean privateLayout,
465         long layoutId) throws com.liferay.portal.SystemException {
466         return getPersistence().countByG_P_L(groupId, privateLayout, layoutId);
467     }
468 
469     public static int countByG_P_A(long groupId, boolean privateLayout,
470         java.lang.String articleId) throws com.liferay.portal.SystemException {
471         return getPersistence().countByG_P_A(groupId, privateLayout, articleId);
472     }
473 
474     public static int countByG_P_L_P(long groupId, boolean privateLayout,
475         long layoutId, java.lang.String portletId)
476         throws com.liferay.portal.SystemException {
477         return getPersistence()
478                    .countByG_P_L_P(groupId, privateLayout, layoutId, portletId);
479     }
480 
481     public static int countByG_P_L_P_A(long groupId, boolean privateLayout,
482         long layoutId, java.lang.String portletId, java.lang.String articleId)
483         throws com.liferay.portal.SystemException {
484         return getPersistence()
485                    .countByG_P_L_P_A(groupId, privateLayout, layoutId,
486             portletId, articleId);
487     }
488 
489     public static int countAll() throws com.liferay.portal.SystemException {
490         return getPersistence().countAll();
491     }
492 
493     public static JournalContentSearchPersistence getPersistence() {
494         return _persistence;
495     }
496 
497     public void setPersistence(JournalContentSearchPersistence persistence) {
498         _persistence = persistence;
499     }
500 
501     private static JournalContentSearchPersistence _persistence;
502 }