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