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  /**
26   * <a href="JournalTemplateUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class JournalTemplateUtil {
32      public static void cacheResult(
33          com.liferay.portlet.journal.model.JournalTemplate journalTemplate) {
34          getPersistence().cacheResult(journalTemplate);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.journal.model.JournalTemplate> journalTemplates) {
39          getPersistence().cacheResult(journalTemplates);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.journal.model.JournalTemplate create(
47          long id) {
48          return getPersistence().create(id);
49      }
50  
51      public static com.liferay.portlet.journal.model.JournalTemplate remove(
52          long id)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.journal.NoSuchTemplateException {
55          return getPersistence().remove(id);
56      }
57  
58      public static com.liferay.portlet.journal.model.JournalTemplate remove(
59          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(journalTemplate);
62      }
63  
64      /**
65       * @deprecated Use <code>update(JournalTemplate journalTemplate, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.journal.model.JournalTemplate update(
68          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(journalTemplate);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        journalTemplate the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when journalTemplate is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portlet.journal.model.JournalTemplate update(
87          com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(journalTemplate, merge);
90      }
91  
92      public static com.liferay.portlet.journal.model.JournalTemplate updateImpl(
93          com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(journalTemplate, merge);
96      }
97  
98      public static com.liferay.portlet.journal.model.JournalTemplate findByPrimaryKey(
99          long id)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.journal.NoSuchTemplateException {
102         return getPersistence().findByPrimaryKey(id);
103     }
104 
105     public static com.liferay.portlet.journal.model.JournalTemplate fetchByPrimaryKey(
106         long id) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(id);
108     }
109 
110     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
111         java.lang.String uuid) throws com.liferay.portal.SystemException {
112         return getPersistence().findByUuid(uuid);
113     }
114 
115     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
116         java.lang.String uuid, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByUuid(uuid, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
122         java.lang.String uuid, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.journal.model.JournalTemplate findByUuid_First(
129         java.lang.String uuid,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.journal.NoSuchTemplateException {
133         return getPersistence().findByUuid_First(uuid, obc);
134     }
135 
136     public static com.liferay.portlet.journal.model.JournalTemplate findByUuid_Last(
137         java.lang.String uuid,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portlet.journal.NoSuchTemplateException {
141         return getPersistence().findByUuid_Last(uuid, obc);
142     }
143 
144     public static com.liferay.portlet.journal.model.JournalTemplate[] findByUuid_PrevAndNext(
145         long id, java.lang.String uuid,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.journal.NoSuchTemplateException {
149         return getPersistence().findByUuid_PrevAndNext(id, uuid, obc);
150     }
151 
152     public static com.liferay.portlet.journal.model.JournalTemplate findByUUID_G(
153         java.lang.String uuid, long groupId)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.journal.NoSuchTemplateException {
156         return getPersistence().findByUUID_G(uuid, groupId);
157     }
158 
159     public static com.liferay.portlet.journal.model.JournalTemplate fetchByUUID_G(
160         java.lang.String uuid, long groupId)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().fetchByUUID_G(uuid, groupId);
163     }
164 
165     public static com.liferay.portlet.journal.model.JournalTemplate fetchByUUID_G(
166         java.lang.String uuid, long groupId, boolean retrieveFromCache)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
169     }
170 
171     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
172         long groupId) throws com.liferay.portal.SystemException {
173         return getPersistence().findByGroupId(groupId);
174     }
175 
176     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
177         long groupId, int start, int end)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findByGroupId(groupId, start, end);
180     }
181 
182     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
183         long groupId, int start, int end,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findByGroupId(groupId, start, end, obc);
187     }
188 
189     public static com.liferay.portlet.journal.model.JournalTemplate findByGroupId_First(
190         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException,
192             com.liferay.portlet.journal.NoSuchTemplateException {
193         return getPersistence().findByGroupId_First(groupId, obc);
194     }
195 
196     public static com.liferay.portlet.journal.model.JournalTemplate findByGroupId_Last(
197         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.journal.NoSuchTemplateException {
200         return getPersistence().findByGroupId_Last(groupId, obc);
201     }
202 
203     public static com.liferay.portlet.journal.model.JournalTemplate[] findByGroupId_PrevAndNext(
204         long id, long groupId,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.journal.NoSuchTemplateException {
208         return getPersistence().findByGroupId_PrevAndNext(id, groupId, obc);
209     }
210 
211     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
212         java.lang.String templateId) throws com.liferay.portal.SystemException {
213         return getPersistence().findByTemplateId(templateId);
214     }
215 
216     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
217         java.lang.String templateId, int start, int end)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findByTemplateId(templateId, start, end);
220     }
221 
222     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
223         java.lang.String templateId, int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator obc)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().findByTemplateId(templateId, start, end, obc);
227     }
228 
229     public static com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_First(
230         java.lang.String templateId,
231         com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.journal.NoSuchTemplateException {
234         return getPersistence().findByTemplateId_First(templateId, obc);
235     }
236 
237     public static com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_Last(
238         java.lang.String templateId,
239         com.liferay.portal.kernel.util.OrderByComparator obc)
240         throws com.liferay.portal.SystemException,
241             com.liferay.portlet.journal.NoSuchTemplateException {
242         return getPersistence().findByTemplateId_Last(templateId, obc);
243     }
244 
245     public static com.liferay.portlet.journal.model.JournalTemplate[] findByTemplateId_PrevAndNext(
246         long id, java.lang.String templateId,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException,
249             com.liferay.portlet.journal.NoSuchTemplateException {
250         return getPersistence().findByTemplateId_PrevAndNext(id, templateId, obc);
251     }
252 
253     public static com.liferay.portlet.journal.model.JournalTemplate findBySmallImageId(
254         long smallImageId)
255         throws com.liferay.portal.SystemException,
256             com.liferay.portlet.journal.NoSuchTemplateException {
257         return getPersistence().findBySmallImageId(smallImageId);
258     }
259 
260     public static com.liferay.portlet.journal.model.JournalTemplate fetchBySmallImageId(
261         long smallImageId) throws com.liferay.portal.SystemException {
262         return getPersistence().fetchBySmallImageId(smallImageId);
263     }
264 
265     public static com.liferay.portlet.journal.model.JournalTemplate fetchBySmallImageId(
266         long smallImageId, boolean retrieveFromCache)
267         throws com.liferay.portal.SystemException {
268         return getPersistence()
269                    .fetchBySmallImageId(smallImageId, retrieveFromCache);
270     }
271 
272     public static com.liferay.portlet.journal.model.JournalTemplate findByG_T(
273         long groupId, java.lang.String templateId)
274         throws com.liferay.portal.SystemException,
275             com.liferay.portlet.journal.NoSuchTemplateException {
276         return getPersistence().findByG_T(groupId, templateId);
277     }
278 
279     public static com.liferay.portlet.journal.model.JournalTemplate fetchByG_T(
280         long groupId, java.lang.String templateId)
281         throws com.liferay.portal.SystemException {
282         return getPersistence().fetchByG_T(groupId, templateId);
283     }
284 
285     public static com.liferay.portlet.journal.model.JournalTemplate fetchByG_T(
286         long groupId, java.lang.String templateId, boolean retrieveFromCache)
287         throws com.liferay.portal.SystemException {
288         return getPersistence()
289                    .fetchByG_T(groupId, templateId, retrieveFromCache);
290     }
291 
292     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
293         long groupId, java.lang.String structureId)
294         throws com.liferay.portal.SystemException {
295         return getPersistence().findByG_S(groupId, structureId);
296     }
297 
298     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
299         long groupId, java.lang.String structureId, int start, int end)
300         throws com.liferay.portal.SystemException {
301         return getPersistence().findByG_S(groupId, structureId, start, end);
302     }
303 
304     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
305         long groupId, java.lang.String structureId, int start, int end,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException {
308         return getPersistence().findByG_S(groupId, structureId, start, end, obc);
309     }
310 
311     public static com.liferay.portlet.journal.model.JournalTemplate findByG_S_First(
312         long groupId, java.lang.String structureId,
313         com.liferay.portal.kernel.util.OrderByComparator obc)
314         throws com.liferay.portal.SystemException,
315             com.liferay.portlet.journal.NoSuchTemplateException {
316         return getPersistence().findByG_S_First(groupId, structureId, obc);
317     }
318 
319     public static com.liferay.portlet.journal.model.JournalTemplate findByG_S_Last(
320         long groupId, java.lang.String structureId,
321         com.liferay.portal.kernel.util.OrderByComparator obc)
322         throws com.liferay.portal.SystemException,
323             com.liferay.portlet.journal.NoSuchTemplateException {
324         return getPersistence().findByG_S_Last(groupId, structureId, obc);
325     }
326 
327     public static com.liferay.portlet.journal.model.JournalTemplate[] findByG_S_PrevAndNext(
328         long id, long groupId, java.lang.String structureId,
329         com.liferay.portal.kernel.util.OrderByComparator obc)
330         throws com.liferay.portal.SystemException,
331             com.liferay.portlet.journal.NoSuchTemplateException {
332         return getPersistence()
333                    .findByG_S_PrevAndNext(id, groupId, structureId, obc);
334     }
335 
336     public static java.util.List<Object> findWithDynamicQuery(
337         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
338         throws com.liferay.portal.SystemException {
339         return getPersistence().findWithDynamicQuery(dynamicQuery);
340     }
341 
342     public static java.util.List<Object> findWithDynamicQuery(
343         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
344         int end) throws com.liferay.portal.SystemException {
345         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
346     }
347 
348     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll()
349         throws com.liferay.portal.SystemException {
350         return getPersistence().findAll();
351     }
352 
353     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
354         int start, int end) throws com.liferay.portal.SystemException {
355         return getPersistence().findAll(start, end);
356     }
357 
358     public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
359         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
360         throws com.liferay.portal.SystemException {
361         return getPersistence().findAll(start, end, obc);
362     }
363 
364     public static void removeByUuid(java.lang.String uuid)
365         throws com.liferay.portal.SystemException {
366         getPersistence().removeByUuid(uuid);
367     }
368 
369     public static void removeByUUID_G(java.lang.String uuid, long groupId)
370         throws com.liferay.portal.SystemException,
371             com.liferay.portlet.journal.NoSuchTemplateException {
372         getPersistence().removeByUUID_G(uuid, groupId);
373     }
374 
375     public static void removeByGroupId(long groupId)
376         throws com.liferay.portal.SystemException {
377         getPersistence().removeByGroupId(groupId);
378     }
379 
380     public static void removeByTemplateId(java.lang.String templateId)
381         throws com.liferay.portal.SystemException {
382         getPersistence().removeByTemplateId(templateId);
383     }
384 
385     public static void removeBySmallImageId(long smallImageId)
386         throws com.liferay.portal.SystemException,
387             com.liferay.portlet.journal.NoSuchTemplateException {
388         getPersistence().removeBySmallImageId(smallImageId);
389     }
390 
391     public static void removeByG_T(long groupId, java.lang.String templateId)
392         throws com.liferay.portal.SystemException,
393             com.liferay.portlet.journal.NoSuchTemplateException {
394         getPersistence().removeByG_T(groupId, templateId);
395     }
396 
397     public static void removeByG_S(long groupId, java.lang.String structureId)
398         throws com.liferay.portal.SystemException {
399         getPersistence().removeByG_S(groupId, structureId);
400     }
401 
402     public static void removeAll() throws com.liferay.portal.SystemException {
403         getPersistence().removeAll();
404     }
405 
406     public static int countByUuid(java.lang.String uuid)
407         throws com.liferay.portal.SystemException {
408         return getPersistence().countByUuid(uuid);
409     }
410 
411     public static int countByUUID_G(java.lang.String uuid, long groupId)
412         throws com.liferay.portal.SystemException {
413         return getPersistence().countByUUID_G(uuid, groupId);
414     }
415 
416     public static int countByGroupId(long groupId)
417         throws com.liferay.portal.SystemException {
418         return getPersistence().countByGroupId(groupId);
419     }
420 
421     public static int countByTemplateId(java.lang.String templateId)
422         throws com.liferay.portal.SystemException {
423         return getPersistence().countByTemplateId(templateId);
424     }
425 
426     public static int countBySmallImageId(long smallImageId)
427         throws com.liferay.portal.SystemException {
428         return getPersistence().countBySmallImageId(smallImageId);
429     }
430 
431     public static int countByG_T(long groupId, java.lang.String templateId)
432         throws com.liferay.portal.SystemException {
433         return getPersistence().countByG_T(groupId, templateId);
434     }
435 
436     public static int countByG_S(long groupId, java.lang.String structureId)
437         throws com.liferay.portal.SystemException {
438         return getPersistence().countByG_S(groupId, structureId);
439     }
440 
441     public static int countAll() throws com.liferay.portal.SystemException {
442         return getPersistence().countAll();
443     }
444 
445     public static JournalTemplatePersistence getPersistence() {
446         return _persistence;
447     }
448 
449     public void setPersistence(JournalTemplatePersistence persistence) {
450         _persistence = persistence;
451     }
452 
453     private static JournalTemplatePersistence _persistence;
454 }