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