001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.journal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.journal.model.JournalTemplate;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the journal template service. This utility wraps {@link JournalTemplatePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see JournalTemplatePersistence
037     * @see JournalTemplatePersistenceImpl
038     * @generated
039     */
040    public class JournalTemplateUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(JournalTemplate journalTemplate) {
058                    getPersistence().clearCache(journalTemplate);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<JournalTemplate> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<JournalTemplate> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<JournalTemplate> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static JournalTemplate update(JournalTemplate journalTemplate)
101                    throws SystemException {
102                    return getPersistence().update(journalTemplate);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static JournalTemplate update(JournalTemplate journalTemplate,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(journalTemplate, serviceContext);
111            }
112    
113            /**
114            * Returns all the journal templates where uuid = &#63;.
115            *
116            * @param uuid the uuid
117            * @return the matching journal templates
118            * @throws SystemException if a system exception occurred
119            */
120            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
121                    java.lang.String uuid)
122                    throws com.liferay.portal.kernel.exception.SystemException {
123                    return getPersistence().findByUuid(uuid);
124            }
125    
126            /**
127            * Returns a range of all the journal templates where uuid = &#63;.
128            *
129            * <p>
130            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
131            * </p>
132            *
133            * @param uuid the uuid
134            * @param start the lower bound of the range of journal templates
135            * @param end the upper bound of the range of journal templates (not inclusive)
136            * @return the range of matching journal templates
137            * @throws SystemException if a system exception occurred
138            */
139            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
140                    java.lang.String uuid, int start, int end)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().findByUuid(uuid, start, end);
143            }
144    
145            /**
146            * Returns an ordered range of all the journal templates where uuid = &#63;.
147            *
148            * <p>
149            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
150            * </p>
151            *
152            * @param uuid the uuid
153            * @param start the lower bound of the range of journal templates
154            * @param end the upper bound of the range of journal templates (not inclusive)
155            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
156            * @return the ordered range of matching journal templates
157            * @throws SystemException if a system exception occurred
158            */
159            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
160                    java.lang.String uuid, int start, int end,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
164            }
165    
166            /**
167            * Returns the first journal template in the ordered set where uuid = &#63;.
168            *
169            * @param uuid the uuid
170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
171            * @return the first matching journal template
172            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.journal.model.JournalTemplate findByUuid_First(
176                    java.lang.String uuid,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.kernel.exception.SystemException,
179                            com.liferay.portlet.journal.NoSuchTemplateException {
180                    return getPersistence().findByUuid_First(uuid, orderByComparator);
181            }
182    
183            /**
184            * Returns the first journal template in the ordered set where uuid = &#63;.
185            *
186            * @param uuid the uuid
187            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
188            * @return the first matching journal template, or <code>null</code> if a matching journal template could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portlet.journal.model.JournalTemplate fetchByUuid_First(
192                    java.lang.String uuid,
193                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
196            }
197    
198            /**
199            * Returns the last journal template in the ordered set where uuid = &#63;.
200            *
201            * @param uuid the uuid
202            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
203            * @return the last matching journal template
204            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
205            * @throws SystemException if a system exception occurred
206            */
207            public static com.liferay.portlet.journal.model.JournalTemplate findByUuid_Last(
208                    java.lang.String uuid,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.kernel.exception.SystemException,
211                            com.liferay.portlet.journal.NoSuchTemplateException {
212                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
213            }
214    
215            /**
216            * Returns the last journal template in the ordered set where uuid = &#63;.
217            *
218            * @param uuid the uuid
219            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
220            * @return the last matching journal template, or <code>null</code> if a matching journal template could not be found
221            * @throws SystemException if a system exception occurred
222            */
223            public static com.liferay.portlet.journal.model.JournalTemplate fetchByUuid_Last(
224                    java.lang.String uuid,
225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
228            }
229    
230            /**
231            * Returns the journal templates before and after the current journal template in the ordered set where uuid = &#63;.
232            *
233            * @param id the primary key of the current journal template
234            * @param uuid the uuid
235            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
236            * @return the previous, current, and next journal template
237            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public static com.liferay.portlet.journal.model.JournalTemplate[] findByUuid_PrevAndNext(
241                    long id, java.lang.String uuid,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException,
244                            com.liferay.portlet.journal.NoSuchTemplateException {
245                    return getPersistence()
246                                       .findByUuid_PrevAndNext(id, uuid, orderByComparator);
247            }
248    
249            /**
250            * Removes all the journal templates where uuid = &#63; from the database.
251            *
252            * @param uuid the uuid
253            * @throws SystemException if a system exception occurred
254            */
255            public static void removeByUuid(java.lang.String uuid)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    getPersistence().removeByUuid(uuid);
258            }
259    
260            /**
261            * Returns the number of journal templates where uuid = &#63;.
262            *
263            * @param uuid the uuid
264            * @return the number of matching journal templates
265            * @throws SystemException if a system exception occurred
266            */
267            public static int countByUuid(java.lang.String uuid)
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    return getPersistence().countByUuid(uuid);
270            }
271    
272            /**
273            * Returns the journal template where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.journal.NoSuchTemplateException} if it could not be found.
274            *
275            * @param uuid the uuid
276            * @param groupId the group ID
277            * @return the matching journal template
278            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public static com.liferay.portlet.journal.model.JournalTemplate findByUUID_G(
282                    java.lang.String uuid, long groupId)
283                    throws com.liferay.portal.kernel.exception.SystemException,
284                            com.liferay.portlet.journal.NoSuchTemplateException {
285                    return getPersistence().findByUUID_G(uuid, groupId);
286            }
287    
288            /**
289            * Returns the journal template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
290            *
291            * @param uuid the uuid
292            * @param groupId the group ID
293            * @return the matching journal template, or <code>null</code> if a matching journal template could not be found
294            * @throws SystemException if a system exception occurred
295            */
296            public static com.liferay.portlet.journal.model.JournalTemplate fetchByUUID_G(
297                    java.lang.String uuid, long groupId)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence().fetchByUUID_G(uuid, groupId);
300            }
301    
302            /**
303            * Returns the journal template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
304            *
305            * @param uuid the uuid
306            * @param groupId the group ID
307            * @param retrieveFromCache whether to use the finder cache
308            * @return the matching journal template, or <code>null</code> if a matching journal template could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public static com.liferay.portlet.journal.model.JournalTemplate fetchByUUID_G(
312                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
313                    throws com.liferay.portal.kernel.exception.SystemException {
314                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
315            }
316    
317            /**
318            * Removes the journal template where uuid = &#63; and groupId = &#63; from the database.
319            *
320            * @param uuid the uuid
321            * @param groupId the group ID
322            * @return the journal template that was removed
323            * @throws SystemException if a system exception occurred
324            */
325            public static com.liferay.portlet.journal.model.JournalTemplate removeByUUID_G(
326                    java.lang.String uuid, long groupId)
327                    throws com.liferay.portal.kernel.exception.SystemException,
328                            com.liferay.portlet.journal.NoSuchTemplateException {
329                    return getPersistence().removeByUUID_G(uuid, groupId);
330            }
331    
332            /**
333            * Returns the number of journal templates where uuid = &#63; and groupId = &#63;.
334            *
335            * @param uuid the uuid
336            * @param groupId the group ID
337            * @return the number of matching journal templates
338            * @throws SystemException if a system exception occurred
339            */
340            public static int countByUUID_G(java.lang.String uuid, long groupId)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().countByUUID_G(uuid, groupId);
343            }
344    
345            /**
346            * Returns all the journal templates where uuid = &#63; and companyId = &#63;.
347            *
348            * @param uuid the uuid
349            * @param companyId the company ID
350            * @return the matching journal templates
351            * @throws SystemException if a system exception occurred
352            */
353            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid_C(
354                    java.lang.String uuid, long companyId)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return getPersistence().findByUuid_C(uuid, companyId);
357            }
358    
359            /**
360            * Returns a range of all the journal templates where uuid = &#63; and companyId = &#63;.
361            *
362            * <p>
363            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
364            * </p>
365            *
366            * @param uuid the uuid
367            * @param companyId the company ID
368            * @param start the lower bound of the range of journal templates
369            * @param end the upper bound of the range of journal templates (not inclusive)
370            * @return the range of matching journal templates
371            * @throws SystemException if a system exception occurred
372            */
373            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid_C(
374                    java.lang.String uuid, long companyId, int start, int end)
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
377            }
378    
379            /**
380            * Returns an ordered range of all the journal templates where uuid = &#63; and companyId = &#63;.
381            *
382            * <p>
383            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
384            * </p>
385            *
386            * @param uuid the uuid
387            * @param companyId the company ID
388            * @param start the lower bound of the range of journal templates
389            * @param end the upper bound of the range of journal templates (not inclusive)
390            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
391            * @return the ordered range of matching journal templates
392            * @throws SystemException if a system exception occurred
393            */
394            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid_C(
395                    java.lang.String uuid, long companyId, int start, int end,
396                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
397                    throws com.liferay.portal.kernel.exception.SystemException {
398                    return getPersistence()
399                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
400            }
401    
402            /**
403            * Returns the first journal template in the ordered set where uuid = &#63; and companyId = &#63;.
404            *
405            * @param uuid the uuid
406            * @param companyId the company ID
407            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
408            * @return the first matching journal template
409            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
410            * @throws SystemException if a system exception occurred
411            */
412            public static com.liferay.portlet.journal.model.JournalTemplate findByUuid_C_First(
413                    java.lang.String uuid, long companyId,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException,
416                            com.liferay.portlet.journal.NoSuchTemplateException {
417                    return getPersistence()
418                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
419            }
420    
421            /**
422            * Returns the first journal template in the ordered set where uuid = &#63; and companyId = &#63;.
423            *
424            * @param uuid the uuid
425            * @param companyId the company ID
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the first matching journal template, or <code>null</code> if a matching journal template could not be found
428            * @throws SystemException if a system exception occurred
429            */
430            public static com.liferay.portlet.journal.model.JournalTemplate fetchByUuid_C_First(
431                    java.lang.String uuid, long companyId,
432                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    return getPersistence()
435                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
436            }
437    
438            /**
439            * Returns the last journal template in the ordered set where uuid = &#63; and companyId = &#63;.
440            *
441            * @param uuid the uuid
442            * @param companyId the company ID
443            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
444            * @return the last matching journal template
445            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
446            * @throws SystemException if a system exception occurred
447            */
448            public static com.liferay.portlet.journal.model.JournalTemplate findByUuid_C_Last(
449                    java.lang.String uuid, long companyId,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.kernel.exception.SystemException,
452                            com.liferay.portlet.journal.NoSuchTemplateException {
453                    return getPersistence()
454                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
455            }
456    
457            /**
458            * Returns the last journal template in the ordered set where uuid = &#63; and companyId = &#63;.
459            *
460            * @param uuid the uuid
461            * @param companyId the company ID
462            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
463            * @return the last matching journal template, or <code>null</code> if a matching journal template could not be found
464            * @throws SystemException if a system exception occurred
465            */
466            public static com.liferay.portlet.journal.model.JournalTemplate fetchByUuid_C_Last(
467                    java.lang.String uuid, long companyId,
468                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence()
471                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
472            }
473    
474            /**
475            * Returns the journal templates before and after the current journal template in the ordered set where uuid = &#63; and companyId = &#63;.
476            *
477            * @param id the primary key of the current journal template
478            * @param uuid the uuid
479            * @param companyId the company ID
480            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
481            * @return the previous, current, and next journal template
482            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
483            * @throws SystemException if a system exception occurred
484            */
485            public static com.liferay.portlet.journal.model.JournalTemplate[] findByUuid_C_PrevAndNext(
486                    long id, java.lang.String uuid, long companyId,
487                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
488                    throws com.liferay.portal.kernel.exception.SystemException,
489                            com.liferay.portlet.journal.NoSuchTemplateException {
490                    return getPersistence()
491                                       .findByUuid_C_PrevAndNext(id, uuid, companyId,
492                            orderByComparator);
493            }
494    
495            /**
496            * Removes all the journal templates where uuid = &#63; and companyId = &#63; from the database.
497            *
498            * @param uuid the uuid
499            * @param companyId the company ID
500            * @throws SystemException if a system exception occurred
501            */
502            public static void removeByUuid_C(java.lang.String uuid, long companyId)
503                    throws com.liferay.portal.kernel.exception.SystemException {
504                    getPersistence().removeByUuid_C(uuid, companyId);
505            }
506    
507            /**
508            * Returns the number of journal templates where uuid = &#63; and companyId = &#63;.
509            *
510            * @param uuid the uuid
511            * @param companyId the company ID
512            * @return the number of matching journal templates
513            * @throws SystemException if a system exception occurred
514            */
515            public static int countByUuid_C(java.lang.String uuid, long companyId)
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    return getPersistence().countByUuid_C(uuid, companyId);
518            }
519    
520            /**
521            * Returns all the journal templates where groupId = &#63;.
522            *
523            * @param groupId the group ID
524            * @return the matching journal templates
525            * @throws SystemException if a system exception occurred
526            */
527            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
528                    long groupId)
529                    throws com.liferay.portal.kernel.exception.SystemException {
530                    return getPersistence().findByGroupId(groupId);
531            }
532    
533            /**
534            * Returns a range of all the journal templates where groupId = &#63;.
535            *
536            * <p>
537            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
538            * </p>
539            *
540            * @param groupId the group ID
541            * @param start the lower bound of the range of journal templates
542            * @param end the upper bound of the range of journal templates (not inclusive)
543            * @return the range of matching journal templates
544            * @throws SystemException if a system exception occurred
545            */
546            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
547                    long groupId, int start, int end)
548                    throws com.liferay.portal.kernel.exception.SystemException {
549                    return getPersistence().findByGroupId(groupId, start, end);
550            }
551    
552            /**
553            * Returns an ordered range of all the journal templates where groupId = &#63;.
554            *
555            * <p>
556            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
557            * </p>
558            *
559            * @param groupId the group ID
560            * @param start the lower bound of the range of journal templates
561            * @param end the upper bound of the range of journal templates (not inclusive)
562            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
563            * @return the ordered range of matching journal templates
564            * @throws SystemException if a system exception occurred
565            */
566            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
567                    long groupId, int start, int end,
568                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
569                    throws com.liferay.portal.kernel.exception.SystemException {
570                    return getPersistence()
571                                       .findByGroupId(groupId, start, end, orderByComparator);
572            }
573    
574            /**
575            * Returns the first journal template in the ordered set where groupId = &#63;.
576            *
577            * @param groupId the group ID
578            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
579            * @return the first matching journal template
580            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
581            * @throws SystemException if a system exception occurred
582            */
583            public static com.liferay.portlet.journal.model.JournalTemplate findByGroupId_First(
584                    long groupId,
585                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
586                    throws com.liferay.portal.kernel.exception.SystemException,
587                            com.liferay.portlet.journal.NoSuchTemplateException {
588                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
589            }
590    
591            /**
592            * Returns the first journal template in the ordered set where groupId = &#63;.
593            *
594            * @param groupId the group ID
595            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
596            * @return the first matching journal template, or <code>null</code> if a matching journal template could not be found
597            * @throws SystemException if a system exception occurred
598            */
599            public static com.liferay.portlet.journal.model.JournalTemplate fetchByGroupId_First(
600                    long groupId,
601                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
602                    throws com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
604            }
605    
606            /**
607            * Returns the last journal template in the ordered set where groupId = &#63;.
608            *
609            * @param groupId the group ID
610            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
611            * @return the last matching journal template
612            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
613            * @throws SystemException if a system exception occurred
614            */
615            public static com.liferay.portlet.journal.model.JournalTemplate findByGroupId_Last(
616                    long groupId,
617                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
618                    throws com.liferay.portal.kernel.exception.SystemException,
619                            com.liferay.portlet.journal.NoSuchTemplateException {
620                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
621            }
622    
623            /**
624            * Returns the last journal template in the ordered set where groupId = &#63;.
625            *
626            * @param groupId the group ID
627            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
628            * @return the last matching journal template, or <code>null</code> if a matching journal template could not be found
629            * @throws SystemException if a system exception occurred
630            */
631            public static com.liferay.portlet.journal.model.JournalTemplate fetchByGroupId_Last(
632                    long groupId,
633                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
634                    throws com.liferay.portal.kernel.exception.SystemException {
635                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
636            }
637    
638            /**
639            * Returns the journal templates before and after the current journal template in the ordered set where groupId = &#63;.
640            *
641            * @param id the primary key of the current journal template
642            * @param groupId the group ID
643            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
644            * @return the previous, current, and next journal template
645            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
646            * @throws SystemException if a system exception occurred
647            */
648            public static com.liferay.portlet.journal.model.JournalTemplate[] findByGroupId_PrevAndNext(
649                    long id, long groupId,
650                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
651                    throws com.liferay.portal.kernel.exception.SystemException,
652                            com.liferay.portlet.journal.NoSuchTemplateException {
653                    return getPersistence()
654                                       .findByGroupId_PrevAndNext(id, groupId, orderByComparator);
655            }
656    
657            /**
658            * Returns all the journal templates that the user has permission to view where groupId = &#63;.
659            *
660            * @param groupId the group ID
661            * @return the matching journal templates that the user has permission to view
662            * @throws SystemException if a system exception occurred
663            */
664            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> filterFindByGroupId(
665                    long groupId)
666                    throws com.liferay.portal.kernel.exception.SystemException {
667                    return getPersistence().filterFindByGroupId(groupId);
668            }
669    
670            /**
671            * Returns a range of all the journal templates that the user has permission to view where groupId = &#63;.
672            *
673            * <p>
674            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
675            * </p>
676            *
677            * @param groupId the group ID
678            * @param start the lower bound of the range of journal templates
679            * @param end the upper bound of the range of journal templates (not inclusive)
680            * @return the range of matching journal templates that the user has permission to view
681            * @throws SystemException if a system exception occurred
682            */
683            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> filterFindByGroupId(
684                    long groupId, int start, int end)
685                    throws com.liferay.portal.kernel.exception.SystemException {
686                    return getPersistence().filterFindByGroupId(groupId, start, end);
687            }
688    
689            /**
690            * Returns an ordered range of all the journal templates that the user has permissions to view where groupId = &#63;.
691            *
692            * <p>
693            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
694            * </p>
695            *
696            * @param groupId the group ID
697            * @param start the lower bound of the range of journal templates
698            * @param end the upper bound of the range of journal templates (not inclusive)
699            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
700            * @return the ordered range of matching journal templates that the user has permission to view
701            * @throws SystemException if a system exception occurred
702            */
703            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> filterFindByGroupId(
704                    long groupId, int start, int end,
705                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
706                    throws com.liferay.portal.kernel.exception.SystemException {
707                    return getPersistence()
708                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
709            }
710    
711            /**
712            * Returns the journal templates before and after the current journal template in the ordered set of journal templates that the user has permission to view where groupId = &#63;.
713            *
714            * @param id the primary key of the current journal template
715            * @param groupId the group ID
716            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
717            * @return the previous, current, and next journal template
718            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
719            * @throws SystemException if a system exception occurred
720            */
721            public static com.liferay.portlet.journal.model.JournalTemplate[] filterFindByGroupId_PrevAndNext(
722                    long id, long groupId,
723                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
724                    throws com.liferay.portal.kernel.exception.SystemException,
725                            com.liferay.portlet.journal.NoSuchTemplateException {
726                    return getPersistence()
727                                       .filterFindByGroupId_PrevAndNext(id, groupId,
728                            orderByComparator);
729            }
730    
731            /**
732            * Removes all the journal templates where groupId = &#63; from the database.
733            *
734            * @param groupId the group ID
735            * @throws SystemException if a system exception occurred
736            */
737            public static void removeByGroupId(long groupId)
738                    throws com.liferay.portal.kernel.exception.SystemException {
739                    getPersistence().removeByGroupId(groupId);
740            }
741    
742            /**
743            * Returns the number of journal templates where groupId = &#63;.
744            *
745            * @param groupId the group ID
746            * @return the number of matching journal templates
747            * @throws SystemException if a system exception occurred
748            */
749            public static int countByGroupId(long groupId)
750                    throws com.liferay.portal.kernel.exception.SystemException {
751                    return getPersistence().countByGroupId(groupId);
752            }
753    
754            /**
755            * Returns the number of journal templates that the user has permission to view where groupId = &#63;.
756            *
757            * @param groupId the group ID
758            * @return the number of matching journal templates that the user has permission to view
759            * @throws SystemException if a system exception occurred
760            */
761            public static int filterCountByGroupId(long groupId)
762                    throws com.liferay.portal.kernel.exception.SystemException {
763                    return getPersistence().filterCountByGroupId(groupId);
764            }
765    
766            /**
767            * Returns all the journal templates where templateId = &#63;.
768            *
769            * @param templateId the template ID
770            * @return the matching journal templates
771            * @throws SystemException if a system exception occurred
772            */
773            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
774                    java.lang.String templateId)
775                    throws com.liferay.portal.kernel.exception.SystemException {
776                    return getPersistence().findByTemplateId(templateId);
777            }
778    
779            /**
780            * Returns a range of all the journal templates where templateId = &#63;.
781            *
782            * <p>
783            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
784            * </p>
785            *
786            * @param templateId the template ID
787            * @param start the lower bound of the range of journal templates
788            * @param end the upper bound of the range of journal templates (not inclusive)
789            * @return the range of matching journal templates
790            * @throws SystemException if a system exception occurred
791            */
792            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
793                    java.lang.String templateId, int start, int end)
794                    throws com.liferay.portal.kernel.exception.SystemException {
795                    return getPersistence().findByTemplateId(templateId, start, end);
796            }
797    
798            /**
799            * Returns an ordered range of all the journal templates where templateId = &#63;.
800            *
801            * <p>
802            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
803            * </p>
804            *
805            * @param templateId the template ID
806            * @param start the lower bound of the range of journal templates
807            * @param end the upper bound of the range of journal templates (not inclusive)
808            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
809            * @return the ordered range of matching journal templates
810            * @throws SystemException if a system exception occurred
811            */
812            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
813                    java.lang.String templateId, int start, int end,
814                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
815                    throws com.liferay.portal.kernel.exception.SystemException {
816                    return getPersistence()
817                                       .findByTemplateId(templateId, start, end, orderByComparator);
818            }
819    
820            /**
821            * Returns the first journal template in the ordered set where templateId = &#63;.
822            *
823            * @param templateId the template ID
824            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
825            * @return the first matching journal template
826            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
827            * @throws SystemException if a system exception occurred
828            */
829            public static com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_First(
830                    java.lang.String templateId,
831                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
832                    throws com.liferay.portal.kernel.exception.SystemException,
833                            com.liferay.portlet.journal.NoSuchTemplateException {
834                    return getPersistence()
835                                       .findByTemplateId_First(templateId, orderByComparator);
836            }
837    
838            /**
839            * Returns the first journal template in the ordered set where templateId = &#63;.
840            *
841            * @param templateId the template ID
842            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
843            * @return the first matching journal template, or <code>null</code> if a matching journal template could not be found
844            * @throws SystemException if a system exception occurred
845            */
846            public static com.liferay.portlet.journal.model.JournalTemplate fetchByTemplateId_First(
847                    java.lang.String templateId,
848                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
849                    throws com.liferay.portal.kernel.exception.SystemException {
850                    return getPersistence()
851                                       .fetchByTemplateId_First(templateId, orderByComparator);
852            }
853    
854            /**
855            * Returns the last journal template in the ordered set where templateId = &#63;.
856            *
857            * @param templateId the template ID
858            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
859            * @return the last matching journal template
860            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
861            * @throws SystemException if a system exception occurred
862            */
863            public static com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_Last(
864                    java.lang.String templateId,
865                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
866                    throws com.liferay.portal.kernel.exception.SystemException,
867                            com.liferay.portlet.journal.NoSuchTemplateException {
868                    return getPersistence()
869                                       .findByTemplateId_Last(templateId, orderByComparator);
870            }
871    
872            /**
873            * Returns the last journal template in the ordered set where templateId = &#63;.
874            *
875            * @param templateId the template ID
876            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
877            * @return the last matching journal template, or <code>null</code> if a matching journal template could not be found
878            * @throws SystemException if a system exception occurred
879            */
880            public static com.liferay.portlet.journal.model.JournalTemplate fetchByTemplateId_Last(
881                    java.lang.String templateId,
882                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
883                    throws com.liferay.portal.kernel.exception.SystemException {
884                    return getPersistence()
885                                       .fetchByTemplateId_Last(templateId, orderByComparator);
886            }
887    
888            /**
889            * Returns the journal templates before and after the current journal template in the ordered set where templateId = &#63;.
890            *
891            * @param id the primary key of the current journal template
892            * @param templateId the template ID
893            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
894            * @return the previous, current, and next journal template
895            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
896            * @throws SystemException if a system exception occurred
897            */
898            public static com.liferay.portlet.journal.model.JournalTemplate[] findByTemplateId_PrevAndNext(
899                    long id, java.lang.String templateId,
900                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
901                    throws com.liferay.portal.kernel.exception.SystemException,
902                            com.liferay.portlet.journal.NoSuchTemplateException {
903                    return getPersistence()
904                                       .findByTemplateId_PrevAndNext(id, templateId,
905                            orderByComparator);
906            }
907    
908            /**
909            * Removes all the journal templates where templateId = &#63; from the database.
910            *
911            * @param templateId the template ID
912            * @throws SystemException if a system exception occurred
913            */
914            public static void removeByTemplateId(java.lang.String templateId)
915                    throws com.liferay.portal.kernel.exception.SystemException {
916                    getPersistence().removeByTemplateId(templateId);
917            }
918    
919            /**
920            * Returns the number of journal templates where templateId = &#63;.
921            *
922            * @param templateId the template ID
923            * @return the number of matching journal templates
924            * @throws SystemException if a system exception occurred
925            */
926            public static int countByTemplateId(java.lang.String templateId)
927                    throws com.liferay.portal.kernel.exception.SystemException {
928                    return getPersistence().countByTemplateId(templateId);
929            }
930    
931            /**
932            * Returns all the journal templates where structureId = &#63;.
933            *
934            * @param structureId the structure ID
935            * @return the matching journal templates
936            * @throws SystemException if a system exception occurred
937            */
938            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByStructureId(
939                    java.lang.String structureId)
940                    throws com.liferay.portal.kernel.exception.SystemException {
941                    return getPersistence().findByStructureId(structureId);
942            }
943    
944            /**
945            * Returns a range of all the journal templates where structureId = &#63;.
946            *
947            * <p>
948            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
949            * </p>
950            *
951            * @param structureId the structure ID
952            * @param start the lower bound of the range of journal templates
953            * @param end the upper bound of the range of journal templates (not inclusive)
954            * @return the range of matching journal templates
955            * @throws SystemException if a system exception occurred
956            */
957            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByStructureId(
958                    java.lang.String structureId, int start, int end)
959                    throws com.liferay.portal.kernel.exception.SystemException {
960                    return getPersistence().findByStructureId(structureId, start, end);
961            }
962    
963            /**
964            * Returns an ordered range of all the journal templates where structureId = &#63;.
965            *
966            * <p>
967            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
968            * </p>
969            *
970            * @param structureId the structure ID
971            * @param start the lower bound of the range of journal templates
972            * @param end the upper bound of the range of journal templates (not inclusive)
973            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
974            * @return the ordered range of matching journal templates
975            * @throws SystemException if a system exception occurred
976            */
977            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByStructureId(
978                    java.lang.String structureId, int start, int end,
979                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
980                    throws com.liferay.portal.kernel.exception.SystemException {
981                    return getPersistence()
982                                       .findByStructureId(structureId, start, end, orderByComparator);
983            }
984    
985            /**
986            * Returns the first journal template in the ordered set where structureId = &#63;.
987            *
988            * @param structureId the structure ID
989            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
990            * @return the first matching journal template
991            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
992            * @throws SystemException if a system exception occurred
993            */
994            public static com.liferay.portlet.journal.model.JournalTemplate findByStructureId_First(
995                    java.lang.String structureId,
996                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
997                    throws com.liferay.portal.kernel.exception.SystemException,
998                            com.liferay.portlet.journal.NoSuchTemplateException {
999                    return getPersistence()
1000                                       .findByStructureId_First(structureId, orderByComparator);
1001            }
1002    
1003            /**
1004            * Returns the first journal template in the ordered set where structureId = &#63;.
1005            *
1006            * @param structureId the structure ID
1007            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1008            * @return the first matching journal template, or <code>null</code> if a matching journal template could not be found
1009            * @throws SystemException if a system exception occurred
1010            */
1011            public static com.liferay.portlet.journal.model.JournalTemplate fetchByStructureId_First(
1012                    java.lang.String structureId,
1013                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1014                    throws com.liferay.portal.kernel.exception.SystemException {
1015                    return getPersistence()
1016                                       .fetchByStructureId_First(structureId, orderByComparator);
1017            }
1018    
1019            /**
1020            * Returns the last journal template in the ordered set where structureId = &#63;.
1021            *
1022            * @param structureId the structure ID
1023            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1024            * @return the last matching journal template
1025            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
1026            * @throws SystemException if a system exception occurred
1027            */
1028            public static com.liferay.portlet.journal.model.JournalTemplate findByStructureId_Last(
1029                    java.lang.String structureId,
1030                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1031                    throws com.liferay.portal.kernel.exception.SystemException,
1032                            com.liferay.portlet.journal.NoSuchTemplateException {
1033                    return getPersistence()
1034                                       .findByStructureId_Last(structureId, orderByComparator);
1035            }
1036    
1037            /**
1038            * Returns the last journal template in the ordered set where structureId = &#63;.
1039            *
1040            * @param structureId the structure ID
1041            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1042            * @return the last matching journal template, or <code>null</code> if a matching journal template could not be found
1043            * @throws SystemException if a system exception occurred
1044            */
1045            public static com.liferay.portlet.journal.model.JournalTemplate fetchByStructureId_Last(
1046                    java.lang.String structureId,
1047                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1048                    throws com.liferay.portal.kernel.exception.SystemException {
1049                    return getPersistence()
1050                                       .fetchByStructureId_Last(structureId, orderByComparator);
1051            }
1052    
1053            /**
1054            * Returns the journal templates before and after the current journal template in the ordered set where structureId = &#63;.
1055            *
1056            * @param id the primary key of the current journal template
1057            * @param structureId the structure ID
1058            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1059            * @return the previous, current, and next journal template
1060            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
1061            * @throws SystemException if a system exception occurred
1062            */
1063            public static com.liferay.portlet.journal.model.JournalTemplate[] findByStructureId_PrevAndNext(
1064                    long id, java.lang.String structureId,
1065                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1066                    throws com.liferay.portal.kernel.exception.SystemException,
1067                            com.liferay.portlet.journal.NoSuchTemplateException {
1068                    return getPersistence()
1069                                       .findByStructureId_PrevAndNext(id, structureId,
1070                            orderByComparator);
1071            }
1072    
1073            /**
1074            * Removes all the journal templates where structureId = &#63; from the database.
1075            *
1076            * @param structureId the structure ID
1077            * @throws SystemException if a system exception occurred
1078            */
1079            public static void removeByStructureId(java.lang.String structureId)
1080                    throws com.liferay.portal.kernel.exception.SystemException {
1081                    getPersistence().removeByStructureId(structureId);
1082            }
1083    
1084            /**
1085            * Returns the number of journal templates where structureId = &#63;.
1086            *
1087            * @param structureId the structure ID
1088            * @return the number of matching journal templates
1089            * @throws SystemException if a system exception occurred
1090            */
1091            public static int countByStructureId(java.lang.String structureId)
1092                    throws com.liferay.portal.kernel.exception.SystemException {
1093                    return getPersistence().countByStructureId(structureId);
1094            }
1095    
1096            /**
1097            * Returns the journal template where smallImageId = &#63; or throws a {@link com.liferay.portlet.journal.NoSuchTemplateException} if it could not be found.
1098            *
1099            * @param smallImageId the small image ID
1100            * @return the matching journal template
1101            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
1102            * @throws SystemException if a system exception occurred
1103            */
1104            public static com.liferay.portlet.journal.model.JournalTemplate findBySmallImageId(
1105                    long smallImageId)
1106                    throws com.liferay.portal.kernel.exception.SystemException,
1107                            com.liferay.portlet.journal.NoSuchTemplateException {
1108                    return getPersistence().findBySmallImageId(smallImageId);
1109            }
1110    
1111            /**
1112            * Returns the journal template where smallImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1113            *
1114            * @param smallImageId the small image ID
1115            * @return the matching journal template, or <code>null</code> if a matching journal template could not be found
1116            * @throws SystemException if a system exception occurred
1117            */
1118            public static com.liferay.portlet.journal.model.JournalTemplate fetchBySmallImageId(
1119                    long smallImageId)
1120                    throws com.liferay.portal.kernel.exception.SystemException {
1121                    return getPersistence().fetchBySmallImageId(smallImageId);
1122            }
1123    
1124            /**
1125            * Returns the journal template where smallImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
1126            *
1127            * @param smallImageId the small image ID
1128            * @param retrieveFromCache whether to use the finder cache
1129            * @return the matching journal template, or <code>null</code> if a matching journal template could not be found
1130            * @throws SystemException if a system exception occurred
1131            */
1132            public static com.liferay.portlet.journal.model.JournalTemplate fetchBySmallImageId(
1133                    long smallImageId, boolean retrieveFromCache)
1134                    throws com.liferay.portal.kernel.exception.SystemException {
1135                    return getPersistence()
1136                                       .fetchBySmallImageId(smallImageId, retrieveFromCache);
1137            }
1138    
1139            /**
1140            * Removes the journal template where smallImageId = &#63; from the database.
1141            *
1142            * @param smallImageId the small image ID
1143            * @return the journal template that was removed
1144            * @throws SystemException if a system exception occurred
1145            */
1146            public static com.liferay.portlet.journal.model.JournalTemplate removeBySmallImageId(
1147                    long smallImageId)
1148                    throws com.liferay.portal.kernel.exception.SystemException,
1149                            com.liferay.portlet.journal.NoSuchTemplateException {
1150                    return getPersistence().removeBySmallImageId(smallImageId);
1151            }
1152    
1153            /**
1154            * Returns the number of journal templates where smallImageId = &#63;.
1155            *
1156            * @param smallImageId the small image ID
1157            * @return the number of matching journal templates
1158            * @throws SystemException if a system exception occurred
1159            */
1160            public static int countBySmallImageId(long smallImageId)
1161                    throws com.liferay.portal.kernel.exception.SystemException {
1162                    return getPersistence().countBySmallImageId(smallImageId);
1163            }
1164    
1165            /**
1166            * Returns the journal template where groupId = &#63; and templateId = &#63; or throws a {@link com.liferay.portlet.journal.NoSuchTemplateException} if it could not be found.
1167            *
1168            * @param groupId the group ID
1169            * @param templateId the template ID
1170            * @return the matching journal template
1171            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
1172            * @throws SystemException if a system exception occurred
1173            */
1174            public static com.liferay.portlet.journal.model.JournalTemplate findByG_T(
1175                    long groupId, java.lang.String templateId)
1176                    throws com.liferay.portal.kernel.exception.SystemException,
1177                            com.liferay.portlet.journal.NoSuchTemplateException {
1178                    return getPersistence().findByG_T(groupId, templateId);
1179            }
1180    
1181            /**
1182            * Returns the journal template where groupId = &#63; and templateId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1183            *
1184            * @param groupId the group ID
1185            * @param templateId the template ID
1186            * @return the matching journal template, or <code>null</code> if a matching journal template could not be found
1187            * @throws SystemException if a system exception occurred
1188            */
1189            public static com.liferay.portlet.journal.model.JournalTemplate fetchByG_T(
1190                    long groupId, java.lang.String templateId)
1191                    throws com.liferay.portal.kernel.exception.SystemException {
1192                    return getPersistence().fetchByG_T(groupId, templateId);
1193            }
1194    
1195            /**
1196            * Returns the journal template where groupId = &#63; and templateId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
1197            *
1198            * @param groupId the group ID
1199            * @param templateId the template ID
1200            * @param retrieveFromCache whether to use the finder cache
1201            * @return the matching journal template, or <code>null</code> if a matching journal template could not be found
1202            * @throws SystemException if a system exception occurred
1203            */
1204            public static com.liferay.portlet.journal.model.JournalTemplate fetchByG_T(
1205                    long groupId, java.lang.String templateId, boolean retrieveFromCache)
1206                    throws com.liferay.portal.kernel.exception.SystemException {
1207                    return getPersistence()
1208                                       .fetchByG_T(groupId, templateId, retrieveFromCache);
1209            }
1210    
1211            /**
1212            * Removes the journal template where groupId = &#63; and templateId = &#63; from the database.
1213            *
1214            * @param groupId the group ID
1215            * @param templateId the template ID
1216            * @return the journal template that was removed
1217            * @throws SystemException if a system exception occurred
1218            */
1219            public static com.liferay.portlet.journal.model.JournalTemplate removeByG_T(
1220                    long groupId, java.lang.String templateId)
1221                    throws com.liferay.portal.kernel.exception.SystemException,
1222                            com.liferay.portlet.journal.NoSuchTemplateException {
1223                    return getPersistence().removeByG_T(groupId, templateId);
1224            }
1225    
1226            /**
1227            * Returns the number of journal templates where groupId = &#63; and templateId = &#63;.
1228            *
1229            * @param groupId the group ID
1230            * @param templateId the template ID
1231            * @return the number of matching journal templates
1232            * @throws SystemException if a system exception occurred
1233            */
1234            public static int countByG_T(long groupId, java.lang.String templateId)
1235                    throws com.liferay.portal.kernel.exception.SystemException {
1236                    return getPersistence().countByG_T(groupId, templateId);
1237            }
1238    
1239            /**
1240            * Returns all the journal templates where groupId = &#63; and structureId = &#63;.
1241            *
1242            * @param groupId the group ID
1243            * @param structureId the structure ID
1244            * @return the matching journal templates
1245            * @throws SystemException if a system exception occurred
1246            */
1247            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
1248                    long groupId, java.lang.String structureId)
1249                    throws com.liferay.portal.kernel.exception.SystemException {
1250                    return getPersistence().findByG_S(groupId, structureId);
1251            }
1252    
1253            /**
1254            * Returns a range of all the journal templates where groupId = &#63; and structureId = &#63;.
1255            *
1256            * <p>
1257            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1258            * </p>
1259            *
1260            * @param groupId the group ID
1261            * @param structureId the structure ID
1262            * @param start the lower bound of the range of journal templates
1263            * @param end the upper bound of the range of journal templates (not inclusive)
1264            * @return the range of matching journal templates
1265            * @throws SystemException if a system exception occurred
1266            */
1267            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
1268                    long groupId, java.lang.String structureId, int start, int end)
1269                    throws com.liferay.portal.kernel.exception.SystemException {
1270                    return getPersistence().findByG_S(groupId, structureId, start, end);
1271            }
1272    
1273            /**
1274            * Returns an ordered range of all the journal templates where groupId = &#63; and structureId = &#63;.
1275            *
1276            * <p>
1277            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1278            * </p>
1279            *
1280            * @param groupId the group ID
1281            * @param structureId the structure ID
1282            * @param start the lower bound of the range of journal templates
1283            * @param end the upper bound of the range of journal templates (not inclusive)
1284            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1285            * @return the ordered range of matching journal templates
1286            * @throws SystemException if a system exception occurred
1287            */
1288            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
1289                    long groupId, java.lang.String structureId, int start, int end,
1290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1291                    throws com.liferay.portal.kernel.exception.SystemException {
1292                    return getPersistence()
1293                                       .findByG_S(groupId, structureId, start, end,
1294                            orderByComparator);
1295            }
1296    
1297            /**
1298            * Returns the first journal template in the ordered set where groupId = &#63; and structureId = &#63;.
1299            *
1300            * @param groupId the group ID
1301            * @param structureId the structure ID
1302            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1303            * @return the first matching journal template
1304            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
1305            * @throws SystemException if a system exception occurred
1306            */
1307            public static com.liferay.portlet.journal.model.JournalTemplate findByG_S_First(
1308                    long groupId, java.lang.String structureId,
1309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1310                    throws com.liferay.portal.kernel.exception.SystemException,
1311                            com.liferay.portlet.journal.NoSuchTemplateException {
1312                    return getPersistence()
1313                                       .findByG_S_First(groupId, structureId, orderByComparator);
1314            }
1315    
1316            /**
1317            * Returns the first journal template in the ordered set where groupId = &#63; and structureId = &#63;.
1318            *
1319            * @param groupId the group ID
1320            * @param structureId the structure ID
1321            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1322            * @return the first matching journal template, or <code>null</code> if a matching journal template could not be found
1323            * @throws SystemException if a system exception occurred
1324            */
1325            public static com.liferay.portlet.journal.model.JournalTemplate fetchByG_S_First(
1326                    long groupId, java.lang.String structureId,
1327                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1328                    throws com.liferay.portal.kernel.exception.SystemException {
1329                    return getPersistence()
1330                                       .fetchByG_S_First(groupId, structureId, orderByComparator);
1331            }
1332    
1333            /**
1334            * Returns the last journal template in the ordered set where groupId = &#63; and structureId = &#63;.
1335            *
1336            * @param groupId the group ID
1337            * @param structureId the structure ID
1338            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1339            * @return the last matching journal template
1340            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a matching journal template could not be found
1341            * @throws SystemException if a system exception occurred
1342            */
1343            public static com.liferay.portlet.journal.model.JournalTemplate findByG_S_Last(
1344                    long groupId, java.lang.String structureId,
1345                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1346                    throws com.liferay.portal.kernel.exception.SystemException,
1347                            com.liferay.portlet.journal.NoSuchTemplateException {
1348                    return getPersistence()
1349                                       .findByG_S_Last(groupId, structureId, orderByComparator);
1350            }
1351    
1352            /**
1353            * Returns the last journal template in the ordered set where groupId = &#63; and structureId = &#63;.
1354            *
1355            * @param groupId the group ID
1356            * @param structureId the structure ID
1357            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1358            * @return the last matching journal template, or <code>null</code> if a matching journal template could not be found
1359            * @throws SystemException if a system exception occurred
1360            */
1361            public static com.liferay.portlet.journal.model.JournalTemplate fetchByG_S_Last(
1362                    long groupId, java.lang.String structureId,
1363                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1364                    throws com.liferay.portal.kernel.exception.SystemException {
1365                    return getPersistence()
1366                                       .fetchByG_S_Last(groupId, structureId, orderByComparator);
1367            }
1368    
1369            /**
1370            * Returns the journal templates before and after the current journal template in the ordered set where groupId = &#63; and structureId = &#63;.
1371            *
1372            * @param id the primary key of the current journal template
1373            * @param groupId the group ID
1374            * @param structureId the structure ID
1375            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1376            * @return the previous, current, and next journal template
1377            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
1378            * @throws SystemException if a system exception occurred
1379            */
1380            public static com.liferay.portlet.journal.model.JournalTemplate[] findByG_S_PrevAndNext(
1381                    long id, long groupId, java.lang.String structureId,
1382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1383                    throws com.liferay.portal.kernel.exception.SystemException,
1384                            com.liferay.portlet.journal.NoSuchTemplateException {
1385                    return getPersistence()
1386                                       .findByG_S_PrevAndNext(id, groupId, structureId,
1387                            orderByComparator);
1388            }
1389    
1390            /**
1391            * Returns all the journal templates that the user has permission to view where groupId = &#63; and structureId = &#63;.
1392            *
1393            * @param groupId the group ID
1394            * @param structureId the structure ID
1395            * @return the matching journal templates that the user has permission to view
1396            * @throws SystemException if a system exception occurred
1397            */
1398            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> filterFindByG_S(
1399                    long groupId, java.lang.String structureId)
1400                    throws com.liferay.portal.kernel.exception.SystemException {
1401                    return getPersistence().filterFindByG_S(groupId, structureId);
1402            }
1403    
1404            /**
1405            * Returns a range of all the journal templates that the user has permission to view where groupId = &#63; and structureId = &#63;.
1406            *
1407            * <p>
1408            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1409            * </p>
1410            *
1411            * @param groupId the group ID
1412            * @param structureId the structure ID
1413            * @param start the lower bound of the range of journal templates
1414            * @param end the upper bound of the range of journal templates (not inclusive)
1415            * @return the range of matching journal templates that the user has permission to view
1416            * @throws SystemException if a system exception occurred
1417            */
1418            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> filterFindByG_S(
1419                    long groupId, java.lang.String structureId, int start, int end)
1420                    throws com.liferay.portal.kernel.exception.SystemException {
1421                    return getPersistence().filterFindByG_S(groupId, structureId, start, end);
1422            }
1423    
1424            /**
1425            * Returns an ordered range of all the journal templates that the user has permissions to view where groupId = &#63; and structureId = &#63;.
1426            *
1427            * <p>
1428            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1429            * </p>
1430            *
1431            * @param groupId the group ID
1432            * @param structureId the structure ID
1433            * @param start the lower bound of the range of journal templates
1434            * @param end the upper bound of the range of journal templates (not inclusive)
1435            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1436            * @return the ordered range of matching journal templates that the user has permission to view
1437            * @throws SystemException if a system exception occurred
1438            */
1439            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> filterFindByG_S(
1440                    long groupId, java.lang.String structureId, int start, int end,
1441                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1442                    throws com.liferay.portal.kernel.exception.SystemException {
1443                    return getPersistence()
1444                                       .filterFindByG_S(groupId, structureId, start, end,
1445                            orderByComparator);
1446            }
1447    
1448            /**
1449            * Returns the journal templates before and after the current journal template in the ordered set of journal templates that the user has permission to view where groupId = &#63; and structureId = &#63;.
1450            *
1451            * @param id the primary key of the current journal template
1452            * @param groupId the group ID
1453            * @param structureId the structure ID
1454            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1455            * @return the previous, current, and next journal template
1456            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
1457            * @throws SystemException if a system exception occurred
1458            */
1459            public static com.liferay.portlet.journal.model.JournalTemplate[] filterFindByG_S_PrevAndNext(
1460                    long id, long groupId, java.lang.String structureId,
1461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1462                    throws com.liferay.portal.kernel.exception.SystemException,
1463                            com.liferay.portlet.journal.NoSuchTemplateException {
1464                    return getPersistence()
1465                                       .filterFindByG_S_PrevAndNext(id, groupId, structureId,
1466                            orderByComparator);
1467            }
1468    
1469            /**
1470            * Removes all the journal templates where groupId = &#63; and structureId = &#63; from the database.
1471            *
1472            * @param groupId the group ID
1473            * @param structureId the structure ID
1474            * @throws SystemException if a system exception occurred
1475            */
1476            public static void removeByG_S(long groupId, java.lang.String structureId)
1477                    throws com.liferay.portal.kernel.exception.SystemException {
1478                    getPersistence().removeByG_S(groupId, structureId);
1479            }
1480    
1481            /**
1482            * Returns the number of journal templates where groupId = &#63; and structureId = &#63;.
1483            *
1484            * @param groupId the group ID
1485            * @param structureId the structure ID
1486            * @return the number of matching journal templates
1487            * @throws SystemException if a system exception occurred
1488            */
1489            public static int countByG_S(long groupId, java.lang.String structureId)
1490                    throws com.liferay.portal.kernel.exception.SystemException {
1491                    return getPersistence().countByG_S(groupId, structureId);
1492            }
1493    
1494            /**
1495            * Returns the number of journal templates that the user has permission to view where groupId = &#63; and structureId = &#63;.
1496            *
1497            * @param groupId the group ID
1498            * @param structureId the structure ID
1499            * @return the number of matching journal templates that the user has permission to view
1500            * @throws SystemException if a system exception occurred
1501            */
1502            public static int filterCountByG_S(long groupId,
1503                    java.lang.String structureId)
1504                    throws com.liferay.portal.kernel.exception.SystemException {
1505                    return getPersistence().filterCountByG_S(groupId, structureId);
1506            }
1507    
1508            /**
1509            * Caches the journal template in the entity cache if it is enabled.
1510            *
1511            * @param journalTemplate the journal template
1512            */
1513            public static void cacheResult(
1514                    com.liferay.portlet.journal.model.JournalTemplate journalTemplate) {
1515                    getPersistence().cacheResult(journalTemplate);
1516            }
1517    
1518            /**
1519            * Caches the journal templates in the entity cache if it is enabled.
1520            *
1521            * @param journalTemplates the journal templates
1522            */
1523            public static void cacheResult(
1524                    java.util.List<com.liferay.portlet.journal.model.JournalTemplate> journalTemplates) {
1525                    getPersistence().cacheResult(journalTemplates);
1526            }
1527    
1528            /**
1529            * Creates a new journal template with the primary key. Does not add the journal template to the database.
1530            *
1531            * @param id the primary key for the new journal template
1532            * @return the new journal template
1533            */
1534            public static com.liferay.portlet.journal.model.JournalTemplate create(
1535                    long id) {
1536                    return getPersistence().create(id);
1537            }
1538    
1539            /**
1540            * Removes the journal template with the primary key from the database. Also notifies the appropriate model listeners.
1541            *
1542            * @param id the primary key of the journal template
1543            * @return the journal template that was removed
1544            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
1545            * @throws SystemException if a system exception occurred
1546            */
1547            public static com.liferay.portlet.journal.model.JournalTemplate remove(
1548                    long id)
1549                    throws com.liferay.portal.kernel.exception.SystemException,
1550                            com.liferay.portlet.journal.NoSuchTemplateException {
1551                    return getPersistence().remove(id);
1552            }
1553    
1554            public static com.liferay.portlet.journal.model.JournalTemplate updateImpl(
1555                    com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
1556                    throws com.liferay.portal.kernel.exception.SystemException {
1557                    return getPersistence().updateImpl(journalTemplate);
1558            }
1559    
1560            /**
1561            * Returns the journal template with the primary key or throws a {@link com.liferay.portlet.journal.NoSuchTemplateException} if it could not be found.
1562            *
1563            * @param id the primary key of the journal template
1564            * @return the journal template
1565            * @throws com.liferay.portlet.journal.NoSuchTemplateException if a journal template with the primary key could not be found
1566            * @throws SystemException if a system exception occurred
1567            */
1568            public static com.liferay.portlet.journal.model.JournalTemplate findByPrimaryKey(
1569                    long id)
1570                    throws com.liferay.portal.kernel.exception.SystemException,
1571                            com.liferay.portlet.journal.NoSuchTemplateException {
1572                    return getPersistence().findByPrimaryKey(id);
1573            }
1574    
1575            /**
1576            * Returns the journal template with the primary key or returns <code>null</code> if it could not be found.
1577            *
1578            * @param id the primary key of the journal template
1579            * @return the journal template, or <code>null</code> if a journal template with the primary key could not be found
1580            * @throws SystemException if a system exception occurred
1581            */
1582            public static com.liferay.portlet.journal.model.JournalTemplate fetchByPrimaryKey(
1583                    long id) throws com.liferay.portal.kernel.exception.SystemException {
1584                    return getPersistence().fetchByPrimaryKey(id);
1585            }
1586    
1587            /**
1588            * Returns all the journal templates.
1589            *
1590            * @return the journal templates
1591            * @throws SystemException if a system exception occurred
1592            */
1593            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll()
1594                    throws com.liferay.portal.kernel.exception.SystemException {
1595                    return getPersistence().findAll();
1596            }
1597    
1598            /**
1599            * Returns a range of all the journal templates.
1600            *
1601            * <p>
1602            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1603            * </p>
1604            *
1605            * @param start the lower bound of the range of journal templates
1606            * @param end the upper bound of the range of journal templates (not inclusive)
1607            * @return the range of journal templates
1608            * @throws SystemException if a system exception occurred
1609            */
1610            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
1611                    int start, int end)
1612                    throws com.liferay.portal.kernel.exception.SystemException {
1613                    return getPersistence().findAll(start, end);
1614            }
1615    
1616            /**
1617            * Returns an ordered range of all the journal templates.
1618            *
1619            * <p>
1620            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1621            * </p>
1622            *
1623            * @param start the lower bound of the range of journal templates
1624            * @param end the upper bound of the range of journal templates (not inclusive)
1625            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1626            * @return the ordered range of journal templates
1627            * @throws SystemException if a system exception occurred
1628            */
1629            public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
1630                    int start, int end,
1631                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1632                    throws com.liferay.portal.kernel.exception.SystemException {
1633                    return getPersistence().findAll(start, end, orderByComparator);
1634            }
1635    
1636            /**
1637            * Removes all the journal templates from the database.
1638            *
1639            * @throws SystemException if a system exception occurred
1640            */
1641            public static void removeAll()
1642                    throws com.liferay.portal.kernel.exception.SystemException {
1643                    getPersistence().removeAll();
1644            }
1645    
1646            /**
1647            * Returns the number of journal templates.
1648            *
1649            * @return the number of journal templates
1650            * @throws SystemException if a system exception occurred
1651            */
1652            public static int countAll()
1653                    throws com.liferay.portal.kernel.exception.SystemException {
1654                    return getPersistence().countAll();
1655            }
1656    
1657            public static JournalTemplatePersistence getPersistence() {
1658                    if (_persistence == null) {
1659                            _persistence = (JournalTemplatePersistence)PortalBeanLocatorUtil.locate(JournalTemplatePersistence.class.getName());
1660    
1661                            ReferenceRegistry.registerReference(JournalTemplateUtil.class,
1662                                    "_persistence");
1663                    }
1664    
1665                    return _persistence;
1666            }
1667    
1668            /**
1669             * @deprecated As of 6.2.0
1670             */
1671            public void setPersistence(JournalTemplatePersistence persistence) {
1672            }
1673    
1674            private static JournalTemplatePersistence _persistence;
1675    }