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