001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.dynamicdatamapping.service; 016 017 import com.liferay.portal.service.ServiceWrapper; 018 019 /** 020 * Provides a wrapper for {@link DDMTemplateService}. 021 * 022 * @author Brian Wing Shun Chan 023 * @see DDMTemplateService 024 * @generated 025 */ 026 public class DDMTemplateServiceWrapper implements DDMTemplateService, 027 ServiceWrapper<DDMTemplateService> { 028 public DDMTemplateServiceWrapper(DDMTemplateService ddmTemplateService) { 029 _ddmTemplateService = ddmTemplateService; 030 } 031 032 /** 033 * Returns the Spring bean ID for this bean. 034 * 035 * @return the Spring bean ID for this bean 036 */ 037 @Override 038 public java.lang.String getBeanIdentifier() { 039 return _ddmTemplateService.getBeanIdentifier(); 040 } 041 042 /** 043 * Sets the Spring bean ID for this bean. 044 * 045 * @param beanIdentifier the Spring bean ID for this bean 046 */ 047 @Override 048 public void setBeanIdentifier(java.lang.String beanIdentifier) { 049 _ddmTemplateService.setBeanIdentifier(beanIdentifier); 050 } 051 052 /** 053 * Adds a template. 054 * 055 * @param groupId the primary key of the group 056 * @param classNameId the primary key of the class name for template's 057 related model 058 * @param classPK the primary key of the template's related entity 059 * @param nameMap the template's locales and localized names 060 * @param descriptionMap the template's locales and localized descriptions 061 * @param type the template's type. For more information, see {@link 062 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 063 * @param mode the template's mode. For more information, see {@link 064 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 065 * @param language the template's script language. For more information, 066 see {@link 067 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 068 * @param script the template's script 069 * @param serviceContext the service context to be applied. Must have the 070 <code>ddmResource</code> attribute to check permissions. Can set 071 the UUID, creation date, modification date, guest permissions, 072 and group permissions for the template. 073 * @return the template 074 * @throws PortalException if the user did not have permission to add the 075 template or if a portal exception occurred 076 * @throws SystemException if a system exception occurred 077 */ 078 @Override 079 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate( 080 long groupId, long classNameId, long classPK, 081 java.util.Map<java.util.Locale, java.lang.String> nameMap, 082 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 083 java.lang.String type, java.lang.String mode, 084 java.lang.String language, java.lang.String script, 085 com.liferay.portal.service.ServiceContext serviceContext) 086 throws com.liferay.portal.kernel.exception.PortalException, 087 com.liferay.portal.kernel.exception.SystemException { 088 return _ddmTemplateService.addTemplate(groupId, classNameId, classPK, 089 nameMap, descriptionMap, type, mode, language, script, 090 serviceContext); 091 } 092 093 /** 094 * Adds a template with additional parameters. 095 * 096 * @param groupId the primary key of the group 097 * @param classNameId the primary key of the class name for template's 098 related model 099 * @param classPK the primary key of the template's related entity 100 * @param templateKey the unique string identifying the template 101 (optionally <code>null</code>) 102 * @param nameMap the template's locales and localized names 103 * @param descriptionMap the template's locales and localized descriptions 104 * @param type the template's type. For more information, see {@link 105 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 106 * @param mode the template's mode. For more information, see {@link 107 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 108 * @param language the template's script language. For more information, 109 see {@link 110 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 111 * @param script the template's script 112 * @param cacheable whether the template is cacheable 113 * @param smallImage whether the template has a small image 114 * @param smallImageURL the template's small image URL (optionally 115 <code>null</code>) 116 * @param smallImageFile the template's small image file (optionally 117 <code>null</code>) 118 * @param serviceContext the service context to be applied. Must have the 119 <code>ddmResource</code> attribute to check permissions. Can set 120 the UUID, creation date, modification date, guest permissions, 121 and group permissions for the template. 122 * @return the template 123 * @throws PortalException if the user did not have permission to add the 124 template or if a portal exception occurred 125 * @throws SystemException if a system exception occurred 126 */ 127 @Override 128 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate( 129 long groupId, long classNameId, long classPK, 130 java.lang.String templateKey, 131 java.util.Map<java.util.Locale, java.lang.String> nameMap, 132 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 133 java.lang.String type, java.lang.String mode, 134 java.lang.String language, java.lang.String script, boolean cacheable, 135 boolean smallImage, java.lang.String smallImageURL, 136 java.io.File smallImageFile, 137 com.liferay.portal.service.ServiceContext serviceContext) 138 throws com.liferay.portal.kernel.exception.PortalException, 139 com.liferay.portal.kernel.exception.SystemException { 140 return _ddmTemplateService.addTemplate(groupId, classNameId, classPK, 141 templateKey, nameMap, descriptionMap, type, mode, language, script, 142 cacheable, smallImage, smallImageURL, smallImageFile, serviceContext); 143 } 144 145 /** 146 * Copies the template, creating a new template with all the values 147 * extracted from the original one. This method supports defining a new name 148 * and description. 149 * 150 * @param templateId the primary key of the template to be copied 151 * @param nameMap the new template's locales and localized names 152 * @param descriptionMap the new template's locales and localized 153 descriptions 154 * @param serviceContext the service context to be applied. Must have the 155 <code>ddmResource</code> attribute to check permissions. Can set 156 the UUID, creation date, modification date, guest permissions, 157 and group permissions for the template. 158 * @return the new template 159 * @throws PortalException if the user did not have permission to add the 160 template or if a portal exception occurred 161 * @throws SystemException if a system exception occurred 162 */ 163 @Override 164 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate( 165 long templateId, 166 java.util.Map<java.util.Locale, java.lang.String> nameMap, 167 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 168 com.liferay.portal.service.ServiceContext serviceContext) 169 throws com.liferay.portal.kernel.exception.PortalException, 170 com.liferay.portal.kernel.exception.SystemException { 171 return _ddmTemplateService.copyTemplate(templateId, nameMap, 172 descriptionMap, serviceContext); 173 } 174 175 @Override 176 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate( 177 long templateId, 178 com.liferay.portal.service.ServiceContext serviceContext) 179 throws com.liferay.portal.kernel.exception.PortalException, 180 com.liferay.portal.kernel.exception.SystemException { 181 return _ddmTemplateService.copyTemplate(templateId, serviceContext); 182 } 183 184 /** 185 * Copies all the templates matching the class name ID, class PK, and type. 186 * This method creates new templates, extracting all the values from the old 187 * ones and updating their class PKs. 188 * 189 * @param classNameId the primary key of the class name for template's 190 related model 191 * @param classPK the primary key of the original template's related entity 192 * @param newClassPK the primary key of the new template's related entity 193 * @param type the template's type. For more information, see {@link 194 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 195 * @param serviceContext the service context to be applied. Must have the 196 <code>ddmResource</code> attribute to check permissions. Can set 197 the UUID, creation date, modification date, guest permissions, 198 and group permissions for the template. 199 * @return the new template 200 * @throws PortalException if the user did not have permission to add the 201 template or if a portal exception occurred 202 * @throws SystemException if a system exception occurred 203 */ 204 @Override 205 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates( 206 long classNameId, long classPK, long newClassPK, java.lang.String type, 207 com.liferay.portal.service.ServiceContext serviceContext) 208 throws com.liferay.portal.kernel.exception.PortalException, 209 com.liferay.portal.kernel.exception.SystemException { 210 return _ddmTemplateService.copyTemplates(classNameId, classPK, 211 newClassPK, type, serviceContext); 212 } 213 214 /** 215 * Deletes the template and its resources. 216 * 217 * @param templateId the primary key of the template to be deleted 218 * @throws PortalException if the user did not have permission to delete the 219 template or if a portal exception occurred 220 * @throws SystemException if a system exception occurred 221 */ 222 @Override 223 public void deleteTemplate(long templateId) 224 throws com.liferay.portal.kernel.exception.PortalException, 225 com.liferay.portal.kernel.exception.SystemException { 226 _ddmTemplateService.deleteTemplate(templateId); 227 } 228 229 /** 230 * Returns the template matching the group and template key. 231 * 232 * @param groupId the primary key of the group 233 * @param classNameId the primary key of the class name for template's 234 related model 235 * @param templateKey the unique string identifying the template 236 * @return the matching template, or <code>null</code> if a matching 237 template could not be found 238 * @throws PortalException if the user did not have permission to view the 239 template 240 * @throws SystemException if a system exception occurred 241 */ 242 @Override 243 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate( 244 long groupId, long classNameId, java.lang.String templateKey) 245 throws com.liferay.portal.kernel.exception.PortalException, 246 com.liferay.portal.kernel.exception.SystemException { 247 return _ddmTemplateService.fetchTemplate(groupId, classNameId, 248 templateKey); 249 } 250 251 /** 252 * Returns the template with the ID. 253 * 254 * @param templateId the primary key of the template 255 * @return the template with the ID 256 * @throws PortalException if the user did not have permission to view the 257 template or if a matching template could not be found 258 * @throws SystemException if a system exception occurred 259 */ 260 @Override 261 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 262 long templateId) 263 throws com.liferay.portal.kernel.exception.PortalException, 264 com.liferay.portal.kernel.exception.SystemException { 265 return _ddmTemplateService.getTemplate(templateId); 266 } 267 268 /** 269 * Returns the template matching the group and template key. 270 * 271 * @param groupId the primary key of the group 272 * @param classNameId the primary key of the class name for template's 273 related model 274 * @param templateKey the unique string identifying the template 275 * @return the matching template 276 * @throws PortalException if a matching template could not be found 277 * @throws SystemException if a system exception occurred 278 */ 279 @Override 280 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 281 long groupId, long classNameId, java.lang.String templateKey) 282 throws com.liferay.portal.kernel.exception.PortalException, 283 com.liferay.portal.kernel.exception.SystemException { 284 return _ddmTemplateService.getTemplate(groupId, classNameId, templateKey); 285 } 286 287 /** 288 * Returns the template matching the group and template key, optionally in 289 * the global scope. 290 * 291 * <p> 292 * This method first searches in the group. If the template is still not 293 * found and <code>includeGlobalTemplates</code> is set to 294 * <code>true</code>, this method searches the global group. 295 * </p> 296 * 297 * @param groupId the primary key of the group 298 * @param classNameId the primary key of the class name for template's 299 related model 300 * @param templateKey the unique string identifying the template 301 * @param includeGlobalTemplates whether to include the global scope in the 302 search 303 * @return the matching template 304 * @throws PortalException if a matching template could not be found 305 * @throws SystemException if a system exception occurred 306 */ 307 @Override 308 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 309 long groupId, long classNameId, java.lang.String templateKey, 310 boolean includeGlobalTemplates) 311 throws com.liferay.portal.kernel.exception.PortalException, 312 com.liferay.portal.kernel.exception.SystemException { 313 return _ddmTemplateService.getTemplate(groupId, classNameId, 314 templateKey, includeGlobalTemplates); 315 } 316 317 /** 318 * Returns all the templates matching the group and class name ID. 319 * 320 * @param groupId the primary key of the group 321 * @param classNameId the primary key of the class name for template's 322 related model 323 * @return the matching templates 324 * @throws SystemException if a system exception occurred 325 */ 326 @Override 327 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 328 long groupId, long classNameId) 329 throws com.liferay.portal.kernel.exception.SystemException { 330 return _ddmTemplateService.getTemplates(groupId, classNameId); 331 } 332 333 /** 334 * Returns all the templates matching the group, class name ID, and class 335 * PK. 336 * 337 * @param groupId the primary key of the group 338 * @param classNameId the primary key of the class name for template's 339 related model 340 * @param classPK the primary key of the template's related entity 341 * @return the matching templates 342 * @throws SystemException if a system exception occurred 343 */ 344 @Override 345 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 346 long groupId, long classNameId, long classPK) 347 throws com.liferay.portal.kernel.exception.SystemException { 348 return _ddmTemplateService.getTemplates(groupId, classNameId, classPK); 349 } 350 351 /** 352 * Returns all the templates matching the class name ID, class PK, type, and 353 * mode. 354 * 355 * @param groupId the primary key of the group 356 * @param classNameId the primary key of the class name for template's 357 related model 358 * @param classPK the primary key of the template's related entity 359 * @param type the template's type. For more information, see {@link 360 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 361 * @return the matching templates 362 * @throws SystemException if a system exception occurred 363 */ 364 @Override 365 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 366 long groupId, long classNameId, long classPK, java.lang.String type) 367 throws com.liferay.portal.kernel.exception.SystemException { 368 return _ddmTemplateService.getTemplates(groupId, classNameId, classPK, 369 type); 370 } 371 372 @Override 373 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 374 long groupId, long classNameId, long classPK, java.lang.String type, 375 java.lang.String mode) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return _ddmTemplateService.getTemplates(groupId, classNameId, classPK, 378 type, mode); 379 } 380 381 /** 382 * Returns all the templates matching the group and class PK. 383 * 384 * @param groupId the primary key of the group 385 * @param classPK the primary key of the template's related entity 386 * @return the matching templates 387 * @throws SystemException if a system exception occurred 388 */ 389 @Override 390 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 391 long groupId, long classPK) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 return _ddmTemplateService.getTemplatesByClassPK(groupId, classPK); 394 } 395 396 /** 397 * Returns an ordered range of all the templates matching the group and 398 * structure class name ID and all the generic templates matching the group. 399 * 400 * <p> 401 * Useful when paginating results. Returns a maximum of <code>end - 402 * start</code> instances. <code>start</code> and <code>end</code> are not 403 * primary keys, they are indexes in the result set. Thus, <code>0</code> 404 * refers to the first result in the set. Setting both <code>start</code> 405 * and <code>end</code> to {@link 406 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 407 * result set. 408 * </p> 409 * 410 * @param groupId the primary key of the group 411 * @param structureClassNameId the primary key of the class name for the 412 template's related structure (optionally <code>0</code>). Specify 413 <code>0</code> to return generic templates only. 414 * @param start the lower bound of the range of templates to return 415 * @param end the upper bound of the range of templates to return (not 416 inclusive) 417 * @param orderByComparator the comparator to order the templates 418 (optionally <code>null</code>) 419 * @return the range of matching templates ordered by the comparator 420 * @throws SystemException if a system exception occurred 421 */ 422 @Override 423 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByStructureClassNameId( 424 long groupId, long structureClassNameId, int start, int end, 425 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 426 throws com.liferay.portal.kernel.exception.SystemException { 427 return _ddmTemplateService.getTemplatesByStructureClassNameId(groupId, 428 structureClassNameId, start, end, orderByComparator); 429 } 430 431 /** 432 * Returns the number of templates matching the group and structure class 433 * name ID plus the number of generic templates matching the group. 434 * 435 * @param groupId the primary key of the group 436 * @param structureClassNameId the primary key of the class name for the 437 template's related structure (optionally <code>0</code>). Specify 438 <code>0</code> to count generic templates only. 439 * @return the number of matching templates plus the number of matching 440 generic templates 441 * @throws SystemException if a system exception occurred 442 */ 443 @Override 444 public int getTemplatesByStructureClassNameIdCount(long groupId, 445 long structureClassNameId) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 return _ddmTemplateService.getTemplatesByStructureClassNameIdCount(groupId, 448 structureClassNameId); 449 } 450 451 /** 452 * Returns an ordered range of all the templates matching the group, class 453 * name ID, class PK, type, and mode, and matching the keywords in the 454 * template names and descriptions. 455 * 456 * <p> 457 * Useful when paginating results. Returns a maximum of <code>end - 458 * start</code> instances. <code>start</code> and <code>end</code> are not 459 * primary keys, they are indexes in the result set. Thus, <code>0</code> 460 * refers to the first result in the set. Setting both <code>start</code> 461 * and <code>end</code> to {@link 462 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 463 * result set. 464 * </p> 465 * 466 * @param companyId the primary key of the template's company 467 * @param groupId the primary key of the group 468 * @param classNameId the primary key of the class name for template's 469 related model 470 * @param classPK the primary key of the template's related entity 471 * @param keywords the keywords (space separated), which may occur in the 472 template's name or description (optionally <code>null</code>) 473 * @param type the template's type (optionally <code>null</code>). For more 474 information, see {@link 475 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 476 * @param mode the template's mode (optionally <code>null</code>) For more 477 information, see {@link 478 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 479 * @param start the lower bound of the range of templates to return 480 * @param end the upper bound of the range of templates to return (not 481 inclusive) 482 * @param orderByComparator the comparator to order the templates 483 (optionally <code>null</code>) 484 * @return the matching templates ordered by the comparator 485 * @throws SystemException if a system exception occurred 486 */ 487 @Override 488 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 489 long companyId, long groupId, long classNameId, long classPK, 490 java.lang.String keywords, java.lang.String type, 491 java.lang.String mode, int start, int end, 492 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 493 throws com.liferay.portal.kernel.exception.SystemException { 494 return _ddmTemplateService.search(companyId, groupId, classNameId, 495 classPK, keywords, type, mode, start, end, orderByComparator); 496 } 497 498 /** 499 * Returns an ordered range of all the templates matching the group, class 500 * name ID, class PK, name keyword, description keyword, type, mode, and 501 * language. 502 * 503 * <p> 504 * Useful when paginating results. Returns a maximum of <code>end - 505 * start</code> instances. <code>start</code> and <code>end</code> are not 506 * primary keys, they are indexes in the result set. Thus, <code>0</code> 507 * refers to the first result in the set. Setting both <code>start</code> 508 * and <code>end</code> to {@link 509 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 510 * result set. 511 * </p> 512 * 513 * @param companyId the primary key of the template's company 514 * @param groupId the primary key of the group 515 * @param classNameId the primary key of the class name for template's 516 related model 517 * @param classPK the primary key of the template's related entity 518 * @param name the name keywords (optionally <code>null</code>) 519 * @param description the description keywords (optionally 520 <code>null</code>) 521 * @param type the template's type (optionally <code>null</code>). For more 522 information, see {@link 523 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 524 * @param mode the template's mode (optionally <code>null</code>). For more 525 information, see {@link 526 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 527 * @param language the template's script language (optionally 528 <code>null</code>). For more information, see {@link 529 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 530 * @param andOperator whether every field must match its keywords, or just 531 one field. 532 * @param start the lower bound of the range of templates to return 533 * @param end the upper bound of the range of templates to return (not 534 inclusive) 535 * @param orderByComparator the comparator to order the templates 536 (optionally <code>null</code>) 537 * @return the matching templates ordered by the comparator 538 * @throws SystemException if a system exception occurred 539 */ 540 @Override 541 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 542 long companyId, long groupId, long classNameId, long classPK, 543 java.lang.String name, java.lang.String description, 544 java.lang.String type, java.lang.String mode, 545 java.lang.String language, boolean andOperator, int start, int end, 546 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 547 throws com.liferay.portal.kernel.exception.SystemException { 548 return _ddmTemplateService.search(companyId, groupId, classNameId, 549 classPK, name, description, type, mode, language, andOperator, 550 start, end, orderByComparator); 551 } 552 553 /** 554 * Returns an ordered range of all the templates matching the group IDs, 555 * class name IDs, class PK, type, and mode, and matching the keywords in 556 * the template names and descriptions. 557 * 558 * <p> 559 * Useful when paginating results. Returns a maximum of <code>end - 560 * start</code> instances. <code>start</code> and <code>end</code> are not 561 * primary keys, they are indexes in the result set. Thus, <code>0</code> 562 * refers to the first result in the set. Setting both <code>start</code> 563 * and <code>end</code> to {@link 564 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 565 * result set. 566 * </p> 567 * 568 * @param companyId the primary key of the template's company 569 * @param groupIds the primary keys of the groups 570 * @param classNameIds the primary keys of the entity's instances the 571 templates are related to 572 * @param classPKs the primary keys of the template's related entities 573 * @param keywords the keywords (space separated), which may occur in the 574 template's name or description (optionally <code>null</code>) 575 * @param type the template's type (optionally <code>null</code>). For more 576 information, see {@link 577 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 578 * @param mode the template's mode (optionally <code>null</code>). For more 579 information, see {@link 580 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 581 * @param start the lower bound of the range of templates to return 582 * @param end the upper bound of the range of templates to return (not 583 inclusive) 584 * @param orderByComparator the comparator to order the templates 585 (optionally <code>null</code>) 586 * @return the matching templates ordered by the comparator 587 * @throws SystemException if a system exception occurred 588 */ 589 @Override 590 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 591 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 592 java.lang.String keywords, java.lang.String type, 593 java.lang.String mode, int start, int end, 594 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 595 throws com.liferay.portal.kernel.exception.SystemException { 596 return _ddmTemplateService.search(companyId, groupIds, classNameIds, 597 classPKs, keywords, type, mode, start, end, orderByComparator); 598 } 599 600 /** 601 * Returns an ordered range of all the templates matching the group IDs, 602 * class name IDs, class PK, name keyword, description keyword, type, mode, 603 * and language. 604 * 605 * <p> 606 * Useful when paginating results. Returns a maximum of <code>end - 607 * start</code> instances. <code>start</code> and <code>end</code> are not 608 * primary keys, they are indexes in the result set. Thus, <code>0</code> 609 * refers to the first result in the set. Setting both <code>start</code> 610 * and <code>end</code> to {@link 611 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 612 * result set. 613 * </p> 614 * 615 * @param companyId the primary key of the template's company 616 * @param groupIds the primary keys of the groups 617 * @param classNameIds the primary keys of the entity's instances the 618 templates are related to 619 * @param classPKs the primary keys of the template's related entities 620 * @param name the name keywords (optionally <code>null</code>) 621 * @param description the description keywords (optionally 622 <code>null</code>) 623 * @param type the template's type (optionally <code>null</code>). For more 624 information, see {@link 625 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 626 * @param mode the template's mode (optionally <code>null</code>). For more 627 information, see {@link 628 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 629 * @param language the template's script language (optionally 630 <code>null</code>). For more information, see {@link 631 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 632 * @param andOperator whether every field must match its keywords, or just 633 one field. 634 * @param start the lower bound of the range of templates to return 635 * @param end the upper bound of the range of templates to return (not 636 inclusive) 637 * @param orderByComparator the comparator to order the templates 638 (optionally <code>null</code>) 639 * @return the matching templates ordered by the comparator 640 * @throws SystemException if a system exception occurred 641 */ 642 @Override 643 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 644 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 645 java.lang.String name, java.lang.String description, 646 java.lang.String type, java.lang.String mode, 647 java.lang.String language, boolean andOperator, int start, int end, 648 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 649 throws com.liferay.portal.kernel.exception.SystemException { 650 return _ddmTemplateService.search(companyId, groupIds, classNameIds, 651 classPKs, name, description, type, mode, language, andOperator, 652 start, end, orderByComparator); 653 } 654 655 /** 656 * Returns the number of templates matching the group, class name ID, class 657 * PK, type, and mode, and matching the keywords in the template names and 658 * descriptions. 659 * 660 * @param companyId the primary key of the template's company 661 * @param groupId the primary key of the group 662 * @param classNameId the primary key of the class name for template's 663 related model 664 * @param classPK the primary key of the template's related entity 665 * @param keywords the keywords (space separated), which may occur in the 666 template's name or description (optionally <code>null</code>) 667 * @param type the template's type (optionally <code>null</code>). For more 668 information, see {@link 669 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 670 * @param mode the template's mode (optionally <code>null</code>). For more 671 information, see {@link 672 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 673 * @return the number of matching templates 674 * @throws SystemException if a system exception occurred 675 */ 676 @Override 677 public int searchCount(long companyId, long groupId, long classNameId, 678 long classPK, java.lang.String keywords, java.lang.String type, 679 java.lang.String mode) 680 throws com.liferay.portal.kernel.exception.SystemException { 681 return _ddmTemplateService.searchCount(companyId, groupId, classNameId, 682 classPK, keywords, type, mode); 683 } 684 685 /** 686 * Returns the number of templates matching the group, class name ID, class 687 * PK, name keyword, description keyword, type, mode, and language. 688 * 689 * @param companyId the primary key of the template's company 690 * @param groupId the primary key of the group 691 * @param classNameId the primary key of the class name for template's 692 related model 693 * @param classPK the primary key of the template's related entity 694 * @param name the name keywords (optionally <code>null</code>) 695 * @param description the description keywords (optionally 696 <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 language the template's script language (optionally 704 <code>null</code>). For more information, see {@link 705 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 706 * @param andOperator whether every field must match its keywords, or just 707 one field. 708 * @return the number of matching templates 709 * @throws SystemException if a system exception occurred 710 */ 711 @Override 712 public int searchCount(long companyId, long groupId, long classNameId, 713 long classPK, java.lang.String name, java.lang.String description, 714 java.lang.String type, java.lang.String mode, 715 java.lang.String language, boolean andOperator) 716 throws com.liferay.portal.kernel.exception.SystemException { 717 return _ddmTemplateService.searchCount(companyId, groupId, classNameId, 718 classPK, name, description, type, mode, language, andOperator); 719 } 720 721 /** 722 * Returns the number of templates matching the group IDs, class name IDs, 723 * class PK, type, and mode, and matching the keywords in the template names 724 * and descriptions. 725 * 726 * @param companyId the primary key of the template's company 727 * @param groupIds the primary keys of the groups 728 * @param classNameIds the primary keys of the entity's instances the 729 templates are related to 730 * @param classPKs the primary keys of the template's related entities 731 * @param keywords the keywords (space separated), which may occur in the 732 template's name or description (optionally <code>null</code>) 733 * @param type the template's type (optionally <code>null</code>). For more 734 information, see {@link 735 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 736 * @param mode the template's mode (optionally <code>null</code>). For more 737 information, see {@link 738 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 739 * @return the number of matching templates 740 * @throws SystemException if a system exception occurred 741 */ 742 @Override 743 public int searchCount(long companyId, long[] groupIds, 744 long[] classNameIds, long[] classPKs, java.lang.String keywords, 745 java.lang.String type, java.lang.String mode) 746 throws com.liferay.portal.kernel.exception.SystemException { 747 return _ddmTemplateService.searchCount(companyId, groupIds, 748 classNameIds, classPKs, keywords, type, mode); 749 } 750 751 /** 752 * Returns the number of templates matching the group IDs, class name IDs, 753 * class PK, name keyword, description keyword, type, mode, and language. 754 * 755 * @param companyId the primary key of the template's company 756 * @param groupIds the primary keys of the groups 757 * @param classNameIds the primary keys of the entity's instances the 758 templates are related to 759 * @param classPKs the primary keys of the template's related entities 760 * @param name the name keywords (optionally <code>null</code>) 761 * @param description the description keywords (optionally 762 <code>null</code>) 763 * @param type the template's type (optionally <code>null</code>). For more 764 information, see {@link 765 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 766 * @param mode the template's mode (optionally <code>null</code>). For more 767 information, see {@link 768 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 769 * @param language the template's script language (optionally 770 <code>null</code>). For more information, see {@link 771 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 772 * @param andOperator whether every field must match its keywords, or just 773 one field. 774 * @return the number of matching templates 775 * @throws SystemException if a system exception occurred 776 */ 777 @Override 778 public int searchCount(long companyId, long[] groupIds, 779 long[] classNameIds, long[] classPKs, java.lang.String name, 780 java.lang.String description, java.lang.String type, 781 java.lang.String mode, java.lang.String language, boolean andOperator) 782 throws com.liferay.portal.kernel.exception.SystemException { 783 return _ddmTemplateService.searchCount(companyId, groupIds, 784 classNameIds, classPKs, name, description, type, mode, language, 785 andOperator); 786 } 787 788 /** 789 * Updates the template matching the ID. 790 * 791 * @param templateId the primary key of the template 792 * @param classPK the primary key of the template's related entity 793 * @param nameMap the template's new locales and localized names 794 * @param descriptionMap the template's new locales and localized 795 description 796 * @param type the template's type. For more information, see {@link 797 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 798 * @param mode the template's mode. For more information, see {@link 799 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 800 * @param language the template's script language. For more information, 801 see {@link 802 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 803 * @param script the template's script 804 * @param cacheable whether the template is cacheable 805 * @param smallImage whether the template has a small image 806 * @param smallImageURL the template's small image URL (optionally 807 <code>null</code>) 808 * @param smallImageFile the template's small image file (optionally 809 <code>null</code>) 810 * @param serviceContext the service context to be applied. Can set the 811 modification date. 812 * @return the updated template 813 * @throws PortalException if the user did not have permission to update the 814 template or if a portal exception occurred 815 * @throws SystemException if a system exception occurred 816 */ 817 @Override 818 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( 819 long templateId, long classPK, 820 java.util.Map<java.util.Locale, java.lang.String> nameMap, 821 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 822 java.lang.String type, java.lang.String mode, 823 java.lang.String language, java.lang.String script, boolean cacheable, 824 boolean smallImage, java.lang.String smallImageURL, 825 java.io.File smallImageFile, 826 com.liferay.portal.service.ServiceContext serviceContext) 827 throws com.liferay.portal.kernel.exception.PortalException, 828 com.liferay.portal.kernel.exception.SystemException { 829 return _ddmTemplateService.updateTemplate(templateId, classPK, nameMap, 830 descriptionMap, type, mode, language, script, cacheable, 831 smallImage, smallImageURL, smallImageFile, serviceContext); 832 } 833 834 /** 835 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 836 */ 837 public DDMTemplateService getWrappedDDMTemplateService() { 838 return _ddmTemplateService; 839 } 840 841 /** 842 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 843 */ 844 public void setWrappedDDMTemplateService( 845 DDMTemplateService ddmTemplateService) { 846 _ddmTemplateService = ddmTemplateService; 847 } 848 849 @Override 850 public DDMTemplateService getWrappedService() { 851 return _ddmTemplateService; 852 } 853 854 @Override 855 public void setWrappedService(DDMTemplateService ddmTemplateService) { 856 _ddmTemplateService = ddmTemplateService; 857 } 858 859 private DDMTemplateService _ddmTemplateService; 860 }