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