001    /**
002     * Copyright (c) 2000-present 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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DDMTemplate. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DDMTemplateLocalService
032     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateLocalServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDMTemplateLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the d d m template to the database. Also notifies the appropriate model listeners.
046            *
047            * @param ddmTemplate the d d m template
048            * @return the d d m template that was added
049            */
050            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addDDMTemplate(
051                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate) {
052                    return getService().addDDMTemplate(ddmTemplate);
053            }
054    
055            /**
056            * Adds a template.
057            *
058            * @param userId the primary key of the template's creator/owner
059            * @param groupId the primary key of the group
060            * @param classNameId the primary key of the class name for the template's
061            related model
062            * @param classPK the primary key of the template's related entity
063            * @param nameMap the template's locales and localized names
064            * @param descriptionMap the template's locales and localized descriptions
065            * @param type the template's type. For more information, see {@link
066            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
067            * @param mode the template's mode. For more information, see {@link
068            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
069            * @param language the template's script language. For more information,
070            see {@link
071            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
072            * @param script the template's script
073            * @param serviceContext the service context to be applied. Can set the
074            UUID, creation date, modification date, guest permissions, and
075            group permissions for the template.
076            * @return the template
077            * @throws PortalException if a portal exception occurred
078            */
079            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
080                    long userId, long groupId, long classNameId, long classPK,
081                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
082                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
083                    java.lang.String type, java.lang.String mode,
084                    java.lang.String language, java.lang.String script,
085                    com.liferay.portal.service.ServiceContext serviceContext)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService()
088                                       .addTemplate(userId, groupId, classNameId, classPK, nameMap,
089                            descriptionMap, type, mode, language, script, serviceContext);
090            }
091    
092            /**
093            * Adds a template with additional parameters.
094            *
095            * @param userId the primary key of the template's creator/owner
096            * @param groupId the primary key of the group
097            * @param classNameId the primary key of the class name for the template's
098            related model
099            * @param classPK the primary key of the template's related entity
100            * @param templateKey the unique string identifying the template
101            (optionally <code>null</code>)
102            * @param nameMap the template's locales and localized names
103            * @param descriptionMap the template's locales and localized descriptions
104            * @param type the template's type. For more information, see {@link
105            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
106            * @param mode the template's mode. For more information, see {@link
107            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
108            * @param language the template's script language. For more information,
109            see {@link
110            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
111            * @param script the template's script
112            * @param cacheable whether the template is cacheable
113            * @param smallImage whether the template has a small image
114            * @param smallImageURL the template's small image URL (optionally
115            <code>null</code>)
116            * @param smallImageFile the template's small image file (optionally
117            <code>null</code>)
118            * @param serviceContext the service context to be applied. Can set the
119            UUID, creation date, modification date, guest permissions, and
120            group permissions for the template.
121            * @return the template
122            * @throws PortalException if a portal exception occurred
123            */
124            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
125                    long userId, long groupId, long classNameId, long classPK,
126                    java.lang.String templateKey,
127                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
128                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
129                    java.lang.String type, java.lang.String mode,
130                    java.lang.String language, java.lang.String script, boolean cacheable,
131                    boolean smallImage, java.lang.String smallImageURL,
132                    java.io.File smallImageFile,
133                    com.liferay.portal.service.ServiceContext serviceContext)
134                    throws com.liferay.portal.kernel.exception.PortalException {
135                    return getService()
136                                       .addTemplate(userId, groupId, classNameId, classPK,
137                            templateKey, nameMap, descriptionMap, type, mode, language, script,
138                            cacheable, smallImage, smallImageURL, smallImageFile, serviceContext);
139            }
140    
141            /**
142            * Adds the resources to the template.
143            *
144            * @param template the template to add resources to
145            * @param addGroupPermissions whether to add group permissions
146            * @param addGuestPermissions whether to add guest permissions
147            * @throws PortalException if a portal exception occurred
148            */
149            public static void addTemplateResources(
150                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate template,
151                    boolean addGroupPermissions, boolean addGuestPermissions)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    getService()
154                            .addTemplateResources(template, addGroupPermissions,
155                            addGuestPermissions);
156            }
157    
158            /**
159            * Adds the model resources with the permissions to the template.
160            *
161            * @param template the template to add resources to
162            * @param groupPermissions the group permissions to be added
163            * @param guestPermissions the guest permissions to be added
164            * @throws PortalException if a portal exception occurred
165            */
166            public static void addTemplateResources(
167                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate template,
168                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
169                    throws com.liferay.portal.kernel.exception.PortalException {
170                    getService()
171                            .addTemplateResources(template, groupPermissions, guestPermissions);
172            }
173    
174            /**
175            * Copies the template, creating a new template with all the values
176            * extracted from the original one. This method supports defining a new name
177            * and description.
178            *
179            * @param userId the primary key of the template's creator/owner
180            * @param templateId the primary key of the template to be copied
181            * @param nameMap the new template's locales and localized names
182            * @param descriptionMap the new template's locales and localized
183            descriptions
184            * @param serviceContext the service context to be applied. Can set the
185            UUID, creation date, modification date, guest permissions, and
186            group permissions for the template.
187            * @return the new template
188            * @throws PortalException if a portal exception occurred
189            */
190            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
191                    long userId, long templateId,
192                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
193                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
194                    com.liferay.portal.service.ServiceContext serviceContext)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    return getService()
197                                       .copyTemplate(userId, templateId, nameMap, descriptionMap,
198                            serviceContext);
199            }
200    
201            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
202                    long userId, long templateId,
203                    com.liferay.portal.service.ServiceContext serviceContext)
204                    throws com.liferay.portal.kernel.exception.PortalException {
205                    return getService().copyTemplate(userId, templateId, serviceContext);
206            }
207    
208            /**
209            * Copies all the templates matching the class name ID, class PK, and type.
210            * This method creates new templates, extracting all the values from the old
211            * ones and updating their class PKs.
212            *
213            * @param userId the primary key of the template's creator/owner
214            * @param classNameId the primary key of the class name for the template's
215            related model
216            * @param oldClassPK the primary key of the old template's related entity
217            * @param newClassPK the primary key of the new template's related entity
218            * @param type the template's type. For more information, see {@link
219            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
220            * @param serviceContext the service context to be applied. Can set the
221            creation date, modification date, guest permissions, and group
222            permissions for the new templates.
223            * @return the new templates
224            * @throws PortalException if a portal exception occurred
225            */
226            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates(
227                    long userId, long classNameId, long oldClassPK, long newClassPK,
228                    java.lang.String type,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws com.liferay.portal.kernel.exception.PortalException {
231                    return getService()
232                                       .copyTemplates(userId, classNameId, oldClassPK, newClassPK,
233                            type, serviceContext);
234            }
235    
236            /**
237            * Creates a new d d m template with the primary key. Does not add the d d m template to the database.
238            *
239            * @param templateId the primary key for the new d d m template
240            * @return the new d d m template
241            */
242            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate createDDMTemplate(
243                    long templateId) {
244                    return getService().createDDMTemplate(templateId);
245            }
246    
247            /**
248            * Deletes the d d m template from the database. Also notifies the appropriate model listeners.
249            *
250            * @param ddmTemplate the d d m template
251            * @return the d d m template that was removed
252            */
253            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate deleteDDMTemplate(
254                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate) {
255                    return getService().deleteDDMTemplate(ddmTemplate);
256            }
257    
258            /**
259            * Deletes the d d m template with the primary key from the database. Also notifies the appropriate model listeners.
260            *
261            * @param templateId the primary key of the d d m template
262            * @return the d d m template that was removed
263            * @throws PortalException if a d d m template with the primary key could not be found
264            */
265            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate deleteDDMTemplate(
266                    long templateId)
267                    throws com.liferay.portal.kernel.exception.PortalException {
268                    return getService().deleteDDMTemplate(templateId);
269            }
270    
271            /**
272            * @throws PortalException
273            */
274            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
275                    com.liferay.portal.model.PersistedModel persistedModel)
276                    throws com.liferay.portal.kernel.exception.PortalException {
277                    return getService().deletePersistedModel(persistedModel);
278            }
279    
280            /**
281            * Deletes the template and its resources.
282            *
283            * @param template the template to be deleted
284            * @throws PortalException if a portal exception occurred
285            */
286            public static void deleteTemplate(
287                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate template)
288                    throws com.liferay.portal.kernel.exception.PortalException {
289                    getService().deleteTemplate(template);
290            }
291    
292            /**
293            * Deletes the template and its resources.
294            *
295            * @param templateId the primary key of the template to be deleted
296            * @throws PortalException if a portal exception occurred
297            */
298            public static void deleteTemplate(long templateId)
299                    throws com.liferay.portal.kernel.exception.PortalException {
300                    getService().deleteTemplate(templateId);
301            }
302    
303            /**
304            * Deletes all the templates of the group.
305            *
306            * @param groupId the primary key of the group
307            * @throws PortalException if a portal exception occurred
308            */
309            public static void deleteTemplates(long groupId)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    getService().deleteTemplates(groupId);
312            }
313    
314            public static void deleteTemplates(long groupId, long classNameId)
315                    throws com.liferay.portal.kernel.exception.PortalException {
316                    getService().deleteTemplates(groupId, classNameId);
317            }
318    
319            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
320                    return getService().dynamicQuery();
321            }
322    
323            /**
324            * Performs a dynamic query on the database and returns the matching rows.
325            *
326            * @param dynamicQuery the dynamic query
327            * @return the matching rows
328            */
329            public static <T> java.util.List<T> dynamicQuery(
330                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
331                    return getService().dynamicQuery(dynamicQuery);
332            }
333    
334            /**
335            * Performs a dynamic query on the database and returns a range of the matching rows.
336            *
337            * <p>
338            * 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.
339            * </p>
340            *
341            * @param dynamicQuery the dynamic query
342            * @param start the lower bound of the range of model instances
343            * @param end the upper bound of the range of model instances (not inclusive)
344            * @return the range of matching rows
345            */
346            public static <T> java.util.List<T> dynamicQuery(
347                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
348                    int end) {
349                    return getService().dynamicQuery(dynamicQuery, start, end);
350            }
351    
352            /**
353            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
354            *
355            * <p>
356            * 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.
357            * </p>
358            *
359            * @param dynamicQuery the dynamic query
360            * @param start the lower bound of the range of model instances
361            * @param end the upper bound of the range of model instances (not inclusive)
362            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
363            * @return the ordered range of matching rows
364            */
365            public static <T> java.util.List<T> dynamicQuery(
366                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
367                    int end,
368                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
369                    return getService()
370                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
371            }
372    
373            /**
374            * Returns the number of rows matching the dynamic query.
375            *
376            * @param dynamicQuery the dynamic query
377            * @return the number of rows matching the dynamic query
378            */
379            public static long dynamicQueryCount(
380                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
381                    return getService().dynamicQueryCount(dynamicQuery);
382            }
383    
384            /**
385            * Returns the number of rows matching the dynamic query.
386            *
387            * @param dynamicQuery the dynamic query
388            * @param projection the projection to apply to the query
389            * @return the number of rows matching the dynamic query
390            */
391            public static long dynamicQueryCount(
392                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
393                    com.liferay.portal.kernel.dao.orm.Projection projection) {
394                    return getService().dynamicQueryCount(dynamicQuery, projection);
395            }
396    
397            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchDDMTemplate(
398                    long templateId) {
399                    return getService().fetchDDMTemplate(templateId);
400            }
401    
402            /**
403            * Returns the d d m template matching the UUID and group.
404            *
405            * @param uuid the d d m template's UUID
406            * @param groupId the primary key of the group
407            * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found
408            */
409            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchDDMTemplateByUuidAndGroupId(
410                    java.lang.String uuid, long groupId) {
411                    return getService().fetchDDMTemplateByUuidAndGroupId(uuid, groupId);
412            }
413    
414            /**
415            * Returns the template matching the group and template key.
416            *
417            * @param groupId the primary key of the group
418            * @param classNameId the primary key of the class name for the template's
419            related model
420            * @param templateKey the unique string identifying the template
421            * @return the matching template, or <code>null</code> if a matching
422            template could not be found
423            */
424            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate(
425                    long groupId, long classNameId, java.lang.String templateKey) {
426                    return getService().fetchTemplate(groupId, classNameId, templateKey);
427            }
428    
429            /**
430            * Returns the template matching the group and template key, optionally
431            * searching ancestor sites (that have sharing enabled) and global scoped
432            * sites.
433            *
434            * <p>
435            * This method first searches in the given group. If the template is still
436            * not found and <code>includeAncestorTemplates</code> is set to
437            * <code>true</code>, this method searches the group's ancestor sites (that
438            * have sharing enabled) and lastly searches global scoped sites.
439            * </p>
440            *
441            * @param groupId the primary key of the group
442            * @param classNameId the primary key of the class name for the template's
443            related model
444            * @param templateKey the unique string identifying the template
445            * @param includeAncestorTemplates whether to include ancestor sites (that
446            have sharing enabled) and include global scoped sites in the
447            search in the search
448            * @return the matching template, or <code>null</code> if a matching
449            template could not be found
450            * @throws PortalException if a portal exception occurred
451            */
452            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate(
453                    long groupId, long classNameId, java.lang.String templateKey,
454                    boolean includeAncestorTemplates)
455                    throws com.liferay.portal.kernel.exception.PortalException {
456                    return getService()
457                                       .fetchTemplate(groupId, classNameId, templateKey,
458                            includeAncestorTemplates);
459            }
460    
461            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
462                    return getService().getActionableDynamicQuery();
463            }
464    
465            /**
466            * Returns the Spring bean ID for this bean.
467            *
468            * @return the Spring bean ID for this bean
469            */
470            public static java.lang.String getBeanIdentifier() {
471                    return getService().getBeanIdentifier();
472            }
473    
474            /**
475            * Returns the d d m template with the primary key.
476            *
477            * @param templateId the primary key of the d d m template
478            * @return the d d m template
479            * @throws PortalException if a d d m template with the primary key could not be found
480            */
481            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getDDMTemplate(
482                    long templateId)
483                    throws com.liferay.portal.kernel.exception.PortalException {
484                    return getService().getDDMTemplate(templateId);
485            }
486    
487            /**
488            * Returns the d d m template matching the UUID and group.
489            *
490            * @param uuid the d d m template's UUID
491            * @param groupId the primary key of the group
492            * @return the matching d d m template
493            * @throws PortalException if a matching d d m template could not be found
494            */
495            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getDDMTemplateByUuidAndGroupId(
496                    java.lang.String uuid, long groupId)
497                    throws com.liferay.portal.kernel.exception.PortalException {
498                    return getService().getDDMTemplateByUuidAndGroupId(uuid, groupId);
499            }
500    
501            /**
502            * Returns a range of all the d d m templates.
503            *
504            * <p>
505            * 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.
506            * </p>
507            *
508            * @param start the lower bound of the range of d d m templates
509            * @param end the upper bound of the range of d d m templates (not inclusive)
510            * @return the range of d d m templates
511            */
512            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplates(
513                    int start, int end) {
514                    return getService().getDDMTemplates(start, end);
515            }
516    
517            /**
518            * Returns all the d d m templates matching the UUID and company.
519            *
520            * @param uuid the UUID of the d d m templates
521            * @param companyId the primary key of the company
522            * @return the matching d d m templates, or an empty list if no matches were found
523            */
524            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplatesByUuidAndCompanyId(
525                    java.lang.String uuid, long companyId) {
526                    return getService().getDDMTemplatesByUuidAndCompanyId(uuid, companyId);
527            }
528    
529            /**
530            * Returns a range of d d m templates matching the UUID and company.
531            *
532            * @param uuid the UUID of the d d m templates
533            * @param companyId the primary key of the company
534            * @param start the lower bound of the range of d d m templates
535            * @param end the upper bound of the range of d d m templates (not inclusive)
536            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
537            * @return the range of matching d d m templates, or an empty list if no matches were found
538            */
539            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplatesByUuidAndCompanyId(
540                    java.lang.String uuid, long companyId, int start, int end,
541                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
542                    return getService()
543                                       .getDDMTemplatesByUuidAndCompanyId(uuid, companyId, start,
544                            end, orderByComparator);
545            }
546    
547            /**
548            * Returns the number of d d m templates.
549            *
550            * @return the number of d d m templates
551            */
552            public static int getDDMTemplatesCount() {
553                    return getService().getDDMTemplatesCount();
554            }
555    
556            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
557                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
558                    return getService().getExportActionableDynamicQuery(portletDataContext);
559            }
560    
561            public static com.liferay.portal.model.PersistedModel getPersistedModel(
562                    java.io.Serializable primaryKeyObj)
563                    throws com.liferay.portal.kernel.exception.PortalException {
564                    return getService().getPersistedModel(primaryKeyObj);
565            }
566    
567            /**
568            * Returns the template matching the group and template key.
569            *
570            * @param groupId the primary key of the group
571            * @param classNameId the primary key of the class name for the template's
572            related model
573            * @param templateKey the unique string identifying the template
574            * @return the matching template
575            * @throws PortalException if a matching template could not be found
576            */
577            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
578                    long groupId, long classNameId, java.lang.String templateKey)
579                    throws com.liferay.portal.kernel.exception.PortalException {
580                    return getService().getTemplate(groupId, classNameId, templateKey);
581            }
582    
583            /**
584            * Returns the template matching the group and template key, optionally
585            * searching ancestor sites (that have sharing enabled) and global scoped
586            * sites.
587            *
588            * <p>
589            * This method first searches in the group. If the template is still not
590            * found and <code>includeAncestorTemplates</code> is set to
591            * <code>true</code>, this method searches the group's ancestor sites (that
592            * have sharing enabled) and lastly searches global scoped sites.
593            * </p>
594            *
595            * @param groupId the primary key of the group
596            * @param classNameId the primary key of the class name for the template's
597            related model
598            * @param templateKey the unique string identifying the template
599            * @param includeAncestorTemplates whether to include ancestor sites (that
600            have sharing enabled) and include global scoped sites in the
601            search in the search
602            * @return the matching template
603            * @throws PortalException if a matching template could not be found
604            */
605            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
606                    long groupId, long classNameId, java.lang.String templateKey,
607                    boolean includeAncestorTemplates)
608                    throws com.liferay.portal.kernel.exception.PortalException {
609                    return getService()
610                                       .getTemplate(groupId, classNameId, templateKey,
611                            includeAncestorTemplates);
612            }
613    
614            /**
615            * Returns the template with the ID.
616            *
617            * @param templateId the primary key of the template
618            * @return the template with the ID
619            * @throws PortalException if a matching template could not be found
620            */
621            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
622                    long templateId)
623                    throws com.liferay.portal.kernel.exception.PortalException {
624                    return getService().getTemplate(templateId);
625            }
626    
627            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplateBySmallImageId(
628                    long smallImageId)
629                    throws com.liferay.portal.kernel.exception.PortalException {
630                    return getService().getTemplateBySmallImageId(smallImageId);
631            }
632    
633            /**
634            * Returns all the templates with the class PK.
635            *
636            * @param classPK the primary key of the template's related entity
637            * @return the templates with the class PK
638            */
639            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
640                    long classPK) {
641                    return getService().getTemplates(classPK);
642            }
643    
644            /**
645            * Returns all the templates matching the group and class name ID.
646            *
647            * @param groupId the primary key of the group
648            * @param classNameId the primary key of the class name for the template's
649            related model
650            * @return the matching templates
651            */
652            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
653                    long groupId, long classNameId) {
654                    return getService().getTemplates(groupId, classNameId);
655            }
656    
657            /**
658            * Returns all the templates matching the group, class name ID, and class
659            * PK.
660            *
661            * @param groupId the primary key of the group
662            * @param classNameId the primary key of the class name for the template's
663            related model
664            * @param classPK the primary key of the template's related entity
665            * @return the matching templates
666            */
667            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
668                    long groupId, long classNameId, long classPK) {
669                    return getService().getTemplates(groupId, classNameId, classPK);
670            }
671    
672            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
673                    long groupId, long classNameId, long classPK,
674                    boolean includeAncestorTemplates)
675                    throws com.liferay.portal.kernel.exception.PortalException {
676                    return getService()
677                                       .getTemplates(groupId, classNameId, classPK,
678                            includeAncestorTemplates);
679            }
680    
681            /**
682            * Returns all the templates matching the group, class name ID, class PK,
683            * and type.
684            *
685            * @param groupId the primary key of the group
686            * @param classNameId the primary key of the class name for the template's
687            related model
688            * @param classPK the primary key of the template's related entity
689            * @param type the template's type. For more information, see {@link
690            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
691            * @return the matching templates
692            */
693            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
694                    long groupId, long classNameId, long classPK, java.lang.String type) {
695                    return getService().getTemplates(groupId, classNameId, classPK, type);
696            }
697    
698            /**
699            * Returns all the templates matching the group, class name ID, class PK,
700            * type, and mode.
701            *
702            * @param groupId the primary key of the group
703            * @param classNameId the primary key of the class name for the template's
704            related model
705            * @param classPK the primary key of the template's related entity
706            * @param type the template's type. For more information, see {@link
707            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
708            * @param mode the template's mode. For more information, see {@link
709            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
710            * @return the matching templates
711            */
712            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
713                    long groupId, long classNameId, long classPK, java.lang.String type,
714                    java.lang.String mode) {
715                    return getService()
716                                       .getTemplates(groupId, classNameId, classPK, type, mode);
717            }
718    
719            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
720                    long[] groupIds, long classNameId, long classPK) {
721                    return getService().getTemplates(groupIds, classNameId, classPK);
722            }
723    
724            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK(
725                    long groupId, long classPK) {
726                    return getService().getTemplatesByClassPK(groupId, classPK);
727            }
728    
729            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK(
730                    long groupId, long classPK, int start, int end) {
731                    return getService().getTemplatesByClassPK(groupId, classPK, start, end);
732            }
733    
734            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK(
735                    long[] groupIds, long classPK) {
736                    return getService().getTemplatesByClassPK(groupIds, classPK);
737            }
738    
739            /**
740            * Returns the number of templates matching the group and class PK.
741            *
742            * @param groupId the primary key of the group
743            * @param classPK the primary key of the template's related entity
744            * @return the number of templates belonging to the group and class PK
745            */
746            public static int getTemplatesByClassPKCount(long groupId, long classPK) {
747                    return getService().getTemplatesByClassPKCount(groupId, classPK);
748            }
749    
750            /**
751            * Returns an ordered range of all the templates matching the group and
752            * structure class name ID.
753            *
754            * <p>
755            * Useful when paginating results. Returns a maximum of <code>end -
756            * start</code> instances. <code>start</code> and <code>end</code> are not
757            * primary keys, they are indexes in the result set. Thus, <code>0</code>
758            * refers to the first result in the set. Setting both <code>start</code>
759            * and <code>end</code> to {@link
760            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
761            * result set.
762            * </p>
763            *
764            * @param groupId the primary key of the group
765            * @param structureClassNameId the primary key of the class name for the
766            template's related structure
767            * @param start the lower bound of the range of templates to return
768            * @param end the upper bound of the range of templates to return (not
769            inclusive)
770            * @param orderByComparator the comparator to order the templates
771            (optionally <code>null</code>)
772            * @return the range of matching templates ordered by the comparator
773            */
774            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByStructureClassNameId(
775                    long groupId, long structureClassNameId, int start, int end,
776                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
777                    return getService()
778                                       .getTemplatesByStructureClassNameId(groupId,
779                            structureClassNameId, start, end, orderByComparator);
780            }
781    
782            /**
783            * Returns the number of templates matching the group and structure class
784            * name ID, including Generic Templates.
785            *
786            * @param groupId the primary key of the group
787            * @param structureClassNameId the primary key of the class name for the
788            template's related structure
789            * @return the number of matching templates
790            */
791            public static int getTemplatesByStructureClassNameIdCount(long groupId,
792                    long structureClassNameId) {
793                    return getService()
794                                       .getTemplatesByStructureClassNameIdCount(groupId,
795                            structureClassNameId);
796            }
797    
798            /**
799            * Returns the number of templates belonging to the group.
800            *
801            * @param groupId the primary key of the group
802            * @return the number of templates belonging to the group
803            */
804            public static int getTemplatesCount(long groupId) {
805                    return getService().getTemplatesCount(groupId);
806            }
807    
808            /**
809            * Returns the number of templates matching the group and class name ID.
810            *
811            * @param groupId the primary key of the group
812            * @param classNameId the primary key of the class name for the template's
813            related model
814            * @return the number of matching templates
815            */
816            public static int getTemplatesCount(long groupId, long classNameId) {
817                    return getService().getTemplatesCount(groupId, classNameId);
818            }
819    
820            /**
821            * Returns the number of templates matching the group, class name ID, and
822            * class PK.
823            *
824            * @param groupId the primary key of the group
825            * @param classNameId the primary key of the class name for the template's
826            related model
827            * @param classPK the primary key of the template's related entity
828            * @return the number of matching templates
829            */
830            public static int getTemplatesCount(long groupId, long classNameId,
831                    long classPK) {
832                    return getService().getTemplatesCount(groupId, classNameId, classPK);
833            }
834    
835            /**
836            * Returns an ordered range of all the templates matching the group, class
837            * name ID, class PK, type, and mode, and matching the keywords in the
838            * template names and descriptions.
839            *
840            * <p>
841            * Useful when paginating results. Returns a maximum of <code>end -
842            * start</code> instances. <code>start</code> and <code>end</code> are not
843            * primary keys, they are indexes in the result set. Thus, <code>0</code>
844            * refers to the first result in the set. Setting both <code>start</code>
845            * and <code>end</code> to {@link
846            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
847            * result set.
848            * </p>
849            *
850            * @param companyId the primary key of the template's company
851            * @param groupId the primary key of the group
852            * @param classNameId the primary key of the class name for the template's
853            related model
854            * @param classPK the primary key of the template's related entity
855            * @param keywords the keywords (space separated), which may occur in the
856            template's name or description (optionally <code>null</code>)
857            * @param type the template's type (optionally <code>null</code>). For more
858            information, see {@link
859            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
860            * @param mode the template's mode (optionally <code>null</code>). For more
861            information, see {@link
862            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
863            * @param start the lower bound of the range of templates to return
864            * @param end the upper bound of the range of templates to return (not
865            inclusive)
866            * @param orderByComparator the comparator to order the templates
867            (optionally <code>null</code>)
868            * @return the range of matching templates ordered by the comparator
869            */
870            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
871                    long companyId, long groupId, long classNameId, long classPK,
872                    java.lang.String keywords, java.lang.String type,
873                    java.lang.String mode, int start, int end,
874                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
875                    return getService()
876                                       .search(companyId, groupId, classNameId, classPK, keywords,
877                            type, mode, start, end, orderByComparator);
878            }
879    
880            /**
881            * Returns an ordered range of all the templates matching the group, class
882            * name ID, class PK, name keyword, description keyword, type, mode, and
883            * language.
884            *
885            * <p>
886            * Useful when paginating results. Returns a maximum of <code>end -
887            * start</code> instances. <code>start</code> and <code>end</code> are not
888            * primary keys, they are indexes in the result set. Thus, <code>0</code>
889            * refers to the first result in the set. Setting both <code>start</code>
890            * and <code>end</code> to {@link
891            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
892            * result set.
893            * </p>
894            *
895            * @param companyId the primary key of the template's company
896            * @param groupId the primary key of the group
897            * @param classNameId the primary key of the class name for the template's
898            related model
899            * @param classPK the primary key of the template's related entity
900            * @param name the name keywords (optionally <code>null</code>)
901            * @param description the description keywords (optionally
902            <code>null</code>)
903            * @param type the template's type (optionally <code>null</code>). For more
904            information, see {@link
905            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
906            * @param mode the template's mode (optionally <code>null</code>). For more
907            information, see {@link
908            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
909            * @param language the template's script language (optionally
910            <code>null</code>). For more information, see {@link
911            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
912            * @param andOperator whether every field must match its keywords, or just
913            one field
914            * @param start the lower bound of the range of templates to return
915            * @param end the upper bound of the range of templates to return (not
916            inclusive)
917            * @param orderByComparator the comparator to order the templates
918            (optionally <code>null</code>)
919            * @return the range of matching templates ordered by the comparator
920            */
921            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
922                    long companyId, long groupId, long classNameId, long classPK,
923                    java.lang.String name, java.lang.String description,
924                    java.lang.String type, java.lang.String mode,
925                    java.lang.String language, boolean andOperator, int start, int end,
926                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
927                    return getService()
928                                       .search(companyId, groupId, classNameId, classPK, name,
929                            description, type, mode, language, andOperator, start, end,
930                            orderByComparator);
931            }
932    
933            /**
934            * Returns an ordered range of all the templates matching the group IDs,
935            * class Name IDs, class PK, type, and mode, and include the keywords on its
936            * names and descriptions.
937            *
938            * <p>
939            * Useful when paginating results. Returns a maximum of <code>end -
940            * start</code> instances. <code>start</code> and <code>end</code> are not
941            * primary keys, they are indexes in the result set. Thus, <code>0</code>
942            * refers to the first result in the set. Setting both <code>start</code>
943            * and <code>end</code> to {@link
944            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
945            * result set.
946            * </p>
947            *
948            * @param companyId the primary key of the template's company
949            * @param groupIds the primary keys of the groups
950            * @param classNameIds the primary keys of the entity's instances the
951            templates are related to
952            * @param classPKs the primary keys of the template's related entities
953            * @param keywords the keywords (space separated), which may occur in the
954            template's name or description (optionally <code>null</code>)
955            * @param type the template's type (optionally <code>null</code>). For more
956            information, see {@link
957            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
958            * @param mode the template's mode (optionally <code>null</code>). For more
959            information, see {@link
960            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
961            * @param start the lower bound of the range of templates to return
962            * @param end the upper bound of the range of templates to return (not
963            inclusive)
964            * @param orderByComparator the comparator to order the templates
965            (optionally <code>null</code>)
966            * @return the range of matching templates ordered by the comparator
967            */
968            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
969                    long companyId, long[] groupIds, long[] classNameIds, long[] classPKs,
970                    java.lang.String keywords, java.lang.String type,
971                    java.lang.String mode, int start, int end,
972                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
973                    return getService()
974                                       .search(companyId, groupIds, classNameIds, classPKs,
975                            keywords, type, mode, start, end, orderByComparator);
976            }
977    
978            /**
979            * Returns an ordered range of all the templates matching the group IDs,
980            * class name IDs, class PK, name keyword, description keyword, type, mode,
981            * and language.
982            *
983            * <p>
984            * Useful when paginating results. Returns a maximum of <code>end -
985            * start</code> instances. <code>start</code> and <code>end</code> are not
986            * primary keys, they are indexes in the result set. Thus, <code>0</code>
987            * refers to the first result in the set. Setting both <code>start</code>
988            * and <code>end</code> to {@link
989            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
990            * result set.
991            * </p>
992            *
993            * @param companyId the primary key of the template's company
994            * @param groupIds the primary keys of the groups
995            * @param classNameIds the primary keys of the entity's instances the
996            templates are related to
997            * @param classPKs the primary keys of the template's related entities
998            * @param name the name keywords (optionally <code>null</code>)
999            * @param description the description keywords (optionally
1000            <code>null</code>)
1001            * @param type the template's type (optionally <code>null</code>). For more
1002            information, see {@link
1003            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1004            * @param mode the template's mode (optionally <code>null</code>). For more
1005            information, see {@link
1006            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1007            * @param language the template's script language (optionally
1008            <code>null</code>). For more information, see {@link
1009            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1010            * @param andOperator whether every field must match its keywords, or just
1011            one field.
1012            * @param start the lower bound of the range of templates to return
1013            * @param end the upper bound of the range of templates to return (not
1014            inclusive)
1015            * @param orderByComparator the comparator to order the templates
1016            (optionally <code>null</code>)
1017            * @return the range of matching templates ordered by the comparator
1018            */
1019            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
1020                    long companyId, long[] groupIds, long[] classNameIds, long[] classPKs,
1021                    java.lang.String name, java.lang.String description,
1022                    java.lang.String type, java.lang.String mode,
1023                    java.lang.String language, boolean andOperator, int start, int end,
1024                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
1025                    return getService()
1026                                       .search(companyId, groupIds, classNameIds, classPKs, name,
1027                            description, type, mode, language, andOperator, start, end,
1028                            orderByComparator);
1029            }
1030    
1031            /**
1032            * Returns the number of templates matching the group, class name ID, class
1033            * PK, type, and matching the keywords in the template names and
1034            * descriptions.
1035            *
1036            * @param companyId the primary key of the template's company
1037            * @param groupId the primary key of the group
1038            * @param classNameId the primary key of the class name for the template's
1039            related model
1040            * @param classPK the primary key of the template's related entity
1041            * @param keywords the keywords (space separated), which may occur in the
1042            template's name or description (optionally <code>null</code>)
1043            * @param type the template's type (optionally <code>null</code>). For more
1044            information, see {@link
1045            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1046            * @param mode the template's mode (optionally <code>null</code>). For more
1047            information, see {@link
1048            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1049            * @return the number of matching templates
1050            */
1051            public static int searchCount(long companyId, long groupId,
1052                    long classNameId, long classPK, java.lang.String keywords,
1053                    java.lang.String type, java.lang.String mode) {
1054                    return getService()
1055                                       .searchCount(companyId, groupId, classNameId, classPK,
1056                            keywords, type, mode);
1057            }
1058    
1059            /**
1060            * Returns the number of templates matching the group, class name ID, class
1061            * PK, name keyword, description keyword, type, mode, and language.
1062            *
1063            * @param companyId the primary key of the template's company
1064            * @param groupId the primary key of the group
1065            * @param classNameId the primary key of the class name for the template's
1066            related model
1067            * @param classPK the primary key of the template's related entity
1068            * @param name the name keywords (optionally <code>null</code>)
1069            * @param description the description keywords (optionally
1070            <code>null</code>)
1071            * @param type the template's type (optionally <code>null</code>). For more
1072            information, see {@link
1073            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1074            * @param mode the template's mode (optionally <code>null</code>). For more
1075            information, see {@link
1076            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1077            * @param language the template's script language (optionally
1078            <code>null</code>). For more information, see {@link
1079            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1080            * @param andOperator whether every field must match its keywords, or just
1081            one field.
1082            * @return the number of matching templates
1083            */
1084            public static int searchCount(long companyId, long groupId,
1085                    long classNameId, long classPK, java.lang.String name,
1086                    java.lang.String description, java.lang.String type,
1087                    java.lang.String mode, java.lang.String language, boolean andOperator) {
1088                    return getService()
1089                                       .searchCount(companyId, groupId, classNameId, classPK, name,
1090                            description, type, mode, language, andOperator);
1091            }
1092    
1093            /**
1094            * Returns the number of templates matching the group IDs, class name IDs,
1095            * class PK, type, and mode, and matching the keywords in the template names
1096            * and descriptions.
1097            *
1098            * @param companyId the primary key of the template's company
1099            * @param groupIds the primary keys of the groups
1100            * @param classNameIds the primary keys of the entity's instance the
1101            templates are related to
1102            * @param classPKs the primary keys of the template's related entities
1103            * @param keywords the keywords (space separated), which may occur in the
1104            template's name or description (optionally <code>null</code>)
1105            * @param type the template's type (optionally <code>null</code>). For more
1106            information, see {@link
1107            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1108            * @param mode the template's mode (optionally <code>null</code>). For more
1109            information, see {@link
1110            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1111            * @return the number of matching templates
1112            */
1113            public static int searchCount(long companyId, long[] groupIds,
1114                    long[] classNameIds, long[] classPKs, java.lang.String keywords,
1115                    java.lang.String type, java.lang.String mode) {
1116                    return getService()
1117                                       .searchCount(companyId, groupIds, classNameIds, classPKs,
1118                            keywords, type, mode);
1119            }
1120    
1121            /**
1122            * Returns the number of templates matching the group IDs, class name IDs,
1123            * class PKs, name keyword, description keyword, type, mode, and language.
1124            *
1125            * @param companyId the primary key of the templates company
1126            * @param groupIds the primary keys of the groups
1127            * @param classNameIds the primary keys of the entity's instance the
1128            templates are related to
1129            * @param classPKs the primary keys of the template's related entities
1130            * @param name the name keywords (optionally <code>null</code>)
1131            * @param description the description keywords (optionally
1132            <code>null</code>)
1133            * @param type the template's type (optionally <code>null</code>). For more
1134            information, see {@link
1135            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1136            * @param mode the template's mode (optionally <code>null</code>). For more
1137            information, see {@link
1138            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1139            * @param language the template's script language (optionally
1140            <code>null</code>). For more information, see {@link
1141            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1142            * @param andOperator whether every field must match its keywords, or just
1143            one field.
1144            * @return the number of matching templates
1145            */
1146            public static int searchCount(long companyId, long[] groupIds,
1147                    long[] classNameIds, long[] classPKs, java.lang.String name,
1148                    java.lang.String description, java.lang.String type,
1149                    java.lang.String mode, java.lang.String language, boolean andOperator) {
1150                    return getService()
1151                                       .searchCount(companyId, groupIds, classNameIds, classPKs,
1152                            name, description, type, mode, language, andOperator);
1153            }
1154    
1155            /**
1156            * Sets the Spring bean ID for this bean.
1157            *
1158            * @param beanIdentifier the Spring bean ID for this bean
1159            */
1160            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
1161                    getService().setBeanIdentifier(beanIdentifier);
1162            }
1163    
1164            /**
1165            * Updates the d d m template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1166            *
1167            * @param ddmTemplate the d d m template
1168            * @return the d d m template that was updated
1169            */
1170            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateDDMTemplate(
1171                    com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate) {
1172                    return getService().updateDDMTemplate(ddmTemplate);
1173            }
1174    
1175            /**
1176            * Updates the template matching the ID.
1177            *
1178            * @param templateId the primary key of the template
1179            * @param classPK the primary key of the template's related entity
1180            * @param nameMap the template's new locales and localized names
1181            * @param descriptionMap the template's new locales and localized
1182            description
1183            * @param type the template's type. For more information, see {@link
1184            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1185            * @param mode the template's mode. For more information, see {@link
1186            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1187            * @param language the template's script language. For more information,
1188            see {@link
1189            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1190            * @param script the template's script
1191            * @param cacheable whether the template is cacheable
1192            * @param serviceContext the service context to be applied. Can set the
1193            modification date.
1194            * @return the updated template
1195            * @throws PortalException if a portal exception occurred
1196            */
1197            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
1198                    long templateId, long classPK,
1199                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1200                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1201                    java.lang.String type, java.lang.String mode,
1202                    java.lang.String language, java.lang.String script, boolean cacheable,
1203                    com.liferay.portal.service.ServiceContext serviceContext)
1204                    throws com.liferay.portal.kernel.exception.PortalException {
1205                    return getService()
1206                                       .updateTemplate(templateId, classPK, nameMap,
1207                            descriptionMap, type, mode, language, script, cacheable,
1208                            serviceContext);
1209            }
1210    
1211            /**
1212            * Updates the template matching the ID.
1213            *
1214            * @param templateId the primary key of the template
1215            * @param classPK the primary key of the template's related entity
1216            * @param nameMap the template's new locales and localized names
1217            * @param descriptionMap the template's new locales and localized
1218            description
1219            * @param type the template's type. For more information, see {@link
1220            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1221            * @param mode the template's mode. For more information, see {@link
1222            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1223            * @param language the template's script language. For more information,
1224            see {@link
1225            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
1226            * @param script the template's script
1227            * @param cacheable whether the template is cacheable
1228            * @param smallImage whether the template has a small image
1229            * @param smallImageURL the template's small image URL (optionally
1230            <code>null</code>)
1231            * @param smallImageFile the template's small image file (optionally
1232            <code>null</code>)
1233            * @param serviceContext the service context to be applied. Can set the
1234            modification date.
1235            * @return the updated template
1236            * @throws PortalException if a portal exception occurred
1237            */
1238            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
1239                    long templateId, long classPK,
1240                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1241                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1242                    java.lang.String type, java.lang.String mode,
1243                    java.lang.String language, java.lang.String script, boolean cacheable,
1244                    boolean smallImage, java.lang.String smallImageURL,
1245                    java.io.File smallImageFile,
1246                    com.liferay.portal.service.ServiceContext serviceContext)
1247                    throws com.liferay.portal.kernel.exception.PortalException {
1248                    return getService()
1249                                       .updateTemplate(templateId, classPK, nameMap,
1250                            descriptionMap, type, mode, language, script, cacheable,
1251                            smallImage, smallImageURL, smallImageFile, serviceContext);
1252            }
1253    
1254            public static DDMTemplateLocalService getService() {
1255                    if (_service == null) {
1256                            _service = (DDMTemplateLocalService)PortalBeanLocatorUtil.locate(DDMTemplateLocalService.class.getName());
1257    
1258                            ReferenceRegistry.registerReference(DDMTemplateLocalServiceUtil.class,
1259                                    "_service");
1260                    }
1261    
1262                    return _service;
1263            }
1264    
1265            /**
1266             * @deprecated As of 6.2.0
1267             */
1268            @Deprecated
1269            public void setService(DDMTemplateLocalService service) {
1270            }
1271    
1272            private static DDMTemplateLocalService _service;
1273    }