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.dynamicdatamapping.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate;
027    
028    import java.util.List;
029    
030    /**
031     * The persistence utility for the d d m template service. This utility wraps {@link DDMTemplatePersistenceImpl} 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.
032     *
033     * <p>
034     * Caching information and settings can be found in <code>portal.properties</code>
035     * </p>
036     *
037     * @author Brian Wing Shun Chan
038     * @see DDMTemplatePersistence
039     * @see DDMTemplatePersistenceImpl
040     * @generated
041     */
042    @ProviderType
043    public class DDMTemplateUtil {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
048             */
049    
050            /**
051             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
052             */
053            public static void clearCache() {
054                    getPersistence().clearCache();
055            }
056    
057            /**
058             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
059             */
060            public static void clearCache(DDMTemplate ddmTemplate) {
061                    getPersistence().clearCache(ddmTemplate);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
066             */
067            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
068                    throws SystemException {
069                    return getPersistence().countWithDynamicQuery(dynamicQuery);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
074             */
075            public static List<DDMTemplate> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery) throws SystemException {
077                    return getPersistence().findWithDynamicQuery(dynamicQuery);
078            }
079    
080            /**
081             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
082             */
083            public static List<DDMTemplate> findWithDynamicQuery(
084                    DynamicQuery dynamicQuery, int start, int end)
085                    throws SystemException {
086                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
091             */
092            public static List<DDMTemplate> findWithDynamicQuery(
093                    DynamicQuery dynamicQuery, int start, int end,
094                    OrderByComparator orderByComparator) throws SystemException {
095                    return getPersistence()
096                                       .findWithDynamicQuery(dynamicQuery, start, end,
097                            orderByComparator);
098            }
099    
100            /**
101             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
102             */
103            public static DDMTemplate update(DDMTemplate ddmTemplate)
104                    throws SystemException {
105                    return getPersistence().update(ddmTemplate);
106            }
107    
108            /**
109             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
110             */
111            public static DDMTemplate update(DDMTemplate ddmTemplate,
112                    ServiceContext serviceContext) throws SystemException {
113                    return getPersistence().update(ddmTemplate, serviceContext);
114            }
115    
116            /**
117            * Returns all the d d m templates where uuid = &#63;.
118            *
119            * @param uuid the uuid
120            * @return the matching d d m templates
121            * @throws SystemException if a system exception occurred
122            */
123            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByUuid(
124                    java.lang.String uuid)
125                    throws com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().findByUuid(uuid);
127            }
128    
129            /**
130            * Returns a range of all the d d m templates where uuid = &#63;.
131            *
132            * <p>
133            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
134            * </p>
135            *
136            * @param uuid the uuid
137            * @param start the lower bound of the range of d d m templates
138            * @param end the upper bound of the range of d d m templates (not inclusive)
139            * @return the range of matching d d m templates
140            * @throws SystemException if a system exception occurred
141            */
142            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByUuid(
143                    java.lang.String uuid, int start, int end)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().findByUuid(uuid, start, end);
146            }
147    
148            /**
149            * Returns an ordered range of all the d d m templates where uuid = &#63;.
150            *
151            * <p>
152            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
153            * </p>
154            *
155            * @param uuid the uuid
156            * @param start the lower bound of the range of d d m templates
157            * @param end the upper bound of the range of d d m templates (not inclusive)
158            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
159            * @return the ordered range of matching d d m templates
160            * @throws SystemException if a system exception occurred
161            */
162            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByUuid(
163                    java.lang.String uuid, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
167            }
168    
169            /**
170            * Returns the first d d m template in the ordered set where uuid = &#63;.
171            *
172            * @param uuid the uuid
173            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
174            * @return the first matching d d m template
175            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByUuid_First(
179                    java.lang.String uuid,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.kernel.exception.SystemException,
182                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
183                    return getPersistence().findByUuid_First(uuid, orderByComparator);
184            }
185    
186            /**
187            * Returns the first d d m template in the ordered set where uuid = &#63;.
188            *
189            * @param uuid the uuid
190            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
191            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByUuid_First(
195                    java.lang.String uuid,
196                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
199            }
200    
201            /**
202            * Returns the last d d m template in the ordered set where uuid = &#63;.
203            *
204            * @param uuid the uuid
205            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
206            * @return the last matching d d m template
207            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
208            * @throws SystemException if a system exception occurred
209            */
210            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByUuid_Last(
211                    java.lang.String uuid,
212                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213                    throws com.liferay.portal.kernel.exception.SystemException,
214                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
215                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
216            }
217    
218            /**
219            * Returns the last d d m template in the ordered set where uuid = &#63;.
220            *
221            * @param uuid the uuid
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByUuid_Last(
227                    java.lang.String uuid,
228                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
231            }
232    
233            /**
234            * Returns the d d m templates before and after the current d d m template in the ordered set where uuid = &#63;.
235            *
236            * @param templateId the primary key of the current d d m template
237            * @param uuid the uuid
238            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
239            * @return the previous, current, and next d d m template
240            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
241            * @throws SystemException if a system exception occurred
242            */
243            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByUuid_PrevAndNext(
244                    long templateId, java.lang.String uuid,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException,
247                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
248                    return getPersistence()
249                                       .findByUuid_PrevAndNext(templateId, uuid, orderByComparator);
250            }
251    
252            /**
253            * Removes all the d d m templates where uuid = &#63; from the database.
254            *
255            * @param uuid the uuid
256            * @throws SystemException if a system exception occurred
257            */
258            public static void removeByUuid(java.lang.String uuid)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    getPersistence().removeByUuid(uuid);
261            }
262    
263            /**
264            * Returns the number of d d m templates where uuid = &#63;.
265            *
266            * @param uuid the uuid
267            * @return the number of matching d d m templates
268            * @throws SystemException if a system exception occurred
269            */
270            public static int countByUuid(java.lang.String uuid)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence().countByUuid(uuid);
273            }
274    
275            /**
276            * Returns the d d m template where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException} if it could not be found.
277            *
278            * @param uuid the uuid
279            * @param groupId the group ID
280            * @return the matching d d m template
281            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
282            * @throws SystemException if a system exception occurred
283            */
284            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByUUID_G(
285                    java.lang.String uuid, long groupId)
286                    throws com.liferay.portal.kernel.exception.SystemException,
287                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
288                    return getPersistence().findByUUID_G(uuid, groupId);
289            }
290    
291            /**
292            * Returns the d d m template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
293            *
294            * @param uuid the uuid
295            * @param groupId the group ID
296            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
297            * @throws SystemException if a system exception occurred
298            */
299            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByUUID_G(
300                    java.lang.String uuid, long groupId)
301                    throws com.liferay.portal.kernel.exception.SystemException {
302                    return getPersistence().fetchByUUID_G(uuid, groupId);
303            }
304    
305            /**
306            * Returns the d d m template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
307            *
308            * @param uuid the uuid
309            * @param groupId the group ID
310            * @param retrieveFromCache whether to use the finder cache
311            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
312            * @throws SystemException if a system exception occurred
313            */
314            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByUUID_G(
315                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
318            }
319    
320            /**
321            * Removes the d d m template where uuid = &#63; and groupId = &#63; from the database.
322            *
323            * @param uuid the uuid
324            * @param groupId the group ID
325            * @return the d d m template that was removed
326            * @throws SystemException if a system exception occurred
327            */
328            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate removeByUUID_G(
329                    java.lang.String uuid, long groupId)
330                    throws com.liferay.portal.kernel.exception.SystemException,
331                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
332                    return getPersistence().removeByUUID_G(uuid, groupId);
333            }
334    
335            /**
336            * Returns the number of d d m templates where uuid = &#63; and groupId = &#63;.
337            *
338            * @param uuid the uuid
339            * @param groupId the group ID
340            * @return the number of matching d d m templates
341            * @throws SystemException if a system exception occurred
342            */
343            public static int countByUUID_G(java.lang.String uuid, long groupId)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getPersistence().countByUUID_G(uuid, groupId);
346            }
347    
348            /**
349            * Returns all the d d m templates where uuid = &#63; and companyId = &#63;.
350            *
351            * @param uuid the uuid
352            * @param companyId the company ID
353            * @return the matching d d m templates
354            * @throws SystemException if a system exception occurred
355            */
356            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByUuid_C(
357                    java.lang.String uuid, long companyId)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence().findByUuid_C(uuid, companyId);
360            }
361    
362            /**
363            * Returns a range of all the d d m templates where uuid = &#63; and companyId = &#63;.
364            *
365            * <p>
366            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
367            * </p>
368            *
369            * @param uuid the uuid
370            * @param companyId the company ID
371            * @param start the lower bound of the range of d d m templates
372            * @param end the upper bound of the range of d d m templates (not inclusive)
373            * @return the range of matching d d m templates
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByUuid_C(
377                    java.lang.String uuid, long companyId, int start, int end)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
380            }
381    
382            /**
383            * Returns an ordered range of all the d d m templates where uuid = &#63; and companyId = &#63;.
384            *
385            * <p>
386            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
387            * </p>
388            *
389            * @param uuid the uuid
390            * @param companyId the company ID
391            * @param start the lower bound of the range of d d m templates
392            * @param end the upper bound of the range of d d m templates (not inclusive)
393            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
394            * @return the ordered range of matching d d m templates
395            * @throws SystemException if a system exception occurred
396            */
397            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByUuid_C(
398                    java.lang.String uuid, long companyId, int start, int end,
399                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
400                    throws com.liferay.portal.kernel.exception.SystemException {
401                    return getPersistence()
402                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
403            }
404    
405            /**
406            * Returns the first d d m template in the ordered set where uuid = &#63; and companyId = &#63;.
407            *
408            * @param uuid the uuid
409            * @param companyId the company ID
410            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
411            * @return the first matching d d m template
412            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
413            * @throws SystemException if a system exception occurred
414            */
415            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByUuid_C_First(
416                    java.lang.String uuid, long companyId,
417                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
418                    throws com.liferay.portal.kernel.exception.SystemException,
419                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
420                    return getPersistence()
421                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
422            }
423    
424            /**
425            * Returns the first d d m template in the ordered set where uuid = &#63; and companyId = &#63;.
426            *
427            * @param uuid the uuid
428            * @param companyId the company ID
429            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
430            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
431            * @throws SystemException if a system exception occurred
432            */
433            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByUuid_C_First(
434                    java.lang.String uuid, long companyId,
435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436                    throws com.liferay.portal.kernel.exception.SystemException {
437                    return getPersistence()
438                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
439            }
440    
441            /**
442            * Returns the last d d m template in the ordered set where uuid = &#63; and companyId = &#63;.
443            *
444            * @param uuid the uuid
445            * @param companyId the company ID
446            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
447            * @return the last matching d d m template
448            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
449            * @throws SystemException if a system exception occurred
450            */
451            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByUuid_C_Last(
452                    java.lang.String uuid, long companyId,
453                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
454                    throws com.liferay.portal.kernel.exception.SystemException,
455                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
456                    return getPersistence()
457                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
458            }
459    
460            /**
461            * Returns the last d d m template in the ordered set where uuid = &#63; and companyId = &#63;.
462            *
463            * @param uuid the uuid
464            * @param companyId the company ID
465            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
466            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
467            * @throws SystemException if a system exception occurred
468            */
469            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByUuid_C_Last(
470                    java.lang.String uuid, long companyId,
471                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence()
474                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
475            }
476    
477            /**
478            * Returns the d d m templates before and after the current d d m template in the ordered set where uuid = &#63; and companyId = &#63;.
479            *
480            * @param templateId the primary key of the current d d m template
481            * @param uuid the uuid
482            * @param companyId the company ID
483            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
484            * @return the previous, current, and next d d m template
485            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
486            * @throws SystemException if a system exception occurred
487            */
488            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByUuid_C_PrevAndNext(
489                    long templateId, java.lang.String uuid, long companyId,
490                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
491                    throws com.liferay.portal.kernel.exception.SystemException,
492                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
493                    return getPersistence()
494                                       .findByUuid_C_PrevAndNext(templateId, uuid, companyId,
495                            orderByComparator);
496            }
497    
498            /**
499            * Removes all the d d m templates where uuid = &#63; and companyId = &#63; from the database.
500            *
501            * @param uuid the uuid
502            * @param companyId the company ID
503            * @throws SystemException if a system exception occurred
504            */
505            public static void removeByUuid_C(java.lang.String uuid, long companyId)
506                    throws com.liferay.portal.kernel.exception.SystemException {
507                    getPersistence().removeByUuid_C(uuid, companyId);
508            }
509    
510            /**
511            * Returns the number of d d m templates where uuid = &#63; and companyId = &#63;.
512            *
513            * @param uuid the uuid
514            * @param companyId the company ID
515            * @return the number of matching d d m templates
516            * @throws SystemException if a system exception occurred
517            */
518            public static int countByUuid_C(java.lang.String uuid, long companyId)
519                    throws com.liferay.portal.kernel.exception.SystemException {
520                    return getPersistence().countByUuid_C(uuid, companyId);
521            }
522    
523            /**
524            * Returns all the d d m templates where groupId = &#63;.
525            *
526            * @param groupId the group ID
527            * @return the matching d d m templates
528            * @throws SystemException if a system exception occurred
529            */
530            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByGroupId(
531                    long groupId)
532                    throws com.liferay.portal.kernel.exception.SystemException {
533                    return getPersistence().findByGroupId(groupId);
534            }
535    
536            /**
537            * Returns a range of all the d d m templates where groupId = &#63;.
538            *
539            * <p>
540            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
541            * </p>
542            *
543            * @param groupId the group ID
544            * @param start the lower bound of the range of d d m templates
545            * @param end the upper bound of the range of d d m templates (not inclusive)
546            * @return the range of matching d d m templates
547            * @throws SystemException if a system exception occurred
548            */
549            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByGroupId(
550                    long groupId, int start, int end)
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    return getPersistence().findByGroupId(groupId, start, end);
553            }
554    
555            /**
556            * Returns an ordered range of all the d d m templates where groupId = &#63;.
557            *
558            * <p>
559            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
560            * </p>
561            *
562            * @param groupId the group ID
563            * @param start the lower bound of the range of d d m templates
564            * @param end the upper bound of the range of d d m templates (not inclusive)
565            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
566            * @return the ordered range of matching d d m templates
567            * @throws SystemException if a system exception occurred
568            */
569            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByGroupId(
570                    long groupId, int start, int end,
571                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
572                    throws com.liferay.portal.kernel.exception.SystemException {
573                    return getPersistence()
574                                       .findByGroupId(groupId, start, end, orderByComparator);
575            }
576    
577            /**
578            * Returns the first d d m template in the ordered set where groupId = &#63;.
579            *
580            * @param groupId the group ID
581            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
582            * @return the first matching d d m template
583            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
584            * @throws SystemException if a system exception occurred
585            */
586            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByGroupId_First(
587                    long groupId,
588                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
589                    throws com.liferay.portal.kernel.exception.SystemException,
590                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
591                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
592            }
593    
594            /**
595            * Returns the first d d m template in the ordered set where groupId = &#63;.
596            *
597            * @param groupId the group ID
598            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
599            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
600            * @throws SystemException if a system exception occurred
601            */
602            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByGroupId_First(
603                    long groupId,
604                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
605                    throws com.liferay.portal.kernel.exception.SystemException {
606                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
607            }
608    
609            /**
610            * Returns the last d d m template in the ordered set where groupId = &#63;.
611            *
612            * @param groupId the group ID
613            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
614            * @return the last matching d d m template
615            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
616            * @throws SystemException if a system exception occurred
617            */
618            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByGroupId_Last(
619                    long groupId,
620                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
621                    throws com.liferay.portal.kernel.exception.SystemException,
622                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
623                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
624            }
625    
626            /**
627            * Returns the last d d m template in the ordered set where groupId = &#63;.
628            *
629            * @param groupId the group ID
630            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
631            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
632            * @throws SystemException if a system exception occurred
633            */
634            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByGroupId_Last(
635                    long groupId,
636                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
637                    throws com.liferay.portal.kernel.exception.SystemException {
638                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
639            }
640    
641            /**
642            * Returns the d d m templates before and after the current d d m template in the ordered set where groupId = &#63;.
643            *
644            * @param templateId the primary key of the current d d m template
645            * @param groupId the group ID
646            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
647            * @return the previous, current, and next d d m template
648            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
649            * @throws SystemException if a system exception occurred
650            */
651            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByGroupId_PrevAndNext(
652                    long templateId, long groupId,
653                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
654                    throws com.liferay.portal.kernel.exception.SystemException,
655                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
656                    return getPersistence()
657                                       .findByGroupId_PrevAndNext(templateId, groupId,
658                            orderByComparator);
659            }
660    
661            /**
662            * Returns all the d d m templates that the user has permission to view where groupId = &#63;.
663            *
664            * @param groupId the group ID
665            * @return the matching d d m templates that the user has permission to view
666            * @throws SystemException if a system exception occurred
667            */
668            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByGroupId(
669                    long groupId)
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence().filterFindByGroupId(groupId);
672            }
673    
674            /**
675            * Returns a range of all the d d m templates that the user has permission to view where groupId = &#63;.
676            *
677            * <p>
678            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
679            * </p>
680            *
681            * @param groupId the group ID
682            * @param start the lower bound of the range of d d m templates
683            * @param end the upper bound of the range of d d m templates (not inclusive)
684            * @return the range of matching d d m templates that the user has permission to view
685            * @throws SystemException if a system exception occurred
686            */
687            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByGroupId(
688                    long groupId, int start, int end)
689                    throws com.liferay.portal.kernel.exception.SystemException {
690                    return getPersistence().filterFindByGroupId(groupId, start, end);
691            }
692    
693            /**
694            * Returns an ordered range of all the d d m templates that the user has permissions to view where groupId = &#63;.
695            *
696            * <p>
697            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
698            * </p>
699            *
700            * @param groupId the group ID
701            * @param start the lower bound of the range of d d m templates
702            * @param end the upper bound of the range of d d m templates (not inclusive)
703            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
704            * @return the ordered range of matching d d m templates that the user has permission to view
705            * @throws SystemException if a system exception occurred
706            */
707            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByGroupId(
708                    long groupId, int start, int end,
709                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
710                    throws com.liferay.portal.kernel.exception.SystemException {
711                    return getPersistence()
712                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
713            }
714    
715            /**
716            * Returns the d d m templates before and after the current d d m template in the ordered set of d d m templates that the user has permission to view where groupId = &#63;.
717            *
718            * @param templateId the primary key of the current d d m template
719            * @param groupId the group ID
720            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
721            * @return the previous, current, and next d d m template
722            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
723            * @throws SystemException if a system exception occurred
724            */
725            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] filterFindByGroupId_PrevAndNext(
726                    long templateId, long groupId,
727                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
728                    throws com.liferay.portal.kernel.exception.SystemException,
729                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
730                    return getPersistence()
731                                       .filterFindByGroupId_PrevAndNext(templateId, groupId,
732                            orderByComparator);
733            }
734    
735            /**
736            * Removes all the d d m templates where groupId = &#63; from the database.
737            *
738            * @param groupId the group ID
739            * @throws SystemException if a system exception occurred
740            */
741            public static void removeByGroupId(long groupId)
742                    throws com.liferay.portal.kernel.exception.SystemException {
743                    getPersistence().removeByGroupId(groupId);
744            }
745    
746            /**
747            * Returns the number of d d m templates where groupId = &#63;.
748            *
749            * @param groupId the group ID
750            * @return the number of matching d d m templates
751            * @throws SystemException if a system exception occurred
752            */
753            public static int countByGroupId(long groupId)
754                    throws com.liferay.portal.kernel.exception.SystemException {
755                    return getPersistence().countByGroupId(groupId);
756            }
757    
758            /**
759            * Returns the number of d d m templates that the user has permission to view where groupId = &#63;.
760            *
761            * @param groupId the group ID
762            * @return the number of matching d d m templates that the user has permission to view
763            * @throws SystemException if a system exception occurred
764            */
765            public static int filterCountByGroupId(long groupId)
766                    throws com.liferay.portal.kernel.exception.SystemException {
767                    return getPersistence().filterCountByGroupId(groupId);
768            }
769    
770            /**
771            * Returns all the d d m templates where classPK = &#63;.
772            *
773            * @param classPK the class p k
774            * @return the matching d d m templates
775            * @throws SystemException if a system exception occurred
776            */
777            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByClassPK(
778                    long classPK)
779                    throws com.liferay.portal.kernel.exception.SystemException {
780                    return getPersistence().findByClassPK(classPK);
781            }
782    
783            /**
784            * Returns a range of all the d d m templates where classPK = &#63;.
785            *
786            * <p>
787            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
788            * </p>
789            *
790            * @param classPK the class p k
791            * @param start the lower bound of the range of d d m templates
792            * @param end the upper bound of the range of d d m templates (not inclusive)
793            * @return the range of matching d d m templates
794            * @throws SystemException if a system exception occurred
795            */
796            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByClassPK(
797                    long classPK, int start, int end)
798                    throws com.liferay.portal.kernel.exception.SystemException {
799                    return getPersistence().findByClassPK(classPK, start, end);
800            }
801    
802            /**
803            * Returns an ordered range of all the d d m templates where classPK = &#63;.
804            *
805            * <p>
806            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
807            * </p>
808            *
809            * @param classPK the class p k
810            * @param start the lower bound of the range of d d m templates
811            * @param end the upper bound of the range of d d m templates (not inclusive)
812            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
813            * @return the ordered range of matching d d m templates
814            * @throws SystemException if a system exception occurred
815            */
816            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByClassPK(
817                    long classPK, int start, int end,
818                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
819                    throws com.liferay.portal.kernel.exception.SystemException {
820                    return getPersistence()
821                                       .findByClassPK(classPK, start, end, orderByComparator);
822            }
823    
824            /**
825            * Returns the first d d m template in the ordered set where classPK = &#63;.
826            *
827            * @param classPK the class p k
828            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
829            * @return the first matching d d m template
830            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
831            * @throws SystemException if a system exception occurred
832            */
833            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByClassPK_First(
834                    long classPK,
835                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
836                    throws com.liferay.portal.kernel.exception.SystemException,
837                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
838                    return getPersistence().findByClassPK_First(classPK, orderByComparator);
839            }
840    
841            /**
842            * Returns the first d d m template in the ordered set where classPK = &#63;.
843            *
844            * @param classPK the class p k
845            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
846            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
847            * @throws SystemException if a system exception occurred
848            */
849            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByClassPK_First(
850                    long classPK,
851                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
852                    throws com.liferay.portal.kernel.exception.SystemException {
853                    return getPersistence().fetchByClassPK_First(classPK, orderByComparator);
854            }
855    
856            /**
857            * Returns the last d d m template in the ordered set where classPK = &#63;.
858            *
859            * @param classPK the class p k
860            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
861            * @return the last matching d d m template
862            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
863            * @throws SystemException if a system exception occurred
864            */
865            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByClassPK_Last(
866                    long classPK,
867                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
868                    throws com.liferay.portal.kernel.exception.SystemException,
869                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
870                    return getPersistence().findByClassPK_Last(classPK, orderByComparator);
871            }
872    
873            /**
874            * Returns the last d d m template in the ordered set where classPK = &#63;.
875            *
876            * @param classPK the class p k
877            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
878            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
879            * @throws SystemException if a system exception occurred
880            */
881            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByClassPK_Last(
882                    long classPK,
883                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
884                    throws com.liferay.portal.kernel.exception.SystemException {
885                    return getPersistence().fetchByClassPK_Last(classPK, orderByComparator);
886            }
887    
888            /**
889            * Returns the d d m templates before and after the current d d m template in the ordered set where classPK = &#63;.
890            *
891            * @param templateId the primary key of the current d d m template
892            * @param classPK the class p k
893            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
894            * @return the previous, current, and next d d m template
895            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
896            * @throws SystemException if a system exception occurred
897            */
898            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByClassPK_PrevAndNext(
899                    long templateId, long classPK,
900                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
901                    throws com.liferay.portal.kernel.exception.SystemException,
902                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
903                    return getPersistence()
904                                       .findByClassPK_PrevAndNext(templateId, classPK,
905                            orderByComparator);
906            }
907    
908            /**
909            * Removes all the d d m templates where classPK = &#63; from the database.
910            *
911            * @param classPK the class p k
912            * @throws SystemException if a system exception occurred
913            */
914            public static void removeByClassPK(long classPK)
915                    throws com.liferay.portal.kernel.exception.SystemException {
916                    getPersistence().removeByClassPK(classPK);
917            }
918    
919            /**
920            * Returns the number of d d m templates where classPK = &#63;.
921            *
922            * @param classPK the class p k
923            * @return the number of matching d d m templates
924            * @throws SystemException if a system exception occurred
925            */
926            public static int countByClassPK(long classPK)
927                    throws com.liferay.portal.kernel.exception.SystemException {
928                    return getPersistence().countByClassPK(classPK);
929            }
930    
931            /**
932            * Returns all the d d m templates where templateKey = &#63;.
933            *
934            * @param templateKey the template key
935            * @return the matching d d m templates
936            * @throws SystemException if a system exception occurred
937            */
938            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByTemplateKey(
939                    java.lang.String templateKey)
940                    throws com.liferay.portal.kernel.exception.SystemException {
941                    return getPersistence().findByTemplateKey(templateKey);
942            }
943    
944            /**
945            * Returns a range of all the d d m templates where templateKey = &#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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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 templateKey the template key
952            * @param start the lower bound of the range of d d m templates
953            * @param end the upper bound of the range of d d m templates (not inclusive)
954            * @return the range of matching d d m templates
955            * @throws SystemException if a system exception occurred
956            */
957            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByTemplateKey(
958                    java.lang.String templateKey, int start, int end)
959                    throws com.liferay.portal.kernel.exception.SystemException {
960                    return getPersistence().findByTemplateKey(templateKey, start, end);
961            }
962    
963            /**
964            * Returns an ordered range of all the d d m templates where templateKey = &#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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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 templateKey the template key
971            * @param start the lower bound of the range of d d m templates
972            * @param end the upper bound of the range of d d m templates (not inclusive)
973            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
974            * @return the ordered range of matching d d m templates
975            * @throws SystemException if a system exception occurred
976            */
977            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByTemplateKey(
978                    java.lang.String templateKey, int start, int end,
979                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
980                    throws com.liferay.portal.kernel.exception.SystemException {
981                    return getPersistence()
982                                       .findByTemplateKey(templateKey, start, end, orderByComparator);
983            }
984    
985            /**
986            * Returns the first d d m template in the ordered set where templateKey = &#63;.
987            *
988            * @param templateKey the template key
989            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
990            * @return the first matching d d m template
991            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
992            * @throws SystemException if a system exception occurred
993            */
994            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByTemplateKey_First(
995                    java.lang.String templateKey,
996                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
997                    throws com.liferay.portal.kernel.exception.SystemException,
998                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
999                    return getPersistence()
1000                                       .findByTemplateKey_First(templateKey, orderByComparator);
1001            }
1002    
1003            /**
1004            * Returns the first d d m template in the ordered set where templateKey = &#63;.
1005            *
1006            * @param templateKey the template key
1007            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1008            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
1009            * @throws SystemException if a system exception occurred
1010            */
1011            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByTemplateKey_First(
1012                    java.lang.String templateKey,
1013                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1014                    throws com.liferay.portal.kernel.exception.SystemException {
1015                    return getPersistence()
1016                                       .fetchByTemplateKey_First(templateKey, orderByComparator);
1017            }
1018    
1019            /**
1020            * Returns the last d d m template in the ordered set where templateKey = &#63;.
1021            *
1022            * @param templateKey the template key
1023            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1024            * @return the last matching d d m template
1025            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1026            * @throws SystemException if a system exception occurred
1027            */
1028            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByTemplateKey_Last(
1029                    java.lang.String templateKey,
1030                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1031                    throws com.liferay.portal.kernel.exception.SystemException,
1032                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1033                    return getPersistence()
1034                                       .findByTemplateKey_Last(templateKey, orderByComparator);
1035            }
1036    
1037            /**
1038            * Returns the last d d m template in the ordered set where templateKey = &#63;.
1039            *
1040            * @param templateKey the template key
1041            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1042            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
1043            * @throws SystemException if a system exception occurred
1044            */
1045            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByTemplateKey_Last(
1046                    java.lang.String templateKey,
1047                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1048                    throws com.liferay.portal.kernel.exception.SystemException {
1049                    return getPersistence()
1050                                       .fetchByTemplateKey_Last(templateKey, orderByComparator);
1051            }
1052    
1053            /**
1054            * Returns the d d m templates before and after the current d d m template in the ordered set where templateKey = &#63;.
1055            *
1056            * @param templateId the primary key of the current d d m template
1057            * @param templateKey the template key
1058            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1059            * @return the previous, current, and next d d m template
1060            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1061            * @throws SystemException if a system exception occurred
1062            */
1063            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByTemplateKey_PrevAndNext(
1064                    long templateId, java.lang.String templateKey,
1065                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1066                    throws com.liferay.portal.kernel.exception.SystemException,
1067                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1068                    return getPersistence()
1069                                       .findByTemplateKey_PrevAndNext(templateId, templateKey,
1070                            orderByComparator);
1071            }
1072    
1073            /**
1074            * Removes all the d d m templates where templateKey = &#63; from the database.
1075            *
1076            * @param templateKey the template key
1077            * @throws SystemException if a system exception occurred
1078            */
1079            public static void removeByTemplateKey(java.lang.String templateKey)
1080                    throws com.liferay.portal.kernel.exception.SystemException {
1081                    getPersistence().removeByTemplateKey(templateKey);
1082            }
1083    
1084            /**
1085            * Returns the number of d d m templates where templateKey = &#63;.
1086            *
1087            * @param templateKey the template key
1088            * @return the number of matching d d m templates
1089            * @throws SystemException if a system exception occurred
1090            */
1091            public static int countByTemplateKey(java.lang.String templateKey)
1092                    throws com.liferay.portal.kernel.exception.SystemException {
1093                    return getPersistence().countByTemplateKey(templateKey);
1094            }
1095    
1096            /**
1097            * Returns all the d d m templates where type = &#63;.
1098            *
1099            * @param type the type
1100            * @return the matching d d m templates
1101            * @throws SystemException if a system exception occurred
1102            */
1103            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByType(
1104                    java.lang.String type)
1105                    throws com.liferay.portal.kernel.exception.SystemException {
1106                    return getPersistence().findByType(type);
1107            }
1108    
1109            /**
1110            * Returns a range of all the d d m templates where type = &#63;.
1111            *
1112            * <p>
1113            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1114            * </p>
1115            *
1116            * @param type the type
1117            * @param start the lower bound of the range of d d m templates
1118            * @param end the upper bound of the range of d d m templates (not inclusive)
1119            * @return the range of matching d d m templates
1120            * @throws SystemException if a system exception occurred
1121            */
1122            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByType(
1123                    java.lang.String type, int start, int end)
1124                    throws com.liferay.portal.kernel.exception.SystemException {
1125                    return getPersistence().findByType(type, start, end);
1126            }
1127    
1128            /**
1129            * Returns an ordered range of all the d d m templates where type = &#63;.
1130            *
1131            * <p>
1132            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1133            * </p>
1134            *
1135            * @param type the type
1136            * @param start the lower bound of the range of d d m templates
1137            * @param end the upper bound of the range of d d m templates (not inclusive)
1138            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1139            * @return the ordered range of matching d d m templates
1140            * @throws SystemException if a system exception occurred
1141            */
1142            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByType(
1143                    java.lang.String type, int start, int end,
1144                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1145                    throws com.liferay.portal.kernel.exception.SystemException {
1146                    return getPersistence().findByType(type, start, end, orderByComparator);
1147            }
1148    
1149            /**
1150            * Returns the first d d m template in the ordered set where type = &#63;.
1151            *
1152            * @param type the type
1153            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1154            * @return the first matching d d m template
1155            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1156            * @throws SystemException if a system exception occurred
1157            */
1158            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByType_First(
1159                    java.lang.String type,
1160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1161                    throws com.liferay.portal.kernel.exception.SystemException,
1162                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1163                    return getPersistence().findByType_First(type, orderByComparator);
1164            }
1165    
1166            /**
1167            * Returns the first d d m template in the ordered set where type = &#63;.
1168            *
1169            * @param type the type
1170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1171            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
1172            * @throws SystemException if a system exception occurred
1173            */
1174            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByType_First(
1175                    java.lang.String type,
1176                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1177                    throws com.liferay.portal.kernel.exception.SystemException {
1178                    return getPersistence().fetchByType_First(type, orderByComparator);
1179            }
1180    
1181            /**
1182            * Returns the last d d m template in the ordered set where type = &#63;.
1183            *
1184            * @param type the type
1185            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1186            * @return the last matching d d m template
1187            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1188            * @throws SystemException if a system exception occurred
1189            */
1190            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByType_Last(
1191                    java.lang.String type,
1192                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1193                    throws com.liferay.portal.kernel.exception.SystemException,
1194                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1195                    return getPersistence().findByType_Last(type, orderByComparator);
1196            }
1197    
1198            /**
1199            * Returns the last d d m template in the ordered set where type = &#63;.
1200            *
1201            * @param type the type
1202            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1203            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
1204            * @throws SystemException if a system exception occurred
1205            */
1206            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByType_Last(
1207                    java.lang.String type,
1208                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1209                    throws com.liferay.portal.kernel.exception.SystemException {
1210                    return getPersistence().fetchByType_Last(type, orderByComparator);
1211            }
1212    
1213            /**
1214            * Returns the d d m templates before and after the current d d m template in the ordered set where type = &#63;.
1215            *
1216            * @param templateId the primary key of the current d d m template
1217            * @param type the type
1218            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1219            * @return the previous, current, and next d d m template
1220            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1221            * @throws SystemException if a system exception occurred
1222            */
1223            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByType_PrevAndNext(
1224                    long templateId, java.lang.String type,
1225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1226                    throws com.liferay.portal.kernel.exception.SystemException,
1227                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1228                    return getPersistence()
1229                                       .findByType_PrevAndNext(templateId, type, orderByComparator);
1230            }
1231    
1232            /**
1233            * Removes all the d d m templates where type = &#63; from the database.
1234            *
1235            * @param type the type
1236            * @throws SystemException if a system exception occurred
1237            */
1238            public static void removeByType(java.lang.String type)
1239                    throws com.liferay.portal.kernel.exception.SystemException {
1240                    getPersistence().removeByType(type);
1241            }
1242    
1243            /**
1244            * Returns the number of d d m templates where type = &#63;.
1245            *
1246            * @param type the type
1247            * @return the number of matching d d m templates
1248            * @throws SystemException if a system exception occurred
1249            */
1250            public static int countByType(java.lang.String type)
1251                    throws com.liferay.portal.kernel.exception.SystemException {
1252                    return getPersistence().countByType(type);
1253            }
1254    
1255            /**
1256            * Returns all the d d m templates where language = &#63;.
1257            *
1258            * @param language the language
1259            * @return the matching d d m templates
1260            * @throws SystemException if a system exception occurred
1261            */
1262            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByLanguage(
1263                    java.lang.String language)
1264                    throws com.liferay.portal.kernel.exception.SystemException {
1265                    return getPersistence().findByLanguage(language);
1266            }
1267    
1268            /**
1269            * Returns a range of all the d d m templates where language = &#63;.
1270            *
1271            * <p>
1272            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1273            * </p>
1274            *
1275            * @param language the language
1276            * @param start the lower bound of the range of d d m templates
1277            * @param end the upper bound of the range of d d m templates (not inclusive)
1278            * @return the range of matching d d m templates
1279            * @throws SystemException if a system exception occurred
1280            */
1281            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByLanguage(
1282                    java.lang.String language, int start, int end)
1283                    throws com.liferay.portal.kernel.exception.SystemException {
1284                    return getPersistence().findByLanguage(language, start, end);
1285            }
1286    
1287            /**
1288            * Returns an ordered range of all the d d m templates where language = &#63;.
1289            *
1290            * <p>
1291            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1292            * </p>
1293            *
1294            * @param language the language
1295            * @param start the lower bound of the range of d d m templates
1296            * @param end the upper bound of the range of d d m templates (not inclusive)
1297            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1298            * @return the ordered range of matching d d m templates
1299            * @throws SystemException if a system exception occurred
1300            */
1301            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByLanguage(
1302                    java.lang.String language, int start, int end,
1303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1304                    throws com.liferay.portal.kernel.exception.SystemException {
1305                    return getPersistence()
1306                                       .findByLanguage(language, start, end, orderByComparator);
1307            }
1308    
1309            /**
1310            * Returns the first d d m template in the ordered set where language = &#63;.
1311            *
1312            * @param language the language
1313            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1314            * @return the first matching d d m template
1315            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1316            * @throws SystemException if a system exception occurred
1317            */
1318            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByLanguage_First(
1319                    java.lang.String language,
1320                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1321                    throws com.liferay.portal.kernel.exception.SystemException,
1322                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1323                    return getPersistence().findByLanguage_First(language, orderByComparator);
1324            }
1325    
1326            /**
1327            * Returns the first d d m template in the ordered set where language = &#63;.
1328            *
1329            * @param language the language
1330            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1331            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
1332            * @throws SystemException if a system exception occurred
1333            */
1334            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByLanguage_First(
1335                    java.lang.String language,
1336                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1337                    throws com.liferay.portal.kernel.exception.SystemException {
1338                    return getPersistence()
1339                                       .fetchByLanguage_First(language, orderByComparator);
1340            }
1341    
1342            /**
1343            * Returns the last d d m template in the ordered set where language = &#63;.
1344            *
1345            * @param language the language
1346            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1347            * @return the last matching d d m template
1348            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1349            * @throws SystemException if a system exception occurred
1350            */
1351            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByLanguage_Last(
1352                    java.lang.String language,
1353                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1354                    throws com.liferay.portal.kernel.exception.SystemException,
1355                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1356                    return getPersistence().findByLanguage_Last(language, orderByComparator);
1357            }
1358    
1359            /**
1360            * Returns the last d d m template in the ordered set where language = &#63;.
1361            *
1362            * @param language the language
1363            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1364            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
1365            * @throws SystemException if a system exception occurred
1366            */
1367            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByLanguage_Last(
1368                    java.lang.String language,
1369                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1370                    throws com.liferay.portal.kernel.exception.SystemException {
1371                    return getPersistence().fetchByLanguage_Last(language, orderByComparator);
1372            }
1373    
1374            /**
1375            * Returns the d d m templates before and after the current d d m template in the ordered set where language = &#63;.
1376            *
1377            * @param templateId the primary key of the current d d m template
1378            * @param language the language
1379            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1380            * @return the previous, current, and next d d m template
1381            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1382            * @throws SystemException if a system exception occurred
1383            */
1384            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByLanguage_PrevAndNext(
1385                    long templateId, java.lang.String language,
1386                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1387                    throws com.liferay.portal.kernel.exception.SystemException,
1388                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1389                    return getPersistence()
1390                                       .findByLanguage_PrevAndNext(templateId, language,
1391                            orderByComparator);
1392            }
1393    
1394            /**
1395            * Removes all the d d m templates where language = &#63; from the database.
1396            *
1397            * @param language the language
1398            * @throws SystemException if a system exception occurred
1399            */
1400            public static void removeByLanguage(java.lang.String language)
1401                    throws com.liferay.portal.kernel.exception.SystemException {
1402                    getPersistence().removeByLanguage(language);
1403            }
1404    
1405            /**
1406            * Returns the number of d d m templates where language = &#63;.
1407            *
1408            * @param language the language
1409            * @return the number of matching d d m templates
1410            * @throws SystemException if a system exception occurred
1411            */
1412            public static int countByLanguage(java.lang.String language)
1413                    throws com.liferay.portal.kernel.exception.SystemException {
1414                    return getPersistence().countByLanguage(language);
1415            }
1416    
1417            /**
1418            * Returns the d d m template where smallImageId = &#63; or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException} if it could not be found.
1419            *
1420            * @param smallImageId the small image ID
1421            * @return the matching d d m template
1422            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1423            * @throws SystemException if a system exception occurred
1424            */
1425            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findBySmallImageId(
1426                    long smallImageId)
1427                    throws com.liferay.portal.kernel.exception.SystemException,
1428                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1429                    return getPersistence().findBySmallImageId(smallImageId);
1430            }
1431    
1432            /**
1433            * Returns the d d m template where smallImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1434            *
1435            * @param smallImageId the small image ID
1436            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
1437            * @throws SystemException if a system exception occurred
1438            */
1439            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchBySmallImageId(
1440                    long smallImageId)
1441                    throws com.liferay.portal.kernel.exception.SystemException {
1442                    return getPersistence().fetchBySmallImageId(smallImageId);
1443            }
1444    
1445            /**
1446            * Returns the d d m template where smallImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
1447            *
1448            * @param smallImageId the small image ID
1449            * @param retrieveFromCache whether to use the finder cache
1450            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
1451            * @throws SystemException if a system exception occurred
1452            */
1453            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchBySmallImageId(
1454                    long smallImageId, boolean retrieveFromCache)
1455                    throws com.liferay.portal.kernel.exception.SystemException {
1456                    return getPersistence()
1457                                       .fetchBySmallImageId(smallImageId, retrieveFromCache);
1458            }
1459    
1460            /**
1461            * Removes the d d m template where smallImageId = &#63; from the database.
1462            *
1463            * @param smallImageId the small image ID
1464            * @return the d d m template that was removed
1465            * @throws SystemException if a system exception occurred
1466            */
1467            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate removeBySmallImageId(
1468                    long smallImageId)
1469                    throws com.liferay.portal.kernel.exception.SystemException,
1470                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1471                    return getPersistence().removeBySmallImageId(smallImageId);
1472            }
1473    
1474            /**
1475            * Returns the number of d d m templates where smallImageId = &#63;.
1476            *
1477            * @param smallImageId the small image ID
1478            * @return the number of matching d d m templates
1479            * @throws SystemException if a system exception occurred
1480            */
1481            public static int countBySmallImageId(long smallImageId)
1482                    throws com.liferay.portal.kernel.exception.SystemException {
1483                    return getPersistence().countBySmallImageId(smallImageId);
1484            }
1485    
1486            /**
1487            * Returns all the d d m templates where groupId = &#63; and classNameId = &#63;.
1488            *
1489            * @param groupId the group ID
1490            * @param classNameId the class name ID
1491            * @return the matching d d m templates
1492            * @throws SystemException if a system exception occurred
1493            */
1494            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C(
1495                    long groupId, long classNameId)
1496                    throws com.liferay.portal.kernel.exception.SystemException {
1497                    return getPersistence().findByG_C(groupId, classNameId);
1498            }
1499    
1500            /**
1501            * Returns a range of all the d d m templates where groupId = &#63; and classNameId = &#63;.
1502            *
1503            * <p>
1504            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1505            * </p>
1506            *
1507            * @param groupId the group ID
1508            * @param classNameId the class name ID
1509            * @param start the lower bound of the range of d d m templates
1510            * @param end the upper bound of the range of d d m templates (not inclusive)
1511            * @return the range of matching d d m templates
1512            * @throws SystemException if a system exception occurred
1513            */
1514            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C(
1515                    long groupId, long classNameId, int start, int end)
1516                    throws com.liferay.portal.kernel.exception.SystemException {
1517                    return getPersistence().findByG_C(groupId, classNameId, start, end);
1518            }
1519    
1520            /**
1521            * Returns an ordered range of all the d d m templates where groupId = &#63; and classNameId = &#63;.
1522            *
1523            * <p>
1524            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1525            * </p>
1526            *
1527            * @param groupId the group ID
1528            * @param classNameId the class name ID
1529            * @param start the lower bound of the range of d d m templates
1530            * @param end the upper bound of the range of d d m templates (not inclusive)
1531            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1532            * @return the ordered range of matching d d m templates
1533            * @throws SystemException if a system exception occurred
1534            */
1535            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C(
1536                    long groupId, long classNameId, int start, int end,
1537                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1538                    throws com.liferay.portal.kernel.exception.SystemException {
1539                    return getPersistence()
1540                                       .findByG_C(groupId, classNameId, start, end,
1541                            orderByComparator);
1542            }
1543    
1544            /**
1545            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63;.
1546            *
1547            * @param groupId the group ID
1548            * @param classNameId the class name ID
1549            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1550            * @return the first matching d d m template
1551            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1552            * @throws SystemException if a system exception occurred
1553            */
1554            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_First(
1555                    long groupId, long classNameId,
1556                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1557                    throws com.liferay.portal.kernel.exception.SystemException,
1558                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1559                    return getPersistence()
1560                                       .findByG_C_First(groupId, classNameId, orderByComparator);
1561            }
1562    
1563            /**
1564            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63;.
1565            *
1566            * @param groupId the group ID
1567            * @param classNameId the class name ID
1568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1569            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
1570            * @throws SystemException if a system exception occurred
1571            */
1572            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_First(
1573                    long groupId, long classNameId,
1574                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1575                    throws com.liferay.portal.kernel.exception.SystemException {
1576                    return getPersistence()
1577                                       .fetchByG_C_First(groupId, classNameId, orderByComparator);
1578            }
1579    
1580            /**
1581            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63;.
1582            *
1583            * @param groupId the group ID
1584            * @param classNameId the class name ID
1585            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1586            * @return the last matching d d m template
1587            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1588            * @throws SystemException if a system exception occurred
1589            */
1590            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_Last(
1591                    long groupId, long classNameId,
1592                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1593                    throws com.liferay.portal.kernel.exception.SystemException,
1594                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1595                    return getPersistence()
1596                                       .findByG_C_Last(groupId, classNameId, orderByComparator);
1597            }
1598    
1599            /**
1600            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63;.
1601            *
1602            * @param groupId the group ID
1603            * @param classNameId the class name ID
1604            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1605            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
1606            * @throws SystemException if a system exception occurred
1607            */
1608            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_Last(
1609                    long groupId, long classNameId,
1610                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1611                    throws com.liferay.portal.kernel.exception.SystemException {
1612                    return getPersistence()
1613                                       .fetchByG_C_Last(groupId, classNameId, orderByComparator);
1614            }
1615    
1616            /**
1617            * Returns the d d m templates before and after the current d d m template in the ordered set where groupId = &#63; and classNameId = &#63;.
1618            *
1619            * @param templateId the primary key of the current d d m template
1620            * @param groupId the group ID
1621            * @param classNameId the class name ID
1622            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1623            * @return the previous, current, and next d d m template
1624            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1625            * @throws SystemException if a system exception occurred
1626            */
1627            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByG_C_PrevAndNext(
1628                    long templateId, long groupId, long classNameId,
1629                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1630                    throws com.liferay.portal.kernel.exception.SystemException,
1631                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1632                    return getPersistence()
1633                                       .findByG_C_PrevAndNext(templateId, groupId, classNameId,
1634                            orderByComparator);
1635            }
1636    
1637            /**
1638            * Returns all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63;.
1639            *
1640            * @param groupId the group ID
1641            * @param classNameId the class name ID
1642            * @return the matching d d m templates that the user has permission to view
1643            * @throws SystemException if a system exception occurred
1644            */
1645            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C(
1646                    long groupId, long classNameId)
1647                    throws com.liferay.portal.kernel.exception.SystemException {
1648                    return getPersistence().filterFindByG_C(groupId, classNameId);
1649            }
1650    
1651            /**
1652            * Returns a range of all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63;.
1653            *
1654            * <p>
1655            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1656            * </p>
1657            *
1658            * @param groupId the group ID
1659            * @param classNameId the class name ID
1660            * @param start the lower bound of the range of d d m templates
1661            * @param end the upper bound of the range of d d m templates (not inclusive)
1662            * @return the range of matching d d m templates that the user has permission to view
1663            * @throws SystemException if a system exception occurred
1664            */
1665            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C(
1666                    long groupId, long classNameId, int start, int end)
1667                    throws com.liferay.portal.kernel.exception.SystemException {
1668                    return getPersistence().filterFindByG_C(groupId, classNameId, start, end);
1669            }
1670    
1671            /**
1672            * Returns an ordered range of all the d d m templates that the user has permissions to view where groupId = &#63; and classNameId = &#63;.
1673            *
1674            * <p>
1675            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1676            * </p>
1677            *
1678            * @param groupId the group ID
1679            * @param classNameId the class name ID
1680            * @param start the lower bound of the range of d d m templates
1681            * @param end the upper bound of the range of d d m templates (not inclusive)
1682            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1683            * @return the ordered range of matching d d m templates that the user has permission to view
1684            * @throws SystemException if a system exception occurred
1685            */
1686            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C(
1687                    long groupId, long classNameId, int start, int end,
1688                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1689                    throws com.liferay.portal.kernel.exception.SystemException {
1690                    return getPersistence()
1691                                       .filterFindByG_C(groupId, classNameId, start, end,
1692                            orderByComparator);
1693            }
1694    
1695            /**
1696            * Returns the d d m templates before and after the current d d m template in the ordered set of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63;.
1697            *
1698            * @param templateId the primary key of the current d d m template
1699            * @param groupId the group ID
1700            * @param classNameId the class name ID
1701            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1702            * @return the previous, current, and next d d m template
1703            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1704            * @throws SystemException if a system exception occurred
1705            */
1706            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] filterFindByG_C_PrevAndNext(
1707                    long templateId, long groupId, long classNameId,
1708                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1709                    throws com.liferay.portal.kernel.exception.SystemException,
1710                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1711                    return getPersistence()
1712                                       .filterFindByG_C_PrevAndNext(templateId, groupId,
1713                            classNameId, orderByComparator);
1714            }
1715    
1716            /**
1717            * Removes all the d d m templates where groupId = &#63; and classNameId = &#63; from the database.
1718            *
1719            * @param groupId the group ID
1720            * @param classNameId the class name ID
1721            * @throws SystemException if a system exception occurred
1722            */
1723            public static void removeByG_C(long groupId, long classNameId)
1724                    throws com.liferay.portal.kernel.exception.SystemException {
1725                    getPersistence().removeByG_C(groupId, classNameId);
1726            }
1727    
1728            /**
1729            * Returns the number of d d m templates where groupId = &#63; and classNameId = &#63;.
1730            *
1731            * @param groupId the group ID
1732            * @param classNameId the class name ID
1733            * @return the number of matching d d m templates
1734            * @throws SystemException if a system exception occurred
1735            */
1736            public static int countByG_C(long groupId, long classNameId)
1737                    throws com.liferay.portal.kernel.exception.SystemException {
1738                    return getPersistence().countByG_C(groupId, classNameId);
1739            }
1740    
1741            /**
1742            * Returns the number of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63;.
1743            *
1744            * @param groupId the group ID
1745            * @param classNameId the class name ID
1746            * @return the number of matching d d m templates that the user has permission to view
1747            * @throws SystemException if a system exception occurred
1748            */
1749            public static int filterCountByG_C(long groupId, long classNameId)
1750                    throws com.liferay.portal.kernel.exception.SystemException {
1751                    return getPersistence().filterCountByG_C(groupId, classNameId);
1752            }
1753    
1754            /**
1755            * Returns all the d d m templates where groupId = &#63; and classPK = &#63;.
1756            *
1757            * @param groupId the group ID
1758            * @param classPK the class p k
1759            * @return the matching d d m templates
1760            * @throws SystemException if a system exception occurred
1761            */
1762            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_CPK(
1763                    long groupId, long classPK)
1764                    throws com.liferay.portal.kernel.exception.SystemException {
1765                    return getPersistence().findByG_CPK(groupId, classPK);
1766            }
1767    
1768            /**
1769            * Returns a range of all the d d m templates where groupId = &#63; and classPK = &#63;.
1770            *
1771            * <p>
1772            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1773            * </p>
1774            *
1775            * @param groupId the group ID
1776            * @param classPK the class p k
1777            * @param start the lower bound of the range of d d m templates
1778            * @param end the upper bound of the range of d d m templates (not inclusive)
1779            * @return the range of matching d d m templates
1780            * @throws SystemException if a system exception occurred
1781            */
1782            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_CPK(
1783                    long groupId, long classPK, int start, int end)
1784                    throws com.liferay.portal.kernel.exception.SystemException {
1785                    return getPersistence().findByG_CPK(groupId, classPK, start, end);
1786            }
1787    
1788            /**
1789            * Returns an ordered range of all the d d m templates where groupId = &#63; and classPK = &#63;.
1790            *
1791            * <p>
1792            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1793            * </p>
1794            *
1795            * @param groupId the group ID
1796            * @param classPK the class p k
1797            * @param start the lower bound of the range of d d m templates
1798            * @param end the upper bound of the range of d d m templates (not inclusive)
1799            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1800            * @return the ordered range of matching d d m templates
1801            * @throws SystemException if a system exception occurred
1802            */
1803            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_CPK(
1804                    long groupId, long classPK, int start, int end,
1805                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1806                    throws com.liferay.portal.kernel.exception.SystemException {
1807                    return getPersistence()
1808                                       .findByG_CPK(groupId, classPK, start, end, orderByComparator);
1809            }
1810    
1811            /**
1812            * Returns the first d d m template in the ordered set where groupId = &#63; and classPK = &#63;.
1813            *
1814            * @param groupId the group ID
1815            * @param classPK the class p k
1816            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1817            * @return the first matching d d m template
1818            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1819            * @throws SystemException if a system exception occurred
1820            */
1821            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_CPK_First(
1822                    long groupId, long classPK,
1823                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1824                    throws com.liferay.portal.kernel.exception.SystemException,
1825                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1826                    return getPersistence()
1827                                       .findByG_CPK_First(groupId, classPK, orderByComparator);
1828            }
1829    
1830            /**
1831            * Returns the first d d m template in the ordered set where groupId = &#63; and classPK = &#63;.
1832            *
1833            * @param groupId the group ID
1834            * @param classPK the class p k
1835            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1836            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
1837            * @throws SystemException if a system exception occurred
1838            */
1839            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_CPK_First(
1840                    long groupId, long classPK,
1841                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1842                    throws com.liferay.portal.kernel.exception.SystemException {
1843                    return getPersistence()
1844                                       .fetchByG_CPK_First(groupId, classPK, orderByComparator);
1845            }
1846    
1847            /**
1848            * Returns the last d d m template in the ordered set where groupId = &#63; and classPK = &#63;.
1849            *
1850            * @param groupId the group ID
1851            * @param classPK the class p k
1852            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1853            * @return the last matching d d m template
1854            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
1855            * @throws SystemException if a system exception occurred
1856            */
1857            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_CPK_Last(
1858                    long groupId, long classPK,
1859                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1860                    throws com.liferay.portal.kernel.exception.SystemException,
1861                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1862                    return getPersistence()
1863                                       .findByG_CPK_Last(groupId, classPK, orderByComparator);
1864            }
1865    
1866            /**
1867            * Returns the last d d m template in the ordered set where groupId = &#63; and classPK = &#63;.
1868            *
1869            * @param groupId the group ID
1870            * @param classPK the class p k
1871            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1872            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
1873            * @throws SystemException if a system exception occurred
1874            */
1875            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_CPK_Last(
1876                    long groupId, long classPK,
1877                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1878                    throws com.liferay.portal.kernel.exception.SystemException {
1879                    return getPersistence()
1880                                       .fetchByG_CPK_Last(groupId, classPK, orderByComparator);
1881            }
1882    
1883            /**
1884            * Returns the d d m templates before and after the current d d m template in the ordered set where groupId = &#63; and classPK = &#63;.
1885            *
1886            * @param templateId the primary key of the current d d m template
1887            * @param groupId the group ID
1888            * @param classPK the class p k
1889            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1890            * @return the previous, current, and next d d m template
1891            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1892            * @throws SystemException if a system exception occurred
1893            */
1894            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByG_CPK_PrevAndNext(
1895                    long templateId, long groupId, long classPK,
1896                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1897                    throws com.liferay.portal.kernel.exception.SystemException,
1898                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1899                    return getPersistence()
1900                                       .findByG_CPK_PrevAndNext(templateId, groupId, classPK,
1901                            orderByComparator);
1902            }
1903    
1904            /**
1905            * Returns all the d d m templates that the user has permission to view where groupId = &#63; and classPK = &#63;.
1906            *
1907            * @param groupId the group ID
1908            * @param classPK the class p k
1909            * @return the matching d d m templates that the user has permission to view
1910            * @throws SystemException if a system exception occurred
1911            */
1912            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_CPK(
1913                    long groupId, long classPK)
1914                    throws com.liferay.portal.kernel.exception.SystemException {
1915                    return getPersistence().filterFindByG_CPK(groupId, classPK);
1916            }
1917    
1918            /**
1919            * Returns a range of all the d d m templates that the user has permission to view where groupId = &#63; and classPK = &#63;.
1920            *
1921            * <p>
1922            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1923            * </p>
1924            *
1925            * @param groupId the group ID
1926            * @param classPK the class p k
1927            * @param start the lower bound of the range of d d m templates
1928            * @param end the upper bound of the range of d d m templates (not inclusive)
1929            * @return the range of matching d d m templates that the user has permission to view
1930            * @throws SystemException if a system exception occurred
1931            */
1932            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_CPK(
1933                    long groupId, long classPK, int start, int end)
1934                    throws com.liferay.portal.kernel.exception.SystemException {
1935                    return getPersistence().filterFindByG_CPK(groupId, classPK, start, end);
1936            }
1937    
1938            /**
1939            * Returns an ordered range of all the d d m templates that the user has permissions to view where groupId = &#63; and classPK = &#63;.
1940            *
1941            * <p>
1942            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
1943            * </p>
1944            *
1945            * @param groupId the group ID
1946            * @param classPK the class p k
1947            * @param start the lower bound of the range of d d m templates
1948            * @param end the upper bound of the range of d d m templates (not inclusive)
1949            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1950            * @return the ordered range of matching d d m templates that the user has permission to view
1951            * @throws SystemException if a system exception occurred
1952            */
1953            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_CPK(
1954                    long groupId, long classPK, int start, int end,
1955                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1956                    throws com.liferay.portal.kernel.exception.SystemException {
1957                    return getPersistence()
1958                                       .filterFindByG_CPK(groupId, classPK, start, end,
1959                            orderByComparator);
1960            }
1961    
1962            /**
1963            * Returns the d d m templates before and after the current d d m template in the ordered set of d d m templates that the user has permission to view where groupId = &#63; and classPK = &#63;.
1964            *
1965            * @param templateId the primary key of the current d d m template
1966            * @param groupId the group ID
1967            * @param classPK the class p k
1968            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1969            * @return the previous, current, and next d d m template
1970            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
1971            * @throws SystemException if a system exception occurred
1972            */
1973            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] filterFindByG_CPK_PrevAndNext(
1974                    long templateId, long groupId, long classPK,
1975                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1976                    throws com.liferay.portal.kernel.exception.SystemException,
1977                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
1978                    return getPersistence()
1979                                       .filterFindByG_CPK_PrevAndNext(templateId, groupId, classPK,
1980                            orderByComparator);
1981            }
1982    
1983            /**
1984            * Returns all the d d m templates that the user has permission to view where groupId = any &#63; and classPK = &#63;.
1985            *
1986            * @param groupIds the group IDs
1987            * @param classPK the class p k
1988            * @return the matching d d m templates that the user has permission to view
1989            * @throws SystemException if a system exception occurred
1990            */
1991            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_CPK(
1992                    long[] groupIds, long classPK)
1993                    throws com.liferay.portal.kernel.exception.SystemException {
1994                    return getPersistence().filterFindByG_CPK(groupIds, classPK);
1995            }
1996    
1997            /**
1998            * Returns a range of all the d d m templates that the user has permission to view where groupId = any &#63; and classPK = &#63;.
1999            *
2000            * <p>
2001            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2002            * </p>
2003            *
2004            * @param groupIds the group IDs
2005            * @param classPK the class p k
2006            * @param start the lower bound of the range of d d m templates
2007            * @param end the upper bound of the range of d d m templates (not inclusive)
2008            * @return the range of matching d d m templates that the user has permission to view
2009            * @throws SystemException if a system exception occurred
2010            */
2011            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_CPK(
2012                    long[] groupIds, long classPK, int start, int end)
2013                    throws com.liferay.portal.kernel.exception.SystemException {
2014                    return getPersistence().filterFindByG_CPK(groupIds, classPK, start, end);
2015            }
2016    
2017            /**
2018            * Returns an ordered range of all the d d m templates that the user has permission to view where groupId = any &#63; and classPK = &#63;.
2019            *
2020            * <p>
2021            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2022            * </p>
2023            *
2024            * @param groupIds the group IDs
2025            * @param classPK the class p k
2026            * @param start the lower bound of the range of d d m templates
2027            * @param end the upper bound of the range of d d m templates (not inclusive)
2028            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2029            * @return the ordered range of matching d d m templates that the user has permission to view
2030            * @throws SystemException if a system exception occurred
2031            */
2032            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_CPK(
2033                    long[] groupIds, long classPK, int start, int end,
2034                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2035                    throws com.liferay.portal.kernel.exception.SystemException {
2036                    return getPersistence()
2037                                       .filterFindByG_CPK(groupIds, classPK, start, end,
2038                            orderByComparator);
2039            }
2040    
2041            /**
2042            * Returns all the d d m templates where groupId = any &#63; and classPK = &#63;.
2043            *
2044            * <p>
2045            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2046            * </p>
2047            *
2048            * @param groupIds the group IDs
2049            * @param classPK the class p k
2050            * @return the matching d d m templates
2051            * @throws SystemException if a system exception occurred
2052            */
2053            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_CPK(
2054                    long[] groupIds, long classPK)
2055                    throws com.liferay.portal.kernel.exception.SystemException {
2056                    return getPersistence().findByG_CPK(groupIds, classPK);
2057            }
2058    
2059            /**
2060            * Returns a range of all the d d m templates where groupId = any &#63; and classPK = &#63;.
2061            *
2062            * <p>
2063            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2064            * </p>
2065            *
2066            * @param groupIds the group IDs
2067            * @param classPK the class p k
2068            * @param start the lower bound of the range of d d m templates
2069            * @param end the upper bound of the range of d d m templates (not inclusive)
2070            * @return the range of matching d d m templates
2071            * @throws SystemException if a system exception occurred
2072            */
2073            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_CPK(
2074                    long[] groupIds, long classPK, int start, int end)
2075                    throws com.liferay.portal.kernel.exception.SystemException {
2076                    return getPersistence().findByG_CPK(groupIds, classPK, start, end);
2077            }
2078    
2079            /**
2080            * Returns an ordered range of all the d d m templates where groupId = any &#63; and classPK = &#63;.
2081            *
2082            * <p>
2083            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2084            * </p>
2085            *
2086            * @param groupIds the group IDs
2087            * @param classPK the class p k
2088            * @param start the lower bound of the range of d d m templates
2089            * @param end the upper bound of the range of d d m templates (not inclusive)
2090            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2091            * @return the ordered range of matching d d m templates
2092            * @throws SystemException if a system exception occurred
2093            */
2094            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_CPK(
2095                    long[] groupIds, long classPK, int start, int end,
2096                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2097                    throws com.liferay.portal.kernel.exception.SystemException {
2098                    return getPersistence()
2099                                       .findByG_CPK(groupIds, classPK, start, end, orderByComparator);
2100            }
2101    
2102            /**
2103            * Removes all the d d m templates where groupId = &#63; and classPK = &#63; from the database.
2104            *
2105            * @param groupId the group ID
2106            * @param classPK the class p k
2107            * @throws SystemException if a system exception occurred
2108            */
2109            public static void removeByG_CPK(long groupId, long classPK)
2110                    throws com.liferay.portal.kernel.exception.SystemException {
2111                    getPersistence().removeByG_CPK(groupId, classPK);
2112            }
2113    
2114            /**
2115            * Returns the number of d d m templates where groupId = &#63; and classPK = &#63;.
2116            *
2117            * @param groupId the group ID
2118            * @param classPK the class p k
2119            * @return the number of matching d d m templates
2120            * @throws SystemException if a system exception occurred
2121            */
2122            public static int countByG_CPK(long groupId, long classPK)
2123                    throws com.liferay.portal.kernel.exception.SystemException {
2124                    return getPersistence().countByG_CPK(groupId, classPK);
2125            }
2126    
2127            /**
2128            * Returns the number of d d m templates where groupId = any &#63; and classPK = &#63;.
2129            *
2130            * @param groupIds the group IDs
2131            * @param classPK the class p k
2132            * @return the number of matching d d m templates
2133            * @throws SystemException if a system exception occurred
2134            */
2135            public static int countByG_CPK(long[] groupIds, long classPK)
2136                    throws com.liferay.portal.kernel.exception.SystemException {
2137                    return getPersistence().countByG_CPK(groupIds, classPK);
2138            }
2139    
2140            /**
2141            * Returns the number of d d m templates that the user has permission to view where groupId = &#63; and classPK = &#63;.
2142            *
2143            * @param groupId the group ID
2144            * @param classPK the class p k
2145            * @return the number of matching d d m templates that the user has permission to view
2146            * @throws SystemException if a system exception occurred
2147            */
2148            public static int filterCountByG_CPK(long groupId, long classPK)
2149                    throws com.liferay.portal.kernel.exception.SystemException {
2150                    return getPersistence().filterCountByG_CPK(groupId, classPK);
2151            }
2152    
2153            /**
2154            * Returns the number of d d m templates that the user has permission to view where groupId = any &#63; and classPK = &#63;.
2155            *
2156            * @param groupIds the group IDs
2157            * @param classPK the class p k
2158            * @return the number of matching d d m templates that the user has permission to view
2159            * @throws SystemException if a system exception occurred
2160            */
2161            public static int filterCountByG_CPK(long[] groupIds, long classPK)
2162                    throws com.liferay.portal.kernel.exception.SystemException {
2163                    return getPersistence().filterCountByG_CPK(groupIds, classPK);
2164            }
2165    
2166            /**
2167            * Returns all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2168            *
2169            * @param groupId the group ID
2170            * @param classNameId the class name ID
2171            * @param classPK the class p k
2172            * @return the matching d d m templates
2173            * @throws SystemException if a system exception occurred
2174            */
2175            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C(
2176                    long groupId, long classNameId, long classPK)
2177                    throws com.liferay.portal.kernel.exception.SystemException {
2178                    return getPersistence().findByG_C_C(groupId, classNameId, classPK);
2179            }
2180    
2181            /**
2182            * Returns a range of all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2183            *
2184            * <p>
2185            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2186            * </p>
2187            *
2188            * @param groupId the group ID
2189            * @param classNameId the class name ID
2190            * @param classPK the class p k
2191            * @param start the lower bound of the range of d d m templates
2192            * @param end the upper bound of the range of d d m templates (not inclusive)
2193            * @return the range of matching d d m templates
2194            * @throws SystemException if a system exception occurred
2195            */
2196            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C(
2197                    long groupId, long classNameId, long classPK, int start, int end)
2198                    throws com.liferay.portal.kernel.exception.SystemException {
2199                    return getPersistence()
2200                                       .findByG_C_C(groupId, classNameId, classPK, start, end);
2201            }
2202    
2203            /**
2204            * Returns an ordered range of all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2205            *
2206            * <p>
2207            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2208            * </p>
2209            *
2210            * @param groupId the group ID
2211            * @param classNameId the class name ID
2212            * @param classPK the class p k
2213            * @param start the lower bound of the range of d d m templates
2214            * @param end the upper bound of the range of d d m templates (not inclusive)
2215            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2216            * @return the ordered range of matching d d m templates
2217            * @throws SystemException if a system exception occurred
2218            */
2219            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C(
2220                    long groupId, long classNameId, long classPK, int start, int end,
2221                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2222                    throws com.liferay.portal.kernel.exception.SystemException {
2223                    return getPersistence()
2224                                       .findByG_C_C(groupId, classNameId, classPK, start, end,
2225                            orderByComparator);
2226            }
2227    
2228            /**
2229            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2230            *
2231            * @param groupId the group ID
2232            * @param classNameId the class name ID
2233            * @param classPK the class p k
2234            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2235            * @return the first matching d d m template
2236            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2237            * @throws SystemException if a system exception occurred
2238            */
2239            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_C_First(
2240                    long groupId, long classNameId, long classPK,
2241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2242                    throws com.liferay.portal.kernel.exception.SystemException,
2243                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2244                    return getPersistence()
2245                                       .findByG_C_C_First(groupId, classNameId, classPK,
2246                            orderByComparator);
2247            }
2248    
2249            /**
2250            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2251            *
2252            * @param groupId the group ID
2253            * @param classNameId the class name ID
2254            * @param classPK the class p k
2255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2256            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
2257            * @throws SystemException if a system exception occurred
2258            */
2259            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_C_First(
2260                    long groupId, long classNameId, long classPK,
2261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2262                    throws com.liferay.portal.kernel.exception.SystemException {
2263                    return getPersistence()
2264                                       .fetchByG_C_C_First(groupId, classNameId, classPK,
2265                            orderByComparator);
2266            }
2267    
2268            /**
2269            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2270            *
2271            * @param groupId the group ID
2272            * @param classNameId the class name ID
2273            * @param classPK the class p k
2274            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2275            * @return the last matching d d m template
2276            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2277            * @throws SystemException if a system exception occurred
2278            */
2279            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_C_Last(
2280                    long groupId, long classNameId, long classPK,
2281                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2282                    throws com.liferay.portal.kernel.exception.SystemException,
2283                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2284                    return getPersistence()
2285                                       .findByG_C_C_Last(groupId, classNameId, classPK,
2286                            orderByComparator);
2287            }
2288    
2289            /**
2290            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2291            *
2292            * @param groupId the group ID
2293            * @param classNameId the class name ID
2294            * @param classPK the class p k
2295            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2296            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
2297            * @throws SystemException if a system exception occurred
2298            */
2299            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_C_Last(
2300                    long groupId, long classNameId, long classPK,
2301                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2302                    throws com.liferay.portal.kernel.exception.SystemException {
2303                    return getPersistence()
2304                                       .fetchByG_C_C_Last(groupId, classNameId, classPK,
2305                            orderByComparator);
2306            }
2307    
2308            /**
2309            * Returns the d d m templates before and after the current d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2310            *
2311            * @param templateId the primary key of the current d d m template
2312            * @param groupId the group ID
2313            * @param classNameId the class name ID
2314            * @param classPK the class p k
2315            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2316            * @return the previous, current, and next d d m template
2317            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
2318            * @throws SystemException if a system exception occurred
2319            */
2320            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByG_C_C_PrevAndNext(
2321                    long templateId, long groupId, long classNameId, long classPK,
2322                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2323                    throws com.liferay.portal.kernel.exception.SystemException,
2324                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2325                    return getPersistence()
2326                                       .findByG_C_C_PrevAndNext(templateId, groupId, classNameId,
2327                            classPK, orderByComparator);
2328            }
2329    
2330            /**
2331            * Returns all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2332            *
2333            * @param groupId the group ID
2334            * @param classNameId the class name ID
2335            * @param classPK the class p k
2336            * @return the matching d d m templates that the user has permission to view
2337            * @throws SystemException if a system exception occurred
2338            */
2339            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C(
2340                    long groupId, long classNameId, long classPK)
2341                    throws com.liferay.portal.kernel.exception.SystemException {
2342                    return getPersistence().filterFindByG_C_C(groupId, classNameId, classPK);
2343            }
2344    
2345            /**
2346            * Returns a range of all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2347            *
2348            * <p>
2349            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2350            * </p>
2351            *
2352            * @param groupId the group ID
2353            * @param classNameId the class name ID
2354            * @param classPK the class p k
2355            * @param start the lower bound of the range of d d m templates
2356            * @param end the upper bound of the range of d d m templates (not inclusive)
2357            * @return the range of matching d d m templates that the user has permission to view
2358            * @throws SystemException if a system exception occurred
2359            */
2360            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C(
2361                    long groupId, long classNameId, long classPK, int start, int end)
2362                    throws com.liferay.portal.kernel.exception.SystemException {
2363                    return getPersistence()
2364                                       .filterFindByG_C_C(groupId, classNameId, classPK, start, end);
2365            }
2366    
2367            /**
2368            * Returns an ordered range of all the d d m templates that the user has permissions to view where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2369            *
2370            * <p>
2371            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2372            * </p>
2373            *
2374            * @param groupId the group ID
2375            * @param classNameId the class name ID
2376            * @param classPK the class p k
2377            * @param start the lower bound of the range of d d m templates
2378            * @param end the upper bound of the range of d d m templates (not inclusive)
2379            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2380            * @return the ordered range of matching d d m templates that the user has permission to view
2381            * @throws SystemException if a system exception occurred
2382            */
2383            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C(
2384                    long groupId, long classNameId, long classPK, int start, int end,
2385                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2386                    throws com.liferay.portal.kernel.exception.SystemException {
2387                    return getPersistence()
2388                                       .filterFindByG_C_C(groupId, classNameId, classPK, start,
2389                            end, orderByComparator);
2390            }
2391    
2392            /**
2393            * Returns the d d m templates before and after the current d d m template in the ordered set of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2394            *
2395            * @param templateId the primary key of the current d d m template
2396            * @param groupId the group ID
2397            * @param classNameId the class name ID
2398            * @param classPK the class p k
2399            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2400            * @return the previous, current, and next d d m template
2401            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
2402            * @throws SystemException if a system exception occurred
2403            */
2404            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] filterFindByG_C_C_PrevAndNext(
2405                    long templateId, long groupId, long classNameId, long classPK,
2406                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2407                    throws com.liferay.portal.kernel.exception.SystemException,
2408                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2409                    return getPersistence()
2410                                       .filterFindByG_C_C_PrevAndNext(templateId, groupId,
2411                            classNameId, classPK, orderByComparator);
2412            }
2413    
2414            /**
2415            * Removes all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
2416            *
2417            * @param groupId the group ID
2418            * @param classNameId the class name ID
2419            * @param classPK the class p k
2420            * @throws SystemException if a system exception occurred
2421            */
2422            public static void removeByG_C_C(long groupId, long classNameId,
2423                    long classPK)
2424                    throws com.liferay.portal.kernel.exception.SystemException {
2425                    getPersistence().removeByG_C_C(groupId, classNameId, classPK);
2426            }
2427    
2428            /**
2429            * Returns the number of d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2430            *
2431            * @param groupId the group ID
2432            * @param classNameId the class name ID
2433            * @param classPK the class p k
2434            * @return the number of matching d d m templates
2435            * @throws SystemException if a system exception occurred
2436            */
2437            public static int countByG_C_C(long groupId, long classNameId, long classPK)
2438                    throws com.liferay.portal.kernel.exception.SystemException {
2439                    return getPersistence().countByG_C_C(groupId, classNameId, classPK);
2440            }
2441    
2442            /**
2443            * Returns the number of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63;.
2444            *
2445            * @param groupId the group ID
2446            * @param classNameId the class name ID
2447            * @param classPK the class p k
2448            * @return the number of matching d d m templates that the user has permission to view
2449            * @throws SystemException if a system exception occurred
2450            */
2451            public static int filterCountByG_C_C(long groupId, long classNameId,
2452                    long classPK)
2453                    throws com.liferay.portal.kernel.exception.SystemException {
2454                    return getPersistence().filterCountByG_C_C(groupId, classNameId, classPK);
2455            }
2456    
2457            /**
2458            * Returns the d d m template where groupId = &#63; and classNameId = &#63; and templateKey = &#63; or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException} if it could not be found.
2459            *
2460            * @param groupId the group ID
2461            * @param classNameId the class name ID
2462            * @param templateKey the template key
2463            * @return the matching d d m template
2464            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2465            * @throws SystemException if a system exception occurred
2466            */
2467            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_T(
2468                    long groupId, long classNameId, java.lang.String templateKey)
2469                    throws com.liferay.portal.kernel.exception.SystemException,
2470                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2471                    return getPersistence().findByG_C_T(groupId, classNameId, templateKey);
2472            }
2473    
2474            /**
2475            * Returns the d d m template where groupId = &#63; and classNameId = &#63; and templateKey = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
2476            *
2477            * @param groupId the group ID
2478            * @param classNameId the class name ID
2479            * @param templateKey the template key
2480            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
2481            * @throws SystemException if a system exception occurred
2482            */
2483            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_T(
2484                    long groupId, long classNameId, java.lang.String templateKey)
2485                    throws com.liferay.portal.kernel.exception.SystemException {
2486                    return getPersistence().fetchByG_C_T(groupId, classNameId, templateKey);
2487            }
2488    
2489            /**
2490            * Returns the d d m template where groupId = &#63; and classNameId = &#63; and templateKey = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
2491            *
2492            * @param groupId the group ID
2493            * @param classNameId the class name ID
2494            * @param templateKey the template key
2495            * @param retrieveFromCache whether to use the finder cache
2496            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
2497            * @throws SystemException if a system exception occurred
2498            */
2499            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_T(
2500                    long groupId, long classNameId, java.lang.String templateKey,
2501                    boolean retrieveFromCache)
2502                    throws com.liferay.portal.kernel.exception.SystemException {
2503                    return getPersistence()
2504                                       .fetchByG_C_T(groupId, classNameId, templateKey,
2505                            retrieveFromCache);
2506            }
2507    
2508            /**
2509            * Removes the d d m template where groupId = &#63; and classNameId = &#63; and templateKey = &#63; from the database.
2510            *
2511            * @param groupId the group ID
2512            * @param classNameId the class name ID
2513            * @param templateKey the template key
2514            * @return the d d m template that was removed
2515            * @throws SystemException if a system exception occurred
2516            */
2517            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate removeByG_C_T(
2518                    long groupId, long classNameId, java.lang.String templateKey)
2519                    throws com.liferay.portal.kernel.exception.SystemException,
2520                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2521                    return getPersistence().removeByG_C_T(groupId, classNameId, templateKey);
2522            }
2523    
2524            /**
2525            * Returns the number of d d m templates where groupId = &#63; and classNameId = &#63; and templateKey = &#63;.
2526            *
2527            * @param groupId the group ID
2528            * @param classNameId the class name ID
2529            * @param templateKey the template key
2530            * @return the number of matching d d m templates
2531            * @throws SystemException if a system exception occurred
2532            */
2533            public static int countByG_C_T(long groupId, long classNameId,
2534                    java.lang.String templateKey)
2535                    throws com.liferay.portal.kernel.exception.SystemException {
2536                    return getPersistence().countByG_C_T(groupId, classNameId, templateKey);
2537            }
2538    
2539            /**
2540            * Returns all the d d m templates where classNameId = &#63; and classPK = &#63; and type = &#63;.
2541            *
2542            * @param classNameId the class name ID
2543            * @param classPK the class p k
2544            * @param type the type
2545            * @return the matching d d m templates
2546            * @throws SystemException if a system exception occurred
2547            */
2548            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByC_C_T(
2549                    long classNameId, long classPK, java.lang.String type)
2550                    throws com.liferay.portal.kernel.exception.SystemException {
2551                    return getPersistence().findByC_C_T(classNameId, classPK, type);
2552            }
2553    
2554            /**
2555            * Returns a range of all the d d m templates where classNameId = &#63; and classPK = &#63; and type = &#63;.
2556            *
2557            * <p>
2558            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2559            * </p>
2560            *
2561            * @param classNameId the class name ID
2562            * @param classPK the class p k
2563            * @param type the type
2564            * @param start the lower bound of the range of d d m templates
2565            * @param end the upper bound of the range of d d m templates (not inclusive)
2566            * @return the range of matching d d m templates
2567            * @throws SystemException if a system exception occurred
2568            */
2569            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByC_C_T(
2570                    long classNameId, long classPK, java.lang.String type, int start,
2571                    int end) throws com.liferay.portal.kernel.exception.SystemException {
2572                    return getPersistence()
2573                                       .findByC_C_T(classNameId, classPK, type, start, end);
2574            }
2575    
2576            /**
2577            * Returns an ordered range of all the d d m templates where classNameId = &#63; and classPK = &#63; and type = &#63;.
2578            *
2579            * <p>
2580            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2581            * </p>
2582            *
2583            * @param classNameId the class name ID
2584            * @param classPK the class p k
2585            * @param type the type
2586            * @param start the lower bound of the range of d d m templates
2587            * @param end the upper bound of the range of d d m templates (not inclusive)
2588            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2589            * @return the ordered range of matching d d m templates
2590            * @throws SystemException if a system exception occurred
2591            */
2592            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByC_C_T(
2593                    long classNameId, long classPK, java.lang.String type, int start,
2594                    int end,
2595                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2596                    throws com.liferay.portal.kernel.exception.SystemException {
2597                    return getPersistence()
2598                                       .findByC_C_T(classNameId, classPK, type, start, end,
2599                            orderByComparator);
2600            }
2601    
2602            /**
2603            * Returns the first d d m template in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
2604            *
2605            * @param classNameId the class name ID
2606            * @param classPK the class p k
2607            * @param type the type
2608            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2609            * @return the first matching d d m template
2610            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2611            * @throws SystemException if a system exception occurred
2612            */
2613            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByC_C_T_First(
2614                    long classNameId, long classPK, java.lang.String type,
2615                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2616                    throws com.liferay.portal.kernel.exception.SystemException,
2617                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2618                    return getPersistence()
2619                                       .findByC_C_T_First(classNameId, classPK, type,
2620                            orderByComparator);
2621            }
2622    
2623            /**
2624            * Returns the first d d m template in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
2625            *
2626            * @param classNameId the class name ID
2627            * @param classPK the class p k
2628            * @param type the type
2629            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2630            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
2631            * @throws SystemException if a system exception occurred
2632            */
2633            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByC_C_T_First(
2634                    long classNameId, long classPK, java.lang.String type,
2635                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2636                    throws com.liferay.portal.kernel.exception.SystemException {
2637                    return getPersistence()
2638                                       .fetchByC_C_T_First(classNameId, classPK, type,
2639                            orderByComparator);
2640            }
2641    
2642            /**
2643            * Returns the last d d m template in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
2644            *
2645            * @param classNameId the class name ID
2646            * @param classPK the class p k
2647            * @param type the type
2648            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2649            * @return the last matching d d m template
2650            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2651            * @throws SystemException if a system exception occurred
2652            */
2653            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByC_C_T_Last(
2654                    long classNameId, long classPK, java.lang.String type,
2655                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2656                    throws com.liferay.portal.kernel.exception.SystemException,
2657                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2658                    return getPersistence()
2659                                       .findByC_C_T_Last(classNameId, classPK, type,
2660                            orderByComparator);
2661            }
2662    
2663            /**
2664            * Returns the last d d m template in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
2665            *
2666            * @param classNameId the class name ID
2667            * @param classPK the class p k
2668            * @param type the type
2669            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2670            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
2671            * @throws SystemException if a system exception occurred
2672            */
2673            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByC_C_T_Last(
2674                    long classNameId, long classPK, java.lang.String type,
2675                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2676                    throws com.liferay.portal.kernel.exception.SystemException {
2677                    return getPersistence()
2678                                       .fetchByC_C_T_Last(classNameId, classPK, type,
2679                            orderByComparator);
2680            }
2681    
2682            /**
2683            * Returns the d d m templates before and after the current d d m template in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
2684            *
2685            * @param templateId the primary key of the current d d m template
2686            * @param classNameId the class name ID
2687            * @param classPK the class p k
2688            * @param type the type
2689            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2690            * @return the previous, current, and next d d m template
2691            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
2692            * @throws SystemException if a system exception occurred
2693            */
2694            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByC_C_T_PrevAndNext(
2695                    long templateId, long classNameId, long classPK, java.lang.String type,
2696                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2697                    throws com.liferay.portal.kernel.exception.SystemException,
2698                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2699                    return getPersistence()
2700                                       .findByC_C_T_PrevAndNext(templateId, classNameId, classPK,
2701                            type, orderByComparator);
2702            }
2703    
2704            /**
2705            * Removes all the d d m templates where classNameId = &#63; and classPK = &#63; and type = &#63; from the database.
2706            *
2707            * @param classNameId the class name ID
2708            * @param classPK the class p k
2709            * @param type the type
2710            * @throws SystemException if a system exception occurred
2711            */
2712            public static void removeByC_C_T(long classNameId, long classPK,
2713                    java.lang.String type)
2714                    throws com.liferay.portal.kernel.exception.SystemException {
2715                    getPersistence().removeByC_C_T(classNameId, classPK, type);
2716            }
2717    
2718            /**
2719            * Returns the number of d d m templates where classNameId = &#63; and classPK = &#63; and type = &#63;.
2720            *
2721            * @param classNameId the class name ID
2722            * @param classPK the class p k
2723            * @param type the type
2724            * @return the number of matching d d m templates
2725            * @throws SystemException if a system exception occurred
2726            */
2727            public static int countByC_C_T(long classNameId, long classPK,
2728                    java.lang.String type)
2729                    throws com.liferay.portal.kernel.exception.SystemException {
2730                    return getPersistence().countByC_C_T(classNameId, classPK, type);
2731            }
2732    
2733            /**
2734            * Returns all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2735            *
2736            * @param groupId the group ID
2737            * @param classNameId the class name ID
2738            * @param classPK the class p k
2739            * @param type the type
2740            * @return the matching d d m templates
2741            * @throws SystemException if a system exception occurred
2742            */
2743            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C_T(
2744                    long groupId, long classNameId, long classPK, java.lang.String type)
2745                    throws com.liferay.portal.kernel.exception.SystemException {
2746                    return getPersistence()
2747                                       .findByG_C_C_T(groupId, classNameId, classPK, type);
2748            }
2749    
2750            /**
2751            * Returns a range of all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2752            *
2753            * <p>
2754            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2755            * </p>
2756            *
2757            * @param groupId the group ID
2758            * @param classNameId the class name ID
2759            * @param classPK the class p k
2760            * @param type the type
2761            * @param start the lower bound of the range of d d m templates
2762            * @param end the upper bound of the range of d d m templates (not inclusive)
2763            * @return the range of matching d d m templates
2764            * @throws SystemException if a system exception occurred
2765            */
2766            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C_T(
2767                    long groupId, long classNameId, long classPK, java.lang.String type,
2768                    int start, int end)
2769                    throws com.liferay.portal.kernel.exception.SystemException {
2770                    return getPersistence()
2771                                       .findByG_C_C_T(groupId, classNameId, classPK, type, start,
2772                            end);
2773            }
2774    
2775            /**
2776            * Returns an ordered range of all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2777            *
2778            * <p>
2779            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2780            * </p>
2781            *
2782            * @param groupId the group ID
2783            * @param classNameId the class name ID
2784            * @param classPK the class p k
2785            * @param type the type
2786            * @param start the lower bound of the range of d d m templates
2787            * @param end the upper bound of the range of d d m templates (not inclusive)
2788            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2789            * @return the ordered range of matching d d m templates
2790            * @throws SystemException if a system exception occurred
2791            */
2792            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C_T(
2793                    long groupId, long classNameId, long classPK, java.lang.String type,
2794                    int start, int end,
2795                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2796                    throws com.liferay.portal.kernel.exception.SystemException {
2797                    return getPersistence()
2798                                       .findByG_C_C_T(groupId, classNameId, classPK, type, start,
2799                            end, orderByComparator);
2800            }
2801    
2802            /**
2803            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2804            *
2805            * @param groupId the group ID
2806            * @param classNameId the class name ID
2807            * @param classPK the class p k
2808            * @param type the type
2809            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2810            * @return the first matching d d m template
2811            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2812            * @throws SystemException if a system exception occurred
2813            */
2814            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_C_T_First(
2815                    long groupId, long classNameId, long classPK, java.lang.String type,
2816                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2817                    throws com.liferay.portal.kernel.exception.SystemException,
2818                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2819                    return getPersistence()
2820                                       .findByG_C_C_T_First(groupId, classNameId, classPK, type,
2821                            orderByComparator);
2822            }
2823    
2824            /**
2825            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2826            *
2827            * @param groupId the group ID
2828            * @param classNameId the class name ID
2829            * @param classPK the class p k
2830            * @param type the type
2831            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2832            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
2833            * @throws SystemException if a system exception occurred
2834            */
2835            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_C_T_First(
2836                    long groupId, long classNameId, long classPK, java.lang.String type,
2837                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2838                    throws com.liferay.portal.kernel.exception.SystemException {
2839                    return getPersistence()
2840                                       .fetchByG_C_C_T_First(groupId, classNameId, classPK, type,
2841                            orderByComparator);
2842            }
2843    
2844            /**
2845            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2846            *
2847            * @param groupId the group ID
2848            * @param classNameId the class name ID
2849            * @param classPK the class p k
2850            * @param type the type
2851            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2852            * @return the last matching d d m template
2853            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
2854            * @throws SystemException if a system exception occurred
2855            */
2856            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_C_T_Last(
2857                    long groupId, long classNameId, long classPK, java.lang.String type,
2858                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2859                    throws com.liferay.portal.kernel.exception.SystemException,
2860                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2861                    return getPersistence()
2862                                       .findByG_C_C_T_Last(groupId, classNameId, classPK, type,
2863                            orderByComparator);
2864            }
2865    
2866            /**
2867            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2868            *
2869            * @param groupId the group ID
2870            * @param classNameId the class name ID
2871            * @param classPK the class p k
2872            * @param type the type
2873            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2874            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
2875            * @throws SystemException if a system exception occurred
2876            */
2877            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_C_T_Last(
2878                    long groupId, long classNameId, long classPK, java.lang.String type,
2879                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2880                    throws com.liferay.portal.kernel.exception.SystemException {
2881                    return getPersistence()
2882                                       .fetchByG_C_C_T_Last(groupId, classNameId, classPK, type,
2883                            orderByComparator);
2884            }
2885    
2886            /**
2887            * Returns the d d m templates before and after the current d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2888            *
2889            * @param templateId the primary key of the current d d m template
2890            * @param groupId the group ID
2891            * @param classNameId the class name ID
2892            * @param classPK the class p k
2893            * @param type the type
2894            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2895            * @return the previous, current, and next d d m template
2896            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
2897            * @throws SystemException if a system exception occurred
2898            */
2899            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByG_C_C_T_PrevAndNext(
2900                    long templateId, long groupId, long classNameId, long classPK,
2901                    java.lang.String type,
2902                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2903                    throws com.liferay.portal.kernel.exception.SystemException,
2904                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2905                    return getPersistence()
2906                                       .findByG_C_C_T_PrevAndNext(templateId, groupId, classNameId,
2907                            classPK, type, orderByComparator);
2908            }
2909    
2910            /**
2911            * Returns all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2912            *
2913            * @param groupId the group ID
2914            * @param classNameId the class name ID
2915            * @param classPK the class p k
2916            * @param type the type
2917            * @return the matching d d m templates that the user has permission to view
2918            * @throws SystemException if a system exception occurred
2919            */
2920            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C_T(
2921                    long groupId, long classNameId, long classPK, java.lang.String type)
2922                    throws com.liferay.portal.kernel.exception.SystemException {
2923                    return getPersistence()
2924                                       .filterFindByG_C_C_T(groupId, classNameId, classPK, type);
2925            }
2926    
2927            /**
2928            * Returns a range of all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2929            *
2930            * <p>
2931            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2932            * </p>
2933            *
2934            * @param groupId the group ID
2935            * @param classNameId the class name ID
2936            * @param classPK the class p k
2937            * @param type the type
2938            * @param start the lower bound of the range of d d m templates
2939            * @param end the upper bound of the range of d d m templates (not inclusive)
2940            * @return the range of matching d d m templates that the user has permission to view
2941            * @throws SystemException if a system exception occurred
2942            */
2943            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C_T(
2944                    long groupId, long classNameId, long classPK, java.lang.String type,
2945                    int start, int end)
2946                    throws com.liferay.portal.kernel.exception.SystemException {
2947                    return getPersistence()
2948                                       .filterFindByG_C_C_T(groupId, classNameId, classPK, type,
2949                            start, end);
2950            }
2951    
2952            /**
2953            * Returns an ordered range of all the d d m templates that the user has permissions to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2954            *
2955            * <p>
2956            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
2957            * </p>
2958            *
2959            * @param groupId the group ID
2960            * @param classNameId the class name ID
2961            * @param classPK the class p k
2962            * @param type the type
2963            * @param start the lower bound of the range of d d m templates
2964            * @param end the upper bound of the range of d d m templates (not inclusive)
2965            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2966            * @return the ordered range of matching d d m templates that the user has permission to view
2967            * @throws SystemException if a system exception occurred
2968            */
2969            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C_T(
2970                    long groupId, long classNameId, long classPK, java.lang.String type,
2971                    int start, int end,
2972                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2973                    throws com.liferay.portal.kernel.exception.SystemException {
2974                    return getPersistence()
2975                                       .filterFindByG_C_C_T(groupId, classNameId, classPK, type,
2976                            start, end, orderByComparator);
2977            }
2978    
2979            /**
2980            * Returns the d d m templates before and after the current d d m template in the ordered set of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
2981            *
2982            * @param templateId the primary key of the current d d m template
2983            * @param groupId the group ID
2984            * @param classNameId the class name ID
2985            * @param classPK the class p k
2986            * @param type the type
2987            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2988            * @return the previous, current, and next d d m template
2989            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
2990            * @throws SystemException if a system exception occurred
2991            */
2992            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] filterFindByG_C_C_T_PrevAndNext(
2993                    long templateId, long groupId, long classNameId, long classPK,
2994                    java.lang.String type,
2995                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2996                    throws com.liferay.portal.kernel.exception.SystemException,
2997                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
2998                    return getPersistence()
2999                                       .filterFindByG_C_C_T_PrevAndNext(templateId, groupId,
3000                            classNameId, classPK, type, orderByComparator);
3001            }
3002    
3003            /**
3004            * Removes all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; from the database.
3005            *
3006            * @param groupId the group ID
3007            * @param classNameId the class name ID
3008            * @param classPK the class p k
3009            * @param type the type
3010            * @throws SystemException if a system exception occurred
3011            */
3012            public static void removeByG_C_C_T(long groupId, long classNameId,
3013                    long classPK, java.lang.String type)
3014                    throws com.liferay.portal.kernel.exception.SystemException {
3015                    getPersistence().removeByG_C_C_T(groupId, classNameId, classPK, type);
3016            }
3017    
3018            /**
3019            * Returns the number of d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
3020            *
3021            * @param groupId the group ID
3022            * @param classNameId the class name ID
3023            * @param classPK the class p k
3024            * @param type the type
3025            * @return the number of matching d d m templates
3026            * @throws SystemException if a system exception occurred
3027            */
3028            public static int countByG_C_C_T(long groupId, long classNameId,
3029                    long classPK, java.lang.String type)
3030                    throws com.liferay.portal.kernel.exception.SystemException {
3031                    return getPersistence()
3032                                       .countByG_C_C_T(groupId, classNameId, classPK, type);
3033            }
3034    
3035            /**
3036            * Returns the number of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63;.
3037            *
3038            * @param groupId the group ID
3039            * @param classNameId the class name ID
3040            * @param classPK the class p k
3041            * @param type the type
3042            * @return the number of matching d d m templates that the user has permission to view
3043            * @throws SystemException if a system exception occurred
3044            */
3045            public static int filterCountByG_C_C_T(long groupId, long classNameId,
3046                    long classPK, java.lang.String type)
3047                    throws com.liferay.portal.kernel.exception.SystemException {
3048                    return getPersistence()
3049                                       .filterCountByG_C_C_T(groupId, classNameId, classPK, type);
3050            }
3051    
3052            /**
3053            * Returns all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3054            *
3055            * @param groupId the group ID
3056            * @param classNameId the class name ID
3057            * @param classPK the class p k
3058            * @param type the type
3059            * @param mode the mode
3060            * @return the matching d d m templates
3061            * @throws SystemException if a system exception occurred
3062            */
3063            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C_T_M(
3064                    long groupId, long classNameId, long classPK, java.lang.String type,
3065                    java.lang.String mode)
3066                    throws com.liferay.portal.kernel.exception.SystemException {
3067                    return getPersistence()
3068                                       .findByG_C_C_T_M(groupId, classNameId, classPK, type, mode);
3069            }
3070    
3071            /**
3072            * Returns a range of all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3073            *
3074            * <p>
3075            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
3076            * </p>
3077            *
3078            * @param groupId the group ID
3079            * @param classNameId the class name ID
3080            * @param classPK the class p k
3081            * @param type the type
3082            * @param mode the mode
3083            * @param start the lower bound of the range of d d m templates
3084            * @param end the upper bound of the range of d d m templates (not inclusive)
3085            * @return the range of matching d d m templates
3086            * @throws SystemException if a system exception occurred
3087            */
3088            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C_T_M(
3089                    long groupId, long classNameId, long classPK, java.lang.String type,
3090                    java.lang.String mode, int start, int end)
3091                    throws com.liferay.portal.kernel.exception.SystemException {
3092                    return getPersistence()
3093                                       .findByG_C_C_T_M(groupId, classNameId, classPK, type, mode,
3094                            start, end);
3095            }
3096    
3097            /**
3098            * Returns an ordered range of all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3099            *
3100            * <p>
3101            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
3102            * </p>
3103            *
3104            * @param groupId the group ID
3105            * @param classNameId the class name ID
3106            * @param classPK the class p k
3107            * @param type the type
3108            * @param mode the mode
3109            * @param start the lower bound of the range of d d m templates
3110            * @param end the upper bound of the range of d d m templates (not inclusive)
3111            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3112            * @return the ordered range of matching d d m templates
3113            * @throws SystemException if a system exception occurred
3114            */
3115            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByG_C_C_T_M(
3116                    long groupId, long classNameId, long classPK, java.lang.String type,
3117                    java.lang.String mode, int start, int end,
3118                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3119                    throws com.liferay.portal.kernel.exception.SystemException {
3120                    return getPersistence()
3121                                       .findByG_C_C_T_M(groupId, classNameId, classPK, type, mode,
3122                            start, end, orderByComparator);
3123            }
3124    
3125            /**
3126            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3127            *
3128            * @param groupId the group ID
3129            * @param classNameId the class name ID
3130            * @param classPK the class p k
3131            * @param type the type
3132            * @param mode the mode
3133            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3134            * @return the first matching d d m template
3135            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
3136            * @throws SystemException if a system exception occurred
3137            */
3138            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_C_T_M_First(
3139                    long groupId, long classNameId, long classPK, java.lang.String type,
3140                    java.lang.String mode,
3141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3142                    throws com.liferay.portal.kernel.exception.SystemException,
3143                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
3144                    return getPersistence()
3145                                       .findByG_C_C_T_M_First(groupId, classNameId, classPK, type,
3146                            mode, orderByComparator);
3147            }
3148    
3149            /**
3150            * Returns the first d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3151            *
3152            * @param groupId the group ID
3153            * @param classNameId the class name ID
3154            * @param classPK the class p k
3155            * @param type the type
3156            * @param mode the mode
3157            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3158            * @return the first matching d d m template, or <code>null</code> if a matching d d m template could not be found
3159            * @throws SystemException if a system exception occurred
3160            */
3161            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_C_T_M_First(
3162                    long groupId, long classNameId, long classPK, java.lang.String type,
3163                    java.lang.String mode,
3164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3165                    throws com.liferay.portal.kernel.exception.SystemException {
3166                    return getPersistence()
3167                                       .fetchByG_C_C_T_M_First(groupId, classNameId, classPK, type,
3168                            mode, orderByComparator);
3169            }
3170    
3171            /**
3172            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3173            *
3174            * @param groupId the group ID
3175            * @param classNameId the class name ID
3176            * @param classPK the class p k
3177            * @param type the type
3178            * @param mode the mode
3179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3180            * @return the last matching d d m template
3181            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a matching d d m template could not be found
3182            * @throws SystemException if a system exception occurred
3183            */
3184            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByG_C_C_T_M_Last(
3185                    long groupId, long classNameId, long classPK, java.lang.String type,
3186                    java.lang.String mode,
3187                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3188                    throws com.liferay.portal.kernel.exception.SystemException,
3189                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
3190                    return getPersistence()
3191                                       .findByG_C_C_T_M_Last(groupId, classNameId, classPK, type,
3192                            mode, orderByComparator);
3193            }
3194    
3195            /**
3196            * Returns the last d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3197            *
3198            * @param groupId the group ID
3199            * @param classNameId the class name ID
3200            * @param classPK the class p k
3201            * @param type the type
3202            * @param mode the mode
3203            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3204            * @return the last matching d d m template, or <code>null</code> if a matching d d m template could not be found
3205            * @throws SystemException if a system exception occurred
3206            */
3207            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByG_C_C_T_M_Last(
3208                    long groupId, long classNameId, long classPK, java.lang.String type,
3209                    java.lang.String mode,
3210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3211                    throws com.liferay.portal.kernel.exception.SystemException {
3212                    return getPersistence()
3213                                       .fetchByG_C_C_T_M_Last(groupId, classNameId, classPK, type,
3214                            mode, orderByComparator);
3215            }
3216    
3217            /**
3218            * Returns the d d m templates before and after the current d d m template in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3219            *
3220            * @param templateId the primary key of the current d d m template
3221            * @param groupId the group ID
3222            * @param classNameId the class name ID
3223            * @param classPK the class p k
3224            * @param type the type
3225            * @param mode the mode
3226            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3227            * @return the previous, current, and next d d m template
3228            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
3229            * @throws SystemException if a system exception occurred
3230            */
3231            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] findByG_C_C_T_M_PrevAndNext(
3232                    long templateId, long groupId, long classNameId, long classPK,
3233                    java.lang.String type, java.lang.String mode,
3234                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3235                    throws com.liferay.portal.kernel.exception.SystemException,
3236                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
3237                    return getPersistence()
3238                                       .findByG_C_C_T_M_PrevAndNext(templateId, groupId,
3239                            classNameId, classPK, type, mode, orderByComparator);
3240            }
3241    
3242            /**
3243            * Returns all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3244            *
3245            * @param groupId the group ID
3246            * @param classNameId the class name ID
3247            * @param classPK the class p k
3248            * @param type the type
3249            * @param mode the mode
3250            * @return the matching d d m templates that the user has permission to view
3251            * @throws SystemException if a system exception occurred
3252            */
3253            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C_T_M(
3254                    long groupId, long classNameId, long classPK, java.lang.String type,
3255                    java.lang.String mode)
3256                    throws com.liferay.portal.kernel.exception.SystemException {
3257                    return getPersistence()
3258                                       .filterFindByG_C_C_T_M(groupId, classNameId, classPK, type,
3259                            mode);
3260            }
3261    
3262            /**
3263            * Returns a range of all the d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3264            *
3265            * <p>
3266            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
3267            * </p>
3268            *
3269            * @param groupId the group ID
3270            * @param classNameId the class name ID
3271            * @param classPK the class p k
3272            * @param type the type
3273            * @param mode the mode
3274            * @param start the lower bound of the range of d d m templates
3275            * @param end the upper bound of the range of d d m templates (not inclusive)
3276            * @return the range of matching d d m templates that the user has permission to view
3277            * @throws SystemException if a system exception occurred
3278            */
3279            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C_T_M(
3280                    long groupId, long classNameId, long classPK, java.lang.String type,
3281                    java.lang.String mode, int start, int end)
3282                    throws com.liferay.portal.kernel.exception.SystemException {
3283                    return getPersistence()
3284                                       .filterFindByG_C_C_T_M(groupId, classNameId, classPK, type,
3285                            mode, start, end);
3286            }
3287    
3288            /**
3289            * Returns an ordered range of all the d d m templates that the user has permissions to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3290            *
3291            * <p>
3292            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
3293            * </p>
3294            *
3295            * @param groupId the group ID
3296            * @param classNameId the class name ID
3297            * @param classPK the class p k
3298            * @param type the type
3299            * @param mode the mode
3300            * @param start the lower bound of the range of d d m templates
3301            * @param end the upper bound of the range of d d m templates (not inclusive)
3302            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3303            * @return the ordered range of matching d d m templates that the user has permission to view
3304            * @throws SystemException if a system exception occurred
3305            */
3306            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByG_C_C_T_M(
3307                    long groupId, long classNameId, long classPK, java.lang.String type,
3308                    java.lang.String mode, int start, int end,
3309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3310                    throws com.liferay.portal.kernel.exception.SystemException {
3311                    return getPersistence()
3312                                       .filterFindByG_C_C_T_M(groupId, classNameId, classPK, type,
3313                            mode, start, end, orderByComparator);
3314            }
3315    
3316            /**
3317            * Returns the d d m templates before and after the current d d m template in the ordered set of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3318            *
3319            * @param templateId the primary key of the current d d m template
3320            * @param groupId the group ID
3321            * @param classNameId the class name ID
3322            * @param classPK the class p k
3323            * @param type the type
3324            * @param mode the mode
3325            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3326            * @return the previous, current, and next d d m template
3327            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
3328            * @throws SystemException if a system exception occurred
3329            */
3330            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate[] filterFindByG_C_C_T_M_PrevAndNext(
3331                    long templateId, long groupId, long classNameId, long classPK,
3332                    java.lang.String type, java.lang.String mode,
3333                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3334                    throws com.liferay.portal.kernel.exception.SystemException,
3335                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
3336                    return getPersistence()
3337                                       .filterFindByG_C_C_T_M_PrevAndNext(templateId, groupId,
3338                            classNameId, classPK, type, mode, orderByComparator);
3339            }
3340    
3341            /**
3342            * Removes all the d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63; from the database.
3343            *
3344            * @param groupId the group ID
3345            * @param classNameId the class name ID
3346            * @param classPK the class p k
3347            * @param type the type
3348            * @param mode the mode
3349            * @throws SystemException if a system exception occurred
3350            */
3351            public static void removeByG_C_C_T_M(long groupId, long classNameId,
3352                    long classPK, java.lang.String type, java.lang.String mode)
3353                    throws com.liferay.portal.kernel.exception.SystemException {
3354                    getPersistence()
3355                            .removeByG_C_C_T_M(groupId, classNameId, classPK, type, mode);
3356            }
3357    
3358            /**
3359            * Returns the number of d d m templates where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3360            *
3361            * @param groupId the group ID
3362            * @param classNameId the class name ID
3363            * @param classPK the class p k
3364            * @param type the type
3365            * @param mode the mode
3366            * @return the number of matching d d m templates
3367            * @throws SystemException if a system exception occurred
3368            */
3369            public static int countByG_C_C_T_M(long groupId, long classNameId,
3370                    long classPK, java.lang.String type, java.lang.String mode)
3371                    throws com.liferay.portal.kernel.exception.SystemException {
3372                    return getPersistence()
3373                                       .countByG_C_C_T_M(groupId, classNameId, classPK, type, mode);
3374            }
3375    
3376            /**
3377            * Returns the number of d d m templates that the user has permission to view where groupId = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and mode = &#63;.
3378            *
3379            * @param groupId the group ID
3380            * @param classNameId the class name ID
3381            * @param classPK the class p k
3382            * @param type the type
3383            * @param mode the mode
3384            * @return the number of matching d d m templates that the user has permission to view
3385            * @throws SystemException if a system exception occurred
3386            */
3387            public static int filterCountByG_C_C_T_M(long groupId, long classNameId,
3388                    long classPK, java.lang.String type, java.lang.String mode)
3389                    throws com.liferay.portal.kernel.exception.SystemException {
3390                    return getPersistence()
3391                                       .filterCountByG_C_C_T_M(groupId, classNameId, classPK, type,
3392                            mode);
3393            }
3394    
3395            /**
3396            * Caches the d d m template in the entity cache if it is enabled.
3397            *
3398            * @param ddmTemplate the d d m template
3399            */
3400            public static void cacheResult(
3401                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate) {
3402                    getPersistence().cacheResult(ddmTemplate);
3403            }
3404    
3405            /**
3406            * Caches the d d m templates in the entity cache if it is enabled.
3407            *
3408            * @param ddmTemplates the d d m templates
3409            */
3410            public static void cacheResult(
3411                    java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> ddmTemplates) {
3412                    getPersistence().cacheResult(ddmTemplates);
3413            }
3414    
3415            /**
3416            * Creates a new d d m template with the primary key. Does not add the d d m template to the database.
3417            *
3418            * @param templateId the primary key for the new d d m template
3419            * @return the new d d m template
3420            */
3421            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate create(
3422                    long templateId) {
3423                    return getPersistence().create(templateId);
3424            }
3425    
3426            /**
3427            * Removes the d d m template with the primary key from the database. Also notifies the appropriate model listeners.
3428            *
3429            * @param templateId the primary key of the d d m template
3430            * @return the d d m template that was removed
3431            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
3432            * @throws SystemException if a system exception occurred
3433            */
3434            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate remove(
3435                    long templateId)
3436                    throws com.liferay.portal.kernel.exception.SystemException,
3437                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
3438                    return getPersistence().remove(templateId);
3439            }
3440    
3441            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateImpl(
3442                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate)
3443                    throws com.liferay.portal.kernel.exception.SystemException {
3444                    return getPersistence().updateImpl(ddmTemplate);
3445            }
3446    
3447            /**
3448            * Returns the d d m template with the primary key or throws a {@link com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException} if it could not be found.
3449            *
3450            * @param templateId the primary key of the d d m template
3451            * @return the d d m template
3452            * @throws com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException if a d d m template with the primary key could not be found
3453            * @throws SystemException if a system exception occurred
3454            */
3455            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate findByPrimaryKey(
3456                    long templateId)
3457                    throws com.liferay.portal.kernel.exception.SystemException,
3458                            com.liferay.portlet.dynamicdatamapping.NoSuchTemplateException {
3459                    return getPersistence().findByPrimaryKey(templateId);
3460            }
3461    
3462            /**
3463            * Returns the d d m template with the primary key or returns <code>null</code> if it could not be found.
3464            *
3465            * @param templateId the primary key of the d d m template
3466            * @return the d d m template, or <code>null</code> if a d d m template with the primary key could not be found
3467            * @throws SystemException if a system exception occurred
3468            */
3469            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchByPrimaryKey(
3470                    long templateId)
3471                    throws com.liferay.portal.kernel.exception.SystemException {
3472                    return getPersistence().fetchByPrimaryKey(templateId);
3473            }
3474    
3475            /**
3476            * Returns all the d d m templates.
3477            *
3478            * @return the d d m templates
3479            * @throws SystemException if a system exception occurred
3480            */
3481            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findAll()
3482                    throws com.liferay.portal.kernel.exception.SystemException {
3483                    return getPersistence().findAll();
3484            }
3485    
3486            /**
3487            * Returns a range of all the d d m templates.
3488            *
3489            * <p>
3490            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
3491            * </p>
3492            *
3493            * @param start the lower bound of the range of d d m templates
3494            * @param end the upper bound of the range of d d m templates (not inclusive)
3495            * @return the range of d d m templates
3496            * @throws SystemException if a system exception occurred
3497            */
3498            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findAll(
3499                    int start, int end)
3500                    throws com.liferay.portal.kernel.exception.SystemException {
3501                    return getPersistence().findAll(start, end);
3502            }
3503    
3504            /**
3505            * Returns an ordered range of all the d d m templates.
3506            *
3507            * <p>
3508            * 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.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. 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.
3509            * </p>
3510            *
3511            * @param start the lower bound of the range of d d m templates
3512            * @param end the upper bound of the range of d d m templates (not inclusive)
3513            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3514            * @return the ordered range of d d m templates
3515            * @throws SystemException if a system exception occurred
3516            */
3517            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findAll(
3518                    int start, int end,
3519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
3520                    throws com.liferay.portal.kernel.exception.SystemException {
3521                    return getPersistence().findAll(start, end, orderByComparator);
3522            }
3523    
3524            /**
3525            * Removes all the d d m templates from the database.
3526            *
3527            * @throws SystemException if a system exception occurred
3528            */
3529            public static void removeAll()
3530                    throws com.liferay.portal.kernel.exception.SystemException {
3531                    getPersistence().removeAll();
3532            }
3533    
3534            /**
3535            * Returns the number of d d m templates.
3536            *
3537            * @return the number of d d m templates
3538            * @throws SystemException if a system exception occurred
3539            */
3540            public static int countAll()
3541                    throws com.liferay.portal.kernel.exception.SystemException {
3542                    return getPersistence().countAll();
3543            }
3544    
3545            public static DDMTemplatePersistence getPersistence() {
3546                    if (_persistence == null) {
3547                            _persistence = (DDMTemplatePersistence)PortalBeanLocatorUtil.locate(DDMTemplatePersistence.class.getName());
3548    
3549                            ReferenceRegistry.registerReference(DDMTemplateUtil.class,
3550                                    "_persistence");
3551                    }
3552    
3553                    return _persistence;
3554            }
3555    
3556            /**
3557             * @deprecated As of 6.2.0
3558             */
3559            public void setPersistence(DDMTemplatePersistence persistence) {
3560            }
3561    
3562            private static DDMTemplatePersistence _persistence;
3563    }