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