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.service.ServiceWrapper;
020    
021    /**
022     * Provides a wrapper for {@link DDMTemplateService}.
023     *
024     * @author Brian Wing Shun Chan
025     * @see DDMTemplateService
026     * @generated
027     */
028    @ProviderType
029    public class DDMTemplateServiceWrapper implements DDMTemplateService,
030            ServiceWrapper<DDMTemplateService> {
031            public DDMTemplateServiceWrapper(DDMTemplateService ddmTemplateService) {
032                    _ddmTemplateService = ddmTemplateService;
033            }
034    
035            /**
036            * Adds a template.
037            *
038            * @param groupId the primary key of the group
039            * @param classNameId the primary key of the class name for template's
040            related model
041            * @param classPK the primary key of the template's related entity
042            * @param resourceClassNameId the primary key of the class name for
043            template's resource model
044            * @param nameMap the template's locales and localized names
045            * @param descriptionMap the template's locales and localized descriptions
046            * @param type the template's type. For more information, see {@link
047            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
048            * @param mode the template's mode. For more information, see {@link
049            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
050            * @param language the template's script language. For more information,
051            see {@link
052            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
053            * @param script the template's script
054            * @param serviceContext the service context to be applied. Must have the
055            <code>ddmResource</code> attribute to check permissions. Can set
056            the UUID, creation date, modification date, guest permissions,
057            and group permissions for the template.
058            * @return the template
059            * @throws PortalException if the user did not have permission to add the
060            template or if a portal exception occurred
061            */
062            @Override
063            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
064                    long groupId, long classNameId, long classPK, long resourceClassNameId,
065                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
066                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
067                    java.lang.String type, java.lang.String mode,
068                    java.lang.String language, java.lang.String script,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws com.liferay.portal.kernel.exception.PortalException {
071                    return _ddmTemplateService.addTemplate(groupId, classNameId, classPK,
072                            resourceClassNameId, nameMap, descriptionMap, type, mode, language,
073                            script, serviceContext);
074            }
075    
076            /**
077            * Adds a template with additional parameters.
078            *
079            * @param groupId the primary key of the group
080            * @param classNameId the primary key of the class name for template's
081            related model
082            * @param classPK the primary key of the template's related entity
083            * @param resourceClassNameId the primary key of the class name for
084            template's resource model
085            * @param templateKey the unique string identifying the template
086            (optionally <code>null</code>)
087            * @param nameMap the template's locales and localized names
088            * @param descriptionMap the template's locales and localized descriptions
089            * @param type the template's type. For more information, see {@link
090            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
091            * @param mode the template's mode. For more information, see {@link
092            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
093            * @param language the template's script language. For more information,
094            see {@link
095            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
096            * @param script the template's script
097            * @param cacheable whether the template is cacheable
098            * @param smallImage whether the template has a small image
099            * @param smallImageURL the template's small image URL (optionally
100            <code>null</code>)
101            * @param smallImageFile the template's small image file (optionally
102            <code>null</code>)
103            * @param serviceContext the service context to be applied. Must have the
104            <code>ddmResource</code> attribute to check permissions. Can set
105            the UUID, creation date, modification date, guest permissions,
106            and group permissions for the template.
107            * @return the template
108            * @throws PortalException if the user did not have permission to add the
109            template or if a portal exception occurred
110            */
111            @Override
112            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
113                    long groupId, long classNameId, long classPK, long resourceClassNameId,
114                    java.lang.String templateKey,
115                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
116                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
117                    java.lang.String type, java.lang.String mode,
118                    java.lang.String language, java.lang.String script, boolean cacheable,
119                    boolean smallImage, java.lang.String smallImageURL,
120                    java.io.File smallImageFile,
121                    com.liferay.portal.service.ServiceContext serviceContext)
122                    throws com.liferay.portal.kernel.exception.PortalException {
123                    return _ddmTemplateService.addTemplate(groupId, classNameId, classPK,
124                            resourceClassNameId, templateKey, nameMap, descriptionMap, type,
125                            mode, language, script, cacheable, smallImage, smallImageURL,
126                            smallImageFile, serviceContext);
127            }
128    
129            /**
130            * Copies the template, creating a new template with all the values
131            * extracted from the original one. This method supports defining a new name
132            * and description.
133            *
134            * @param templateId the primary key of the template to be copied
135            * @param nameMap the new template's locales and localized names
136            * @param descriptionMap the new template's locales and localized
137            descriptions
138            * @param serviceContext the service context to be applied. Must have the
139            <code>ddmResource</code> attribute to check permissions. Can set
140            the UUID, creation date, modification date, guest permissions,
141            and group permissions for the template.
142            * @return the new template
143            * @throws PortalException if the user did not have permission to add the
144            template or if a portal exception occurred
145            */
146            @Override
147            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
148                    long templateId,
149                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
150                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
151                    com.liferay.portal.service.ServiceContext serviceContext)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    return _ddmTemplateService.copyTemplate(templateId, nameMap,
154                            descriptionMap, serviceContext);
155            }
156    
157            @Override
158            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
159                    long templateId,
160                    com.liferay.portal.service.ServiceContext serviceContext)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    return _ddmTemplateService.copyTemplate(templateId, serviceContext);
163            }
164    
165            /**
166            * Copies all the templates matching the class name ID, class PK, and type.
167            * This method creates new templates, extracting all the values from the old
168            * ones and updating their class PKs.
169            *
170            * @param classNameId the primary key of the class name for template's
171            related model
172            * @param oldClassPK the primary key of the old template's related entity
173            * @param resourceClassNameId the primary key of the class name for
174            template's resource model
175            * @param newClassPK the primary key of the new template's related entity
176            * @param type the template's type. For more information, see {@link
177            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
178            * @param serviceContext the service context to be applied. Must have the
179            <code>ddmResource</code> attribute to check permissions. Can set
180            the UUID, creation date, modification date, guest permissions,
181            and group permissions for the template.
182            * @return the new template
183            * @throws PortalException if the user did not have permission to add the
184            template or if a portal exception occurred
185            */
186            @Override
187            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates(
188                    long classNameId, long oldClassPK, long resourceClassNameId,
189                    long newClassPK, java.lang.String type,
190                    com.liferay.portal.service.ServiceContext serviceContext)
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    return _ddmTemplateService.copyTemplates(classNameId, oldClassPK,
193                            resourceClassNameId, newClassPK, type, serviceContext);
194            }
195    
196            /**
197            * Deletes the template and its resources.
198            *
199            * @param templateId the primary key of the template to be deleted
200            * @throws PortalException if the user did not have permission to delete the
201            template or if a portal exception occurred
202            */
203            @Override
204            public void deleteTemplate(long templateId)
205                    throws com.liferay.portal.kernel.exception.PortalException {
206                    _ddmTemplateService.deleteTemplate(templateId);
207            }
208    
209            /**
210            * Returns the template matching the group and template key.
211            *
212            * @param groupId the primary key of the group
213            * @param classNameId the primary key of the class name for template's
214            related model
215            * @param templateKey the unique string identifying the template
216            * @return the matching template, or <code>null</code> if a matching
217            template could not be found
218            * @throws PortalException if the user did not have permission to view the
219            template
220            */
221            @Override
222            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate(
223                    long groupId, long classNameId, java.lang.String templateKey)
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return _ddmTemplateService.fetchTemplate(groupId, classNameId,
226                            templateKey);
227            }
228    
229            /**
230            * Returns the Spring bean ID for this bean.
231            *
232            * @return the Spring bean ID for this bean
233            */
234            @Override
235            public java.lang.String getBeanIdentifier() {
236                    return _ddmTemplateService.getBeanIdentifier();
237            }
238    
239            /**
240            * Returns the template matching the group and template key.
241            *
242            * @param groupId the primary key of the group
243            * @param classNameId the primary key of the class name for template's
244            related model
245            * @param templateKey the unique string identifying the template
246            * @return the matching template
247            * @throws PortalException if a matching template could not be found
248            */
249            @Override
250            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
251                    long groupId, long classNameId, java.lang.String templateKey)
252                    throws com.liferay.portal.kernel.exception.PortalException {
253                    return _ddmTemplateService.getTemplate(groupId, classNameId, templateKey);
254            }
255    
256            /**
257            * Returns the template matching the group and template key, optionally
258            * searching ancestor sites (that have sharing enabled) and global scoped
259            * sites.
260            *
261            * <p>
262            * This method first searches in the group. If the template is still not
263            * found and <code>includeAncestorTemplates</code> is set to
264            * <code>true</code>, this method searches the group's ancestor sites (that
265            * have sharing enabled) and lastly searches global scoped sites.
266            * </p>
267            *
268            * @param groupId the primary key of the group
269            * @param classNameId the primary key of the class name for template's
270            related model
271            * @param templateKey the unique string identifying the template
272            * @param includeAncestorTemplates whether to include ancestor sites (that
273            have sharing enabled) and include global scoped sites in the
274            search
275            * @return the matching template
276            * @throws PortalException if a matching template could not be found
277            */
278            @Override
279            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
280                    long groupId, long classNameId, java.lang.String templateKey,
281                    boolean includeAncestorTemplates)
282                    throws com.liferay.portal.kernel.exception.PortalException {
283                    return _ddmTemplateService.getTemplate(groupId, classNameId,
284                            templateKey, includeAncestorTemplates);
285            }
286    
287            /**
288            * Returns the template with the ID.
289            *
290            * @param templateId the primary key of the template
291            * @return the template with the ID
292            * @throws PortalException if the user did not have permission to view the
293            template or if a matching template could not be found
294            */
295            @Override
296            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
297                    long templateId)
298                    throws com.liferay.portal.kernel.exception.PortalException {
299                    return _ddmTemplateService.getTemplate(templateId);
300            }
301    
302            /**
303            * Returns all the templates matching the group and class name ID.
304            *
305            * @param groupId the primary key of the group
306            * @param classNameId the primary key of the class name for template's
307            related model
308            * @return the matching templates
309            */
310            @Override
311            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
312                    long groupId, long classNameId) {
313                    return _ddmTemplateService.getTemplates(groupId, classNameId);
314            }
315    
316            /**
317            * Returns all the templates matching the group, class name ID, and class
318            * PK.
319            *
320            * @param groupId the primary key of the group
321            * @param classNameId the primary key of the class name for template's
322            related model
323            * @param classPK the primary key of the template's related entity
324            * @return the matching templates
325            */
326            @Override
327            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
328                    long groupId, long classNameId, long classPK) {
329                    return _ddmTemplateService.getTemplates(groupId, classNameId, classPK);
330            }
331    
332            @Override
333            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
334                    long groupId, long classNameId, long classPK,
335                    boolean includeAncestorTemplates)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    return _ddmTemplateService.getTemplates(groupId, classNameId, classPK,
338                            includeAncestorTemplates);
339            }
340    
341            /**
342            * Returns all the templates matching the class name ID, class PK, type, and
343            * mode.
344            *
345            * @param groupId the primary key of the group
346            * @param classNameId the primary key of the class name for template's
347            related model
348            * @param classPK the primary key of the template's related entity
349            * @param type the template's type. For more information, see {@link
350            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
351            * @return the matching templates
352            */
353            @Override
354            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
355                    long groupId, long classNameId, long classPK, java.lang.String type) {
356                    return _ddmTemplateService.getTemplates(groupId, classNameId, classPK,
357                            type);
358            }
359    
360            @Override
361            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
362                    long groupId, long classNameId, long classPK, java.lang.String type,
363                    java.lang.String mode) {
364                    return _ddmTemplateService.getTemplates(groupId, classNameId, classPK,
365                            type, mode);
366            }
367    
368            /**
369            * Returns all the templates matching the group and class PK.
370            *
371            * @param groupId the primary key of the group
372            * @param classPK the primary key of the template's related entity
373            * @return the matching templates
374            */
375            @Override
376            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK(
377                    long groupId, long classPK) {
378                    return _ddmTemplateService.getTemplatesByClassPK(groupId, classPK);
379            }
380    
381            /**
382            * Returns an ordered range of all the templates matching the group and
383            * structure class name ID and all the generic templates matching the group.
384            *
385            * <p>
386            * Useful when paginating results. Returns a maximum of <code>end -
387            * start</code> instances. <code>start</code> and <code>end</code> are not
388            * primary keys, they are indexes in the result set. Thus, <code>0</code>
389            * refers to the first result in the set. Setting both <code>start</code>
390            * and <code>end</code> to {@link
391            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
392            * result set.
393            * </p>
394            *
395            * @param groupId the primary key of the group
396            * @param structureClassNameId the primary key of the class name for the
397            template's related structure (optionally <code>0</code>). Specify
398            <code>0</code> to return generic templates only.
399            * @param start the lower bound of the range of templates to return
400            * @param end the upper bound of the range of templates to return (not
401            inclusive)
402            * @param orderByComparator the comparator to order the templates
403            (optionally <code>null</code>)
404            * @return the range of matching templates ordered by the comparator
405            */
406            @Override
407            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByStructureClassNameId(
408                    long groupId, long structureClassNameId, int start, int end,
409                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
410                    return _ddmTemplateService.getTemplatesByStructureClassNameId(groupId,
411                            structureClassNameId, start, end, orderByComparator);
412            }
413    
414            /**
415            * Returns the number of templates matching the group and structure class
416            * name ID plus the number of generic templates matching the group.
417            *
418            * @param groupId the primary key of the group
419            * @param structureClassNameId the primary key of the class name for the
420            template's related structure (optionally <code>0</code>). Specify
421            <code>0</code> to count generic templates only.
422            * @return the number of matching templates plus the number of matching
423            generic templates
424            */
425            @Override
426            public int getTemplatesByStructureClassNameIdCount(long groupId,
427                    long structureClassNameId) {
428                    return _ddmTemplateService.getTemplatesByStructureClassNameIdCount(groupId,
429                            structureClassNameId);
430            }
431    
432            @Override
433            public void revertTemplate(long templateId, java.lang.String version,
434                    com.liferay.portal.service.ServiceContext serviceContext)
435                    throws com.liferay.portal.kernel.exception.PortalException {
436                    _ddmTemplateService.revertTemplate(templateId, version, serviceContext);
437            }
438    
439            /**
440            * Returns an ordered range of all the templates matching the group, class
441            * name ID, class PK, type, and mode, and matching the keywords in the
442            * template names and descriptions.
443            *
444            * <p>
445            * Useful when paginating results. Returns a maximum of <code>end -
446            * start</code> instances. <code>start</code> and <code>end</code> are not
447            * primary keys, they are indexes in the result set. Thus, <code>0</code>
448            * refers to the first result in the set. Setting both <code>start</code>
449            * and <code>end</code> to {@link
450            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
451            * result set.
452            * </p>
453            *
454            * @param companyId the primary key of the template's company
455            * @param groupId the primary key of the group
456            * @param classNameId the primary key of the class name for template's
457            related model
458            * @param classPK the primary key of the template's related entity
459            * @param resourceClassNameId the primary key of the class name for
460            template's resource model
461            * @param keywords the keywords (space separated), which may occur in the
462            template's name or description (optionally <code>null</code>)
463            * @param type the template's type (optionally <code>null</code>). For more
464            information, see {@link
465            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
466            * @param mode the template's mode (optionally <code>null</code>) For more
467            information, see {@link
468            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
469            * @param start the lower bound of the range of templates to return
470            * @param end the upper bound of the range of templates to return (not
471            inclusive)
472            * @param orderByComparator the comparator to order the templates
473            (optionally <code>null</code>)
474            * @return the matching templates ordered by the comparator
475            */
476            @Override
477            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
478                    long companyId, long groupId, long classNameId, long classPK,
479                    long resourceClassNameId, java.lang.String keywords,
480                    java.lang.String type, java.lang.String mode, int start, int end,
481                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
482                    return _ddmTemplateService.search(companyId, groupId, classNameId,
483                            classPK, resourceClassNameId, keywords, type, mode, start, end,
484                            orderByComparator);
485            }
486    
487            /**
488            * Returns an ordered range of all the templates matching the group, class
489            * name ID, class PK, name keyword, description keyword, type, mode, and
490            * language.
491            *
492            * <p>
493            * Useful when paginating results. Returns a maximum of <code>end -
494            * start</code> instances. <code>start</code> and <code>end</code> are not
495            * primary keys, they are indexes in the result set. Thus, <code>0</code>
496            * refers to the first result in the set. Setting both <code>start</code>
497            * and <code>end</code> to {@link
498            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
499            * result set.
500            * </p>
501            *
502            * @param companyId the primary key of the template's company
503            * @param groupId the primary key of the group
504            * @param classNameId the primary key of the class name for template's
505            related model
506            * @param classPK the primary key of the template's related entity
507            * @param resourceClassNameId the primary key of the class name for
508            template's resource model
509            * @param name the name keywords (optionally <code>null</code>)
510            * @param description the description keywords (optionally
511            <code>null</code>)
512            * @param type the template's type (optionally <code>null</code>). For more
513            information, see {@link
514            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
515            * @param mode the template's mode (optionally <code>null</code>). For more
516            information, see {@link
517            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
518            * @param language the template's script language (optionally
519            <code>null</code>). For more information, see {@link
520            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
521            * @param andOperator whether every field must match its keywords, or just
522            one field.
523            * @param start the lower bound of the range of templates to return
524            * @param end the upper bound of the range of templates to return (not
525            inclusive)
526            * @param orderByComparator the comparator to order the templates
527            (optionally <code>null</code>)
528            * @return the matching templates ordered by the comparator
529            */
530            @Override
531            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
532                    long companyId, long groupId, long classNameId, long classPK,
533                    long resourceClassNameId, java.lang.String name,
534                    java.lang.String description, java.lang.String type,
535                    java.lang.String mode, java.lang.String language, boolean andOperator,
536                    int start, int end,
537                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
538                    return _ddmTemplateService.search(companyId, groupId, classNameId,
539                            classPK, resourceClassNameId, name, description, type, mode,
540                            language, andOperator, start, end, orderByComparator);
541            }
542    
543            /**
544            * Returns an ordered range of all the templates matching the group IDs,
545            * class name IDs, class PK, type, and mode, and matching the keywords in
546            * the template names and descriptions.
547            *
548            * <p>
549            * Useful when paginating results. Returns a maximum of <code>end -
550            * start</code> instances. <code>start</code> and <code>end</code> are not
551            * primary keys, they are indexes in the result set. Thus, <code>0</code>
552            * refers to the first result in the set. Setting both <code>start</code>
553            * and <code>end</code> to {@link
554            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
555            * result set.
556            * </p>
557            *
558            * @param companyId the primary key of the template's company
559            * @param groupIds the primary keys of the groups
560            * @param classNameIds the primary keys of the entity's instances the
561            templates are related to
562            * @param classPKs the primary keys of the template's related entities
563            * @param resourceClassNameId the primary key of the class name for
564            template's resource model
565            * @param keywords the keywords (space separated), which may occur in the
566            template's name or description (optionally <code>null</code>)
567            * @param type the template's type (optionally <code>null</code>). For more
568            information, see {@link
569            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
570            * @param mode the template's mode (optionally <code>null</code>). For more
571            information, see {@link
572            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
573            * @param start the lower bound of the range of templates to return
574            * @param end the upper bound of the range of templates to return (not
575            inclusive)
576            * @param orderByComparator the comparator to order the templates
577            (optionally <code>null</code>)
578            * @return the matching templates ordered by the comparator
579            */
580            @Override
581            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
582                    long companyId, long[] groupIds, long[] classNameIds, long[] classPKs,
583                    long resourceClassNameId, java.lang.String keywords,
584                    java.lang.String type, java.lang.String mode, int start, int end,
585                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
586                    return _ddmTemplateService.search(companyId, groupIds, classNameIds,
587                            classPKs, resourceClassNameId, keywords, type, mode, start, end,
588                            orderByComparator);
589            }
590    
591            /**
592            * Returns an ordered range of all the templates matching the group IDs,
593            * class name IDs, class PK, name keyword, description keyword, type, mode,
594            * and language.
595            *
596            * <p>
597            * Useful when paginating results. Returns a maximum of <code>end -
598            * start</code> instances. <code>start</code> and <code>end</code> are not
599            * primary keys, they are indexes in the result set. Thus, <code>0</code>
600            * refers to the first result in the set. Setting both <code>start</code>
601            * and <code>end</code> to {@link
602            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
603            * result set.
604            * </p>
605            *
606            * @param companyId the primary key of the template's company
607            * @param groupIds the primary keys of the groups
608            * @param classNameIds the primary keys of the entity's instances the
609            templates are related to
610            * @param classPKs the primary keys of the template's related entities
611            * @param resourceClassNameId the primary key of the class name for
612            template's resource model
613            * @param name the name keywords (optionally <code>null</code>)
614            * @param description the description keywords (optionally
615            <code>null</code>)
616            * @param type the template's type (optionally <code>null</code>). For more
617            information, see {@link
618            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
619            * @param mode the template's mode (optionally <code>null</code>). For more
620            information, see {@link
621            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
622            * @param language the template's script language (optionally
623            <code>null</code>). For more information, see {@link
624            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
625            * @param andOperator whether every field must match its keywords, or just
626            one field.
627            * @param start the lower bound of the range of templates to return
628            * @param end the upper bound of the range of templates to return (not
629            inclusive)
630            * @param orderByComparator the comparator to order the templates
631            (optionally <code>null</code>)
632            * @return the matching templates ordered by the comparator
633            */
634            @Override
635            public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
636                    long companyId, long[] groupIds, long[] classNameIds, long[] classPKs,
637                    long resourceClassNameId, java.lang.String name,
638                    java.lang.String description, java.lang.String type,
639                    java.lang.String mode, java.lang.String language, boolean andOperator,
640                    int start, int end,
641                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator) {
642                    return _ddmTemplateService.search(companyId, groupIds, classNameIds,
643                            classPKs, resourceClassNameId, name, description, type, mode,
644                            language, andOperator, start, end, orderByComparator);
645            }
646    
647            /**
648            * Returns the number of templates matching the group, class name ID, class
649            * PK, type, and mode, and matching the keywords in the template names and
650            * descriptions.
651            *
652            * @param companyId the primary key of the template's company
653            * @param groupId the primary key of the group
654            * @param classNameId the primary key of the class name for template's
655            related model
656            * @param classPK the primary key of the template's related entity
657            * @param resourceClassNameId the primary key of the class name for
658            template's resource model
659            * @param keywords the keywords (space separated), which may occur in the
660            template's name or description (optionally <code>null</code>)
661            * @param type the template's type (optionally <code>null</code>). For more
662            information, see {@link
663            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
664            * @param mode the template's mode (optionally <code>null</code>). For more
665            information, see {@link
666            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
667            * @return the number of matching templates
668            */
669            @Override
670            public int searchCount(long companyId, long groupId, long classNameId,
671                    long classPK, long resourceClassNameId, java.lang.String keywords,
672                    java.lang.String type, java.lang.String mode) {
673                    return _ddmTemplateService.searchCount(companyId, groupId, classNameId,
674                            classPK, resourceClassNameId, keywords, type, mode);
675            }
676    
677            /**
678            * Returns the number of templates matching the group, class name ID, class
679            * PK, name keyword, description keyword, type, mode, and language.
680            *
681            * @param companyId the primary key of the template's company
682            * @param groupId the primary key of the group
683            * @param classNameId the primary key of the class name for template's
684            related model
685            * @param classPK the primary key of the template's related entity
686            * @param resourceClassNameId the primary key of the class name for
687            template's resource model
688            * @param name the name keywords (optionally <code>null</code>)
689            * @param description the description keywords (optionally
690            <code>null</code>)
691            * @param type the template's type (optionally <code>null</code>). For more
692            information, see {@link
693            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
694            * @param mode the template's mode (optionally <code>null</code>). For more
695            information, see {@link
696            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
697            * @param language the template's script language (optionally
698            <code>null</code>). For more information, see {@link
699            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
700            * @param andOperator whether every field must match its keywords, or just
701            one field.
702            * @return the number of matching templates
703            */
704            @Override
705            public int searchCount(long companyId, long groupId, long classNameId,
706                    long classPK, long resourceClassNameId, java.lang.String name,
707                    java.lang.String description, java.lang.String type,
708                    java.lang.String mode, java.lang.String language, boolean andOperator) {
709                    return _ddmTemplateService.searchCount(companyId, groupId, classNameId,
710                            classPK, resourceClassNameId, name, description, type, mode,
711                            language, andOperator);
712            }
713    
714            /**
715            * Returns the number of templates matching the group IDs, class name IDs,
716            * class PK, type, and mode, and matching the keywords in the template names
717            * and descriptions.
718            *
719            * @param companyId the primary key of the template's company
720            * @param groupIds the primary keys of the groups
721            * @param classNameIds the primary keys of the entity's instances the
722            templates are related to
723            * @param classPKs the primary keys of the template's related entities
724            * @param resourceClassNameId the primary key of the class name for
725            template's resource model
726            * @param keywords the keywords (space separated), which may occur in the
727            template's name or description (optionally <code>null</code>)
728            * @param type the template's type (optionally <code>null</code>). For more
729            information, see {@link
730            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
731            * @param mode the template's mode (optionally <code>null</code>). For more
732            information, see {@link
733            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
734            * @return the number of matching templates
735            */
736            @Override
737            public int searchCount(long companyId, long[] groupIds,
738                    long[] classNameIds, long[] classPKs, long resourceClassNameId,
739                    java.lang.String keywords, java.lang.String type, java.lang.String mode) {
740                    return _ddmTemplateService.searchCount(companyId, groupIds,
741                            classNameIds, classPKs, resourceClassNameId, keywords, type, mode);
742            }
743    
744            /**
745            * Returns the number of templates matching the group IDs, class name IDs,
746            * class PK, name keyword, description keyword, type, mode, and language.
747            *
748            * @param companyId the primary key of the template's company
749            * @param groupIds the primary keys of the groups
750            * @param classNameIds the primary keys of the entity's instances the
751            templates are related to
752            * @param classPKs the primary keys of the template's related entities
753            * @param resourceClassNameId the primary key of the class name for
754            template's resource model
755            * @param name the name keywords (optionally <code>null</code>)
756            * @param description the description keywords (optionally
757            <code>null</code>)
758            * @param type the template's type (optionally <code>null</code>). For more
759            information, see {@link
760            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
761            * @param mode the template's mode (optionally <code>null</code>). For more
762            information, see {@link
763            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
764            * @param language the template's script language (optionally
765            <code>null</code>). For more information, see {@link
766            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
767            * @param andOperator whether every field must match its keywords, or just
768            one field.
769            * @return the number of matching templates
770            */
771            @Override
772            public int searchCount(long companyId, long[] groupIds,
773                    long[] classNameIds, long[] classPKs, long resourceClassNameId,
774                    java.lang.String name, java.lang.String description,
775                    java.lang.String type, java.lang.String mode,
776                    java.lang.String language, boolean andOperator) {
777                    return _ddmTemplateService.searchCount(companyId, groupIds,
778                            classNameIds, classPKs, resourceClassNameId, name, description,
779                            type, mode, language, andOperator);
780            }
781    
782            /**
783            * Sets the Spring bean ID for this bean.
784            *
785            * @param beanIdentifier the Spring bean ID for this bean
786            */
787            @Override
788            public void setBeanIdentifier(java.lang.String beanIdentifier) {
789                    _ddmTemplateService.setBeanIdentifier(beanIdentifier);
790            }
791    
792            /**
793            * Updates the template matching the ID.
794            *
795            * @param templateId the primary key of the template
796            * @param classPK the primary key of the template's related entity
797            * @param nameMap the template's new locales and localized names
798            * @param descriptionMap the template's new locales and localized
799            description
800            * @param type the template's type. For more information, see {@link
801            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
802            * @param mode the template's mode. For more information, see {@link
803            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
804            * @param language the template's script language. For more information,
805            see {@link
806            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
807            * @param script the template's script
808            * @param cacheable whether the template is cacheable
809            * @param serviceContext the service context to be applied. Can set the
810            modification date.
811            * @return the updated template
812            * @throws PortalException if the user did not have permission to update the
813            template or if a portal exception occurred
814            */
815            @Override
816            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
817                    long templateId, long classPK,
818                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
819                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
820                    java.lang.String type, java.lang.String mode,
821                    java.lang.String language, java.lang.String script, boolean cacheable,
822                    com.liferay.portal.service.ServiceContext serviceContext)
823                    throws com.liferay.portal.kernel.exception.PortalException {
824                    return _ddmTemplateService.updateTemplate(templateId, classPK, nameMap,
825                            descriptionMap, type, mode, language, script, cacheable,
826                            serviceContext);
827            }
828    
829            /**
830            * Updates the template matching the ID.
831            *
832            * @param templateId the primary key of the template
833            * @param classPK the primary key of the template's related entity
834            * @param nameMap the template's new locales and localized names
835            * @param descriptionMap the template's new locales and localized
836            description
837            * @param type the template's type. For more information, see {@link
838            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
839            * @param mode the template's mode. For more information, see {@link
840            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
841            * @param language the template's script language. For more information,
842            see {@link
843            com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
844            * @param script the template's script
845            * @param cacheable whether the template is cacheable
846            * @param smallImage whether the template has a small image
847            * @param smallImageURL the template's small image URL (optionally
848            <code>null</code>)
849            * @param smallImageFile the template's small image file (optionally
850            <code>null</code>)
851            * @param serviceContext the service context to be applied. Can set the
852            modification date.
853            * @return the updated template
854            * @throws PortalException if the user did not have permission to update the
855            template or if a portal exception occurred
856            */
857            @Override
858            public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
859                    long templateId, long classPK,
860                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
861                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
862                    java.lang.String type, java.lang.String mode,
863                    java.lang.String language, java.lang.String script, boolean cacheable,
864                    boolean smallImage, java.lang.String smallImageURL,
865                    java.io.File smallImageFile,
866                    com.liferay.portal.service.ServiceContext serviceContext)
867                    throws com.liferay.portal.kernel.exception.PortalException {
868                    return _ddmTemplateService.updateTemplate(templateId, classPK, nameMap,
869                            descriptionMap, type, mode, language, script, cacheable,
870                            smallImage, smallImageURL, smallImageFile, serviceContext);
871            }
872    
873            /**
874             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
875             */
876            @Deprecated
877            public DDMTemplateService getWrappedDDMTemplateService() {
878                    return _ddmTemplateService;
879            }
880    
881            /**
882             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
883             */
884            @Deprecated
885            public void setWrappedDDMTemplateService(
886                    DDMTemplateService ddmTemplateService) {
887                    _ddmTemplateService = ddmTemplateService;
888            }
889    
890            @Override
891            public DDMTemplateService getWrappedService() {
892                    return _ddmTemplateService;
893            }
894    
895            @Override
896            public void setWrappedService(DDMTemplateService ddmTemplateService) {
897                    _ddmTemplateService = ddmTemplateService;
898            }
899    
900            private DDMTemplateService _ddmTemplateService;
901    }